telnyx 7.30.0-beta.0 → 7.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +30 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -13
- package/client.d.ts.map +1 -1
- package/client.js +18 -3
- package/client.js.map +1 -1
- package/client.mjs +18 -3
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +20 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +20 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +25 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +23 -0
- package/core/pagination.mjs.map +1 -1
- package/lib/login-token.d.mts +7 -3
- package/lib/login-token.d.mts.map +1 -1
- package/lib/login-token.d.ts +7 -3
- package/lib/login-token.d.ts.map +1 -1
- package/lib/login-token.js.map +1 -1
- package/lib/login-token.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-gateways/agent-gateways.d.mts +360 -0
- package/resources/agent-gateways/agent-gateways.d.mts.map +1 -0
- package/resources/agent-gateways/agent-gateways.d.ts +360 -0
- package/resources/agent-gateways/agent-gateways.d.ts.map +1 -0
- package/resources/agent-gateways/agent-gateways.js +140 -0
- package/resources/agent-gateways/agent-gateways.js.map +1 -0
- package/resources/agent-gateways/agent-gateways.mjs +135 -0
- package/resources/agent-gateways/agent-gateways.mjs.map +1 -0
- package/resources/agent-gateways/apis.d.mts +300 -0
- package/resources/agent-gateways/apis.d.mts.map +1 -0
- package/resources/agent-gateways/apis.d.ts +300 -0
- package/resources/agent-gateways/apis.d.ts.map +1 -0
- package/resources/agent-gateways/apis.js +89 -0
- package/resources/agent-gateways/apis.js.map +1 -0
- package/resources/agent-gateways/apis.mjs +85 -0
- package/resources/agent-gateways/apis.mjs.map +1 -0
- package/resources/agent-gateways/guardrails.d.mts +210 -0
- package/resources/agent-gateways/guardrails.d.mts.map +1 -0
- package/resources/agent-gateways/guardrails.d.ts +210 -0
- package/resources/agent-gateways/guardrails.d.ts.map +1 -0
- package/resources/agent-gateways/guardrails.js +96 -0
- package/resources/agent-gateways/guardrails.js.map +1 -0
- package/resources/agent-gateways/guardrails.mjs +92 -0
- package/resources/agent-gateways/guardrails.mjs.map +1 -0
- package/resources/agent-gateways/index.d.mts +9 -0
- package/resources/agent-gateways/index.d.mts.map +1 -0
- package/resources/agent-gateways/index.d.ts +9 -0
- package/resources/agent-gateways/index.d.ts.map +1 -0
- package/resources/agent-gateways/index.js +21 -0
- package/resources/agent-gateways/index.js.map +1 -0
- package/resources/agent-gateways/index.mjs +10 -0
- package/resources/agent-gateways/index.mjs.map +1 -0
- package/resources/agent-gateways/keys/index.d.mts +3 -0
- package/resources/agent-gateways/keys/index.d.mts.map +1 -0
- package/resources/agent-gateways/keys/index.d.ts +3 -0
- package/resources/agent-gateways/keys/index.d.ts.map +1 -0
- package/resources/agent-gateways/keys/index.js +9 -0
- package/resources/agent-gateways/keys/index.js.map +1 -0
- package/resources/agent-gateways/keys/index.mjs +4 -0
- package/resources/agent-gateways/keys/index.mjs.map +1 -0
- package/resources/agent-gateways/keys/keys.d.mts +329 -0
- package/resources/agent-gateways/keys/keys.d.mts.map +1 -0
- package/resources/agent-gateways/keys/keys.d.ts +329 -0
- package/resources/agent-gateways/keys/keys.d.ts.map +1 -0
- package/resources/agent-gateways/keys/keys.js +99 -0
- package/resources/agent-gateways/keys/keys.js.map +1 -0
- package/resources/agent-gateways/keys/keys.mjs +94 -0
- package/resources/agent-gateways/keys/keys.mjs.map +1 -0
- package/resources/agent-gateways/keys/tool-permissions.d.mts +103 -0
- package/resources/agent-gateways/keys/tool-permissions.d.mts.map +1 -0
- package/resources/agent-gateways/keys/tool-permissions.d.ts +103 -0
- package/resources/agent-gateways/keys/tool-permissions.d.ts.map +1 -0
- package/resources/agent-gateways/keys/tool-permissions.js +62 -0
- package/resources/agent-gateways/keys/tool-permissions.js.map +1 -0
- package/resources/agent-gateways/keys/tool-permissions.mjs +58 -0
- package/resources/agent-gateways/keys/tool-permissions.mjs.map +1 -0
- package/resources/agent-gateways/keys.d.mts +2 -0
- package/resources/agent-gateways/keys.d.mts.map +1 -0
- package/resources/agent-gateways/keys.d.ts +2 -0
- package/resources/agent-gateways/keys.d.ts.map +1 -0
- package/resources/agent-gateways/keys.js +6 -0
- package/resources/agent-gateways/keys.js.map +1 -0
- package/resources/agent-gateways/keys.mjs +3 -0
- package/resources/agent-gateways/keys.mjs.map +1 -0
- package/resources/agent-gateways/mcp-servers.d.mts +246 -0
- package/resources/agent-gateways/mcp-servers.d.mts.map +1 -0
- package/resources/agent-gateways/mcp-servers.d.ts +246 -0
- package/resources/agent-gateways/mcp-servers.d.ts.map +1 -0
- package/resources/agent-gateways/mcp-servers.js +97 -0
- package/resources/agent-gateways/mcp-servers.js.map +1 -0
- package/resources/agent-gateways/mcp-servers.mjs +93 -0
- package/resources/agent-gateways/mcp-servers.mjs.map +1 -0
- package/resources/agent-gateways/policies.d.mts +266 -0
- package/resources/agent-gateways/policies.d.mts.map +1 -0
- package/resources/agent-gateways/policies.d.ts +266 -0
- package/resources/agent-gateways/policies.d.ts.map +1 -0
- package/resources/agent-gateways/policies.js +97 -0
- package/resources/agent-gateways/policies.js.map +1 -0
- package/resources/agent-gateways/policies.mjs +93 -0
- package/resources/agent-gateways/policies.mjs.map +1 -0
- package/resources/agent-gateways/policy-attachments.d.mts +123 -0
- package/resources/agent-gateways/policy-attachments.d.mts.map +1 -0
- package/resources/agent-gateways/policy-attachments.d.ts +123 -0
- package/resources/agent-gateways/policy-attachments.d.ts.map +1 -0
- package/resources/agent-gateways/policy-attachments.js +63 -0
- package/resources/agent-gateways/policy-attachments.js.map +1 -0
- package/resources/agent-gateways/policy-attachments.mjs +59 -0
- package/resources/agent-gateways/policy-attachments.mjs.map +1 -0
- package/resources/agent-gateways/teams/index.d.mts +3 -0
- package/resources/agent-gateways/teams/index.d.mts.map +1 -0
- package/resources/agent-gateways/teams/index.d.ts +3 -0
- package/resources/agent-gateways/teams/index.d.ts.map +1 -0
- package/resources/agent-gateways/teams/index.js +9 -0
- package/resources/agent-gateways/teams/index.js.map +1 -0
- package/resources/agent-gateways/teams/index.mjs +4 -0
- package/resources/agent-gateways/teams/index.mjs.map +1 -0
- package/resources/agent-gateways/teams/teams.d.mts +210 -0
- package/resources/agent-gateways/teams/teams.d.mts.map +1 -0
- package/resources/agent-gateways/teams/teams.d.ts +210 -0
- package/resources/agent-gateways/teams/teams.d.ts.map +1 -0
- package/resources/agent-gateways/teams/teams.js +98 -0
- package/resources/agent-gateways/teams/teams.js.map +1 -0
- package/resources/agent-gateways/teams/teams.mjs +93 -0
- package/resources/agent-gateways/teams/teams.mjs.map +1 -0
- package/resources/agent-gateways/teams/tool-permissions.d.mts +82 -0
- package/resources/agent-gateways/teams/tool-permissions.d.mts.map +1 -0
- package/resources/agent-gateways/teams/tool-permissions.d.ts +82 -0
- package/resources/agent-gateways/teams/tool-permissions.d.ts.map +1 -0
- package/resources/agent-gateways/teams/tool-permissions.js +62 -0
- package/resources/agent-gateways/teams/tool-permissions.js.map +1 -0
- package/resources/agent-gateways/teams/tool-permissions.mjs +58 -0
- package/resources/agent-gateways/teams/tool-permissions.mjs.map +1 -0
- package/resources/agent-gateways/teams.d.mts +2 -0
- package/resources/agent-gateways/teams.d.mts.map +1 -0
- package/resources/agent-gateways/teams.d.ts +2 -0
- package/resources/agent-gateways/teams.d.ts.map +1 -0
- package/resources/agent-gateways/teams.js +6 -0
- package/resources/agent-gateways/teams.js.map +1 -0
- package/resources/agent-gateways/teams.mjs +3 -0
- package/resources/agent-gateways/teams.mjs.map +1 -0
- package/resources/agent-gateways.d.mts +2 -0
- package/resources/agent-gateways.d.mts.map +1 -0
- package/resources/agent-gateways.d.ts +2 -0
- package/resources/agent-gateways.d.ts.map +1 -0
- package/resources/{tts-integrations.js → agent-gateways.js} +2 -2
- package/resources/agent-gateways.js.map +1 -0
- package/resources/agent-gateways.mjs +3 -0
- package/resources/agent-gateways.mjs.map +1 -0
- package/resources/ai/ai.d.mts +9 -4
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +9 -4
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +204 -108
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +204 -108
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/index.d.mts +1 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/chat.d.mts +3 -5
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +3 -5
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.d.mts +27 -2
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +27 -2
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js +23 -1
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs +23 -1
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/conversations/index.d.mts +1 -1
- package/resources/ai/conversations/index.d.mts.map +1 -1
- package/resources/ai/conversations/index.d.ts +1 -1
- package/resources/ai/conversations/index.d.ts.map +1 -1
- package/resources/ai/conversations/index.js.map +1 -1
- package/resources/ai/conversations/index.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/index.d.mts +2 -2
- package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/index.d.ts +2 -2
- package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/index.js.map +1 -1
- package/resources/ai/memory/namespaces/index.mjs +1 -1
- package/resources/ai/memory/namespaces/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.mts +4 -4
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +4 -4
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts +23 -5
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts +23 -5
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
- package/resources/ai/memory/namespaces/settings.d.mts +23 -27
- package/resources/ai/memory/namespaces/settings.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/settings.d.ts +23 -27
- package/resources/ai/memory/namespaces/settings.d.ts.map +1 -1
- package/resources/ai/openai/chat.d.mts +3 -5
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +3 -5
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tests/test-framework/v1/v1.d.mts +15 -5
- package/resources/ai/tests/test-framework/v1/v1.d.mts.map +1 -1
- package/resources/ai/tests/test-framework/v1/v1.d.ts +15 -5
- package/resources/ai/tests/test-framework/v1/v1.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +222 -0
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +222 -0
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/browser-sessions/actions.d.mts +13 -7
- package/resources/browser-sessions/actions.d.mts.map +1 -1
- package/resources/browser-sessions/actions.d.ts +13 -7
- package/resources/browser-sessions/actions.d.ts.map +1 -1
- package/resources/browser-sessions/browser-sessions.d.mts +6 -2
- package/resources/browser-sessions/browser-sessions.d.mts.map +1 -1
- package/resources/browser-sessions/browser-sessions.d.ts +6 -2
- package/resources/browser-sessions/browser-sessions.d.ts.map +1 -1
- package/resources/calendar-connections/calendar-connections.d.mts +380 -0
- package/resources/calendar-connections/calendar-connections.d.mts.map +1 -0
- package/resources/calendar-connections/calendar-connections.d.ts +380 -0
- package/resources/calendar-connections/calendar-connections.d.ts.map +1 -0
- package/resources/calendar-connections/calendar-connections.js +102 -0
- package/resources/calendar-connections/calendar-connections.js.map +1 -0
- package/resources/calendar-connections/calendar-connections.mjs +97 -0
- package/resources/calendar-connections/calendar-connections.mjs.map +1 -0
- package/resources/calendar-connections/index.d.mts +3 -0
- package/resources/calendar-connections/index.d.mts.map +1 -0
- package/resources/calendar-connections/index.d.ts +3 -0
- package/resources/calendar-connections/index.d.ts.map +1 -0
- package/resources/calendar-connections/index.js +9 -0
- package/resources/calendar-connections/index.js.map +1 -0
- package/resources/calendar-connections/index.mjs +4 -0
- package/resources/calendar-connections/index.mjs.map +1 -0
- package/resources/calendar-connections/meetings.d.mts +149 -0
- package/resources/calendar-connections/meetings.d.mts.map +1 -0
- package/resources/calendar-connections/meetings.d.ts +149 -0
- package/resources/calendar-connections/meetings.d.ts.map +1 -0
- package/resources/calendar-connections/meetings.js +47 -0
- package/resources/calendar-connections/meetings.js.map +1 -0
- package/resources/calendar-connections/meetings.mjs +43 -0
- package/resources/calendar-connections/meetings.mjs.map +1 -0
- package/resources/calendar-connections.d.mts +2 -0
- package/resources/calendar-connections.d.mts.map +1 -0
- package/resources/calendar-connections.d.ts +2 -0
- package/resources/calendar-connections.d.ts.map +1 -0
- package/resources/calendar-connections.js +6 -0
- package/resources/calendar-connections.js.map +1 -0
- package/resources/calendar-connections.mjs +3 -0
- package/resources/calendar-connections.mjs.map +1 -0
- package/resources/calls/actions.d.mts +11 -5
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +11 -5
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +4 -4
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +4 -4
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/compute/funcs/export.d.mts +33 -35
- package/resources/compute/funcs/export.d.mts.map +1 -1
- package/resources/compute/funcs/export.d.ts +33 -35
- package/resources/compute/funcs/export.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.d.mts +2 -2
- package/resources/compute/funcs/funcs.d.mts.map +1 -1
- package/resources/compute/funcs/funcs.d.ts +2 -2
- package/resources/compute/funcs/funcs.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.js.map +1 -1
- package/resources/compute/funcs/funcs.mjs.map +1 -1
- package/resources/compute/funcs/index.d.mts +1 -1
- package/resources/compute/funcs/index.d.mts.map +1 -1
- package/resources/compute/funcs/index.d.ts +1 -1
- package/resources/compute/funcs/index.d.ts.map +1 -1
- package/resources/compute/funcs/index.js.map +1 -1
- package/resources/compute/funcs/index.mjs +1 -1
- package/resources/compute/funcs/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +1 -1
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +1 -1
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.d.mts.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.d.ts.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.js +2 -2
- package/resources/email/dedicated-ips/dedicated-ips.js.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.mjs +2 -2
- package/resources/email/dedicated-ips/dedicated-ips.mjs.map +1 -1
- package/resources/email-events.d.mts +84 -106
- package/resources/email-events.d.mts.map +1 -1
- package/resources/email-events.d.ts +84 -106
- package/resources/email-events.d.ts.map +1 -1
- package/resources/email-events.js +5 -1
- package/resources/email-events.js.map +1 -1
- package/resources/email-events.mjs +5 -1
- package/resources/email-events.mjs.map +1 -1
- package/resources/email-messages/email-messages.d.mts +1 -7
- package/resources/email-messages/email-messages.d.mts.map +1 -1
- package/resources/email-messages/email-messages.d.ts +1 -7
- package/resources/email-messages/email-messages.d.ts.map +1 -1
- package/resources/email-messages/email-messages.js.map +1 -1
- package/resources/email-messages/email-messages.mjs.map +1 -1
- package/resources/email-templates.d.mts +16 -70
- package/resources/email-templates.d.mts.map +1 -1
- package/resources/email-templates.d.ts +16 -70
- package/resources/email-templates.d.ts.map +1 -1
- package/resources/enterprises/enterprises.d.mts +2 -2
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +2 -2
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -1
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -1
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/external-verification.d.mts +26 -29
- package/resources/enterprises/reputation/external-verification.d.mts.map +1 -1
- package/resources/enterprises/reputation/external-verification.d.ts +26 -29
- package/resources/enterprises/reputation/external-verification.d.ts.map +1 -1
- package/resources/enterprises/reputation/external-verification.js +3 -3
- package/resources/enterprises/reputation/external-verification.js.map +1 -1
- package/resources/enterprises/reputation/external-verification.mjs +1 -1
- package/resources/enterprises/reputation/external-verification.mjs.map +1 -1
- package/resources/enterprises/reputation/index.d.mts +1 -1
- package/resources/enterprises/reputation/index.d.mts.map +1 -1
- package/resources/enterprises/reputation/index.d.ts +1 -1
- package/resources/enterprises/reputation/index.d.ts.map +1 -1
- package/resources/enterprises/reputation/index.js +2 -2
- package/resources/enterprises/reputation/index.js.map +1 -1
- package/resources/enterprises/reputation/index.mjs +1 -1
- package/resources/enterprises/reputation/index.mjs.map +1 -1
- package/resources/enterprises/reputation/reputation.d.mts +3 -3
- package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.ts +3 -3
- package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.js +2 -2
- package/resources/enterprises/reputation/reputation.js.map +1 -1
- package/resources/enterprises/reputation/reputation.mjs +3 -3
- package/resources/enterprises/reputation/reputation.mjs.map +1 -1
- package/resources/enterprises/verify-email.d.mts +27 -29
- package/resources/enterprises/verify-email.d.mts.map +1 -1
- package/resources/enterprises/verify-email.d.ts +27 -29
- package/resources/enterprises/verify-email.d.ts.map +1 -1
- package/resources/index.d.mts +9 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -6
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -1
- package/resources/index.mjs.map +1 -1
- package/resources/meeting-bot/calendar.d.mts +34 -0
- package/resources/meeting-bot/calendar.d.mts.map +1 -0
- package/resources/meeting-bot/calendar.d.ts +34 -0
- package/resources/meeting-bot/calendar.d.ts.map +1 -0
- package/resources/meeting-bot/calendar.js +26 -0
- package/resources/meeting-bot/calendar.js.map +1 -0
- package/resources/meeting-bot/calendar.mjs +22 -0
- package/resources/meeting-bot/calendar.mjs.map +1 -0
- package/resources/meeting-bot/index.d.mts +3 -0
- package/resources/meeting-bot/index.d.mts.map +1 -0
- package/resources/meeting-bot/index.d.ts +3 -0
- package/resources/meeting-bot/index.d.ts.map +1 -0
- package/resources/meeting-bot/index.js +9 -0
- package/resources/meeting-bot/index.js.map +1 -0
- package/resources/meeting-bot/index.mjs +4 -0
- package/resources/meeting-bot/index.mjs.map +1 -0
- package/resources/meeting-bot/meeting-bot.d.mts +10 -0
- package/resources/meeting-bot/meeting-bot.d.mts.map +1 -0
- package/resources/meeting-bot/meeting-bot.d.ts +10 -0
- package/resources/meeting-bot/meeting-bot.d.ts.map +1 -0
- package/resources/meeting-bot/meeting-bot.js +17 -0
- package/resources/meeting-bot/meeting-bot.js.map +1 -0
- package/resources/meeting-bot/meeting-bot.mjs +12 -0
- package/resources/meeting-bot/meeting-bot.mjs.map +1 -0
- package/resources/meeting-bot.d.mts +2 -0
- package/resources/meeting-bot.d.mts.map +1 -0
- package/resources/meeting-bot.d.ts +2 -0
- package/resources/meeting-bot.d.ts.map +1 -0
- package/resources/meeting-bot.js +6 -0
- package/resources/meeting-bot.js.map +1 -0
- package/resources/meeting-bot.mjs +3 -0
- package/resources/meeting-bot.mjs.map +1 -0
- package/resources/meeting-sessions/actions.d.mts +17 -11
- package/resources/meeting-sessions/actions.d.mts.map +1 -1
- package/resources/meeting-sessions/actions.d.ts +17 -11
- package/resources/meeting-sessions/actions.d.ts.map +1 -1
- package/resources/meeting-sessions/actions.js +14 -10
- package/resources/meeting-sessions/actions.js.map +1 -1
- package/resources/meeting-sessions/actions.mjs +14 -10
- package/resources/meeting-sessions/actions.mjs.map +1 -1
- package/resources/meeting-sessions/artifacts.d.mts +8 -7
- package/resources/meeting-sessions/artifacts.d.mts.map +1 -1
- package/resources/meeting-sessions/artifacts.d.ts +8 -7
- package/resources/meeting-sessions/artifacts.d.ts.map +1 -1
- package/resources/meeting-sessions/artifacts.js +8 -7
- package/resources/meeting-sessions/artifacts.js.map +1 -1
- package/resources/meeting-sessions/artifacts.mjs +8 -7
- package/resources/meeting-sessions/artifacts.mjs.map +1 -1
- package/resources/meeting-sessions/index.d.mts +1 -1
- package/resources/meeting-sessions/index.d.mts.map +1 -1
- package/resources/meeting-sessions/index.d.ts +1 -1
- package/resources/meeting-sessions/index.d.ts.map +1 -1
- package/resources/meeting-sessions/index.js.map +1 -1
- package/resources/meeting-sessions/index.mjs.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.mts +281 -103
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +281 -103
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +53 -21
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +53 -21
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/messages/messages.d.mts +32 -2
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +32 -2
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts +11 -0
- package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +11 -0
- package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
- package/resources/number-lookup.d.mts +5 -0
- package/resources/number-lookup.d.mts.map +1 -1
- package/resources/number-lookup.d.ts +5 -0
- package/resources/number-lookup.d.ts.map +1 -1
- package/resources/pay-connectors.d.mts +7 -7
- package/resources/pay-connectors.d.mts.map +1 -1
- package/resources/pay-connectors.d.ts +7 -7
- package/resources/pay-connectors.d.ts.map +1 -1
- package/resources/phone-numbers/index.d.mts +1 -1
- package/resources/phone-numbers/index.d.mts.map +1 -1
- package/resources/phone-numbers/index.d.ts +1 -1
- package/resources/phone-numbers/index.d.ts.map +1 -1
- package/resources/phone-numbers/index.js.map +1 -1
- package/resources/phone-numbers/index.mjs.map +1 -1
- package/resources/phone-numbers/jobs.d.mts +21 -57
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +21 -57
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.mts +2 -2
- package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.ts +2 -2
- package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/portouts/portouts.d.mts +2 -1
- package/resources/portouts/portouts.d.mts.map +1 -1
- package/resources/portouts/portouts.d.ts +2 -1
- package/resources/portouts/portouts.d.ts.map +1 -1
- package/resources/portouts/portouts.js +2 -1
- package/resources/portouts/portouts.js.map +1 -1
- package/resources/portouts/portouts.mjs +2 -1
- package/resources/portouts/portouts.mjs.map +1 -1
- package/resources/telephony-credentials.d.mts +54 -24
- package/resources/telephony-credentials.d.mts.map +1 -1
- package/resources/telephony-credentials.d.ts +54 -24
- package/resources/telephony-credentials.d.ts.map +1 -1
- package/resources/telephony-credentials.js +31 -27
- package/resources/telephony-credentials.js.map +1 -1
- package/resources/telephony-credentials.mjs +31 -27
- package/resources/telephony-credentials.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +45 -5
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +45 -5
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech/text-to-speech.js +8 -2
- package/resources/text-to-speech/text-to-speech.js.map +1 -1
- package/resources/text-to-speech/text-to-speech.mjs +8 -2
- package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
- package/resources/user-profile.d.mts +284 -0
- package/resources/user-profile.d.mts.map +1 -0
- package/resources/user-profile.d.ts +284 -0
- package/resources/user-profile.d.ts.map +1 -0
- package/resources/user-profile.js +42 -0
- package/resources/user-profile.js.map +1 -0
- package/resources/user-profile.mjs +38 -0
- package/resources/user-profile.mjs.map +1 -0
- package/resources/voice-clones.d.mts +4 -4
- package/resources/voice-clones.d.mts.map +1 -1
- package/resources/voice-clones.d.ts +4 -4
- package/resources/voice-clones.d.ts.map +1 -1
- package/resources/webhooks.d.mts +139 -23
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +139 -23
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.d.mts +2 -2
- package/resources/whatsapp/business-accounts/business-accounts.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.d.ts +2 -2
- package/resources/whatsapp/business-accounts/business-accounts.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.js.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.mjs.map +1 -1
- package/resources/whatsapp/business-accounts/index.d.mts +1 -1
- package/resources/whatsapp/business-accounts/index.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/index.d.ts +1 -1
- package/resources/whatsapp/business-accounts/index.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/index.js.map +1 -1
- package/resources/whatsapp/business-accounts/index.mjs.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts +7 -66
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts +7 -66
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.js +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.js.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.mjs +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.mjs.map +1 -1
- package/resources/whatsapp/hosted-signups.d.mts +11 -73
- package/resources/whatsapp/hosted-signups.d.mts.map +1 -1
- package/resources/whatsapp/hosted-signups.d.ts +11 -73
- package/resources/whatsapp/hosted-signups.d.ts.map +1 -1
- package/resources/whatsapp/hosted-signups.js +5 -2
- package/resources/whatsapp/hosted-signups.js.map +1 -1
- package/resources/whatsapp/hosted-signups.mjs +5 -2
- package/resources/whatsapp/hosted-signups.mjs.map +1 -1
- package/resources/whatsapp/index.d.mts +2 -2
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +2 -2
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +9 -135
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +9 -135
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/whatsapp/whatsapp.d.mts +4 -4
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +4 -4
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +103 -6
- package/src/core/pagination.ts +58 -0
- package/src/lib/login-token.ts +8 -4
- package/src/resources/agent-gateways/agent-gateways.ts +605 -0
- package/src/resources/agent-gateways/apis.ts +388 -0
- package/src/resources/agent-gateways/guardrails.ts +304 -0
- package/src/resources/agent-gateways/index.ts +87 -0
- package/src/resources/agent-gateways/keys/index.ts +20 -0
- package/src/resources/agent-gateways/keys/keys.ts +437 -0
- package/src/resources/agent-gateways/keys/tool-permissions.ts +139 -0
- package/src/resources/agent-gateways/keys.ts +3 -0
- package/src/resources/agent-gateways/mcp-servers.ts +328 -0
- package/src/resources/agent-gateways/policies.ts +348 -0
- package/src/resources/agent-gateways/policy-attachments.ts +167 -0
- package/src/resources/agent-gateways/teams/index.ts +16 -0
- package/src/resources/agent-gateways/teams/teams.ts +282 -0
- package/src/resources/agent-gateways/teams/tool-permissions.ts +112 -0
- package/src/resources/agent-gateways/teams.ts +3 -0
- package/src/resources/{tts-integrations.ts → agent-gateways.ts} +1 -1
- package/src/resources/ai/ai.ts +12 -0
- package/src/resources/ai/assistants/assistants.ts +241 -143
- package/src/resources/ai/assistants/index.ts +2 -0
- package/src/resources/ai/chat.ts +3 -5
- package/src/resources/ai/conversations/conversations.ts +39 -1
- package/src/resources/ai/conversations/index.ts +1 -0
- package/src/resources/ai/index.ts +3 -0
- package/src/resources/ai/memory/namespaces/index.ts +8 -1
- package/src/resources/ai/memory/namespaces/namespaces.ts +11 -1
- package/src/resources/ai/memory/namespaces/profiles/index.ts +1 -0
- package/src/resources/ai/memory/namespaces/profiles/profiles.ts +29 -4
- package/src/resources/ai/memory/namespaces/settings.ts +25 -27
- package/src/resources/ai/openai/chat.ts +3 -5
- package/src/resources/ai/tests/test-framework/v1/v1.ts +5 -5
- package/src/resources/ai/tools.ts +366 -0
- package/src/resources/browser-sessions/actions.ts +7 -7
- package/src/resources/browser-sessions/browser-sessions.ts +2 -2
- package/src/resources/calendar-connections/calendar-connections.ts +486 -0
- package/src/resources/calendar-connections/index.ts +21 -0
- package/src/resources/calendar-connections/meetings.ts +205 -0
- package/src/resources/calendar-connections.ts +3 -0
- package/src/resources/calls/actions.ts +16 -4
- package/src/resources/calls/calls.ts +6 -2
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/compute/funcs/export.ts +41 -42
- package/src/resources/compute/funcs/funcs.ts +2 -1
- package/src/resources/compute/funcs/index.ts +6 -1
- package/src/resources/conferences/actions.ts +2 -1
- package/src/resources/email/dedicated-ips/dedicated-ips.ts +3 -2
- package/src/resources/email-events.ts +128 -147
- package/src/resources/email-messages/email-messages.ts +1 -7
- package/src/resources/email-templates.ts +17 -78
- package/src/resources/enterprises/enterprises.ts +2 -0
- package/src/resources/enterprises/index.ts +1 -0
- package/src/resources/enterprises/reputation/external-verification.ts +32 -34
- package/src/resources/enterprises/reputation/index.ts +2 -1
- package/src/resources/enterprises/reputation/reputation.ts +6 -4
- package/src/resources/enterprises/verify-email.ts +29 -30
- package/src/resources/index.ts +40 -1
- package/src/resources/meeting-bot/calendar.ts +54 -0
- package/src/resources/meeting-bot/index.ts +8 -0
- package/src/resources/meeting-bot/meeting-bot.ts +23 -0
- package/src/resources/meeting-bot.ts +3 -0
- package/src/resources/meeting-sessions/actions.ts +17 -11
- package/src/resources/meeting-sessions/artifacts.ts +8 -7
- package/src/resources/meeting-sessions/index.ts +4 -0
- package/src/resources/meeting-sessions/meeting-sessions.ts +321 -102
- package/src/resources/messages/messages.ts +32 -2
- package/src/resources/messaging-profiles/messaging-profiles.ts +12 -0
- package/src/resources/number-lookup.ts +6 -0
- package/src/resources/pay-connectors.ts +7 -7
- package/src/resources/phone-numbers/index.ts +2 -0
- package/src/resources/phone-numbers/jobs.ts +22 -60
- package/src/resources/phone-numbers/phone-numbers.ts +4 -0
- package/src/resources/portouts/portouts.ts +2 -1
- package/src/resources/telephony-credentials.ts +74 -41
- package/src/resources/text-to-speech/text-to-speech.ts +81 -5
- package/src/resources/user-profile.ts +357 -0
- package/src/resources/voice-clones.ts +4 -4
- package/src/resources/webhooks.ts +226 -20
- package/src/resources/whatsapp/business-accounts/business-accounts.ts +0 -4
- package/src/resources/whatsapp/business-accounts/index.ts +0 -2
- package/src/resources/whatsapp/business-accounts/phone-numbers.ts +7 -98
- package/src/resources/whatsapp/hosted-signups.ts +18 -97
- package/src/resources/whatsapp/index.ts +4 -4
- package/src/resources/whatsapp/phone-numbers/index.ts +2 -2
- package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +11 -197
- package/src/resources/whatsapp/whatsapp.ts +8 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/tts-integrations/actions.d.mts +0 -4
- package/resources/tts-integrations/actions.d.mts.map +0 -1
- package/resources/tts-integrations/actions.d.ts +0 -4
- package/resources/tts-integrations/actions.d.ts.map +0 -1
- package/resources/tts-integrations/actions.js +0 -9
- package/resources/tts-integrations/actions.js.map +0 -1
- package/resources/tts-integrations/actions.mjs +0 -5
- package/resources/tts-integrations/actions.mjs.map +0 -1
- package/resources/tts-integrations/index.d.mts +0 -3
- package/resources/tts-integrations/index.d.mts.map +0 -1
- package/resources/tts-integrations/index.d.ts +0 -3
- package/resources/tts-integrations/index.d.ts.map +0 -1
- package/resources/tts-integrations/index.js +0 -9
- package/resources/tts-integrations/index.js.map +0 -1
- package/resources/tts-integrations/index.mjs +0 -4
- package/resources/tts-integrations/index.mjs.map +0 -1
- package/resources/tts-integrations/tts-integrations.d.mts +0 -10
- package/resources/tts-integrations/tts-integrations.d.mts.map +0 -1
- package/resources/tts-integrations/tts-integrations.d.ts +0 -10
- package/resources/tts-integrations/tts-integrations.d.ts.map +0 -1
- package/resources/tts-integrations/tts-integrations.js +0 -17
- package/resources/tts-integrations/tts-integrations.js.map +0 -1
- package/resources/tts-integrations/tts-integrations.mjs +0 -12
- package/resources/tts-integrations/tts-integrations.mjs.map +0 -1
- package/resources/tts-integrations.d.mts +0 -2
- package/resources/tts-integrations.d.mts.map +0 -1
- package/resources/tts-integrations.d.ts +0 -2
- package/resources/tts-integrations.d.ts.map +0 -1
- package/resources/tts-integrations.js.map +0 -1
- package/resources/tts-integrations.mjs +0 -3
- package/resources/tts-integrations.mjs.map +0 -1
- package/src/resources/tts-integrations/actions.ts +0 -5
- package/src/resources/tts-integrations/index.ts +0 -4
- package/src/resources/tts-integrations/tts-integrations.ts +0 -15
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* REST APIs on an instance, served to agents as tools.
|
|
10
|
+
*/
|
|
11
|
+
export class APIs extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Lists the REST APIs the instance serves as tools, without their credentials. The
|
|
14
|
+
* instance must be `ready`; otherwise the request answers `409`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const apis = await client.agentGateways.apis.list(
|
|
19
|
+
* '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
list(instanceID: string, options?: RequestOptions): APIPromise<APIListResponse> {
|
|
24
|
+
return this._client.get(path`/agent_gateways/${instanceID}/apis`, options);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Adds a REST API by its OpenAPI description. Each operation becomes a tool at
|
|
29
|
+
* `{gateway_url}/mcp`, named with the API's `name`, a hyphen, and the lowercased
|
|
30
|
+
* `operationId`. A description the gateway cannot fetch yields an API with no
|
|
31
|
+
* tools. The instance must be `ready`; otherwise the request answers `409`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const agentGatewayAPIResponse =
|
|
36
|
+
* await client.agentGateways.apis.create(
|
|
37
|
+
* '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
38
|
+
* {
|
|
39
|
+
* name: 'petstore',
|
|
40
|
+
* spec_url:
|
|
41
|
+
* 'https://petstore3.swagger.io/api/v3/openapi.json',
|
|
42
|
+
* base_url: 'https://petstore3.swagger.io/api/v3',
|
|
43
|
+
* open_to_every_key: true,
|
|
44
|
+
* },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
create(
|
|
49
|
+
instanceID: string,
|
|
50
|
+
body: APICreateParams,
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): APIPromise<AgentGatewayAPIResponse> {
|
|
53
|
+
return this._client.post(path`/agent_gateways/${instanceID}/apis`, { body, ...options });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Removes an API and returns it as it was. An MCP server's `id` answers `404`. The
|
|
58
|
+
* instance must be `ready`; otherwise the request answers `409`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const agentGatewayAPIResponse =
|
|
63
|
+
* await client.agentGateways.apis.delete(
|
|
64
|
+
* 'dbe53cc0-bf7e-4f7a-8d84-752d19890eb3',
|
|
65
|
+
* { instance_id: '32ce035d-3165-4031-b1a7-a7c0c259590a' },
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
delete(
|
|
70
|
+
apiID: string,
|
|
71
|
+
params: APIDeleteParams,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): APIPromise<AgentGatewayAPIResponse> {
|
|
74
|
+
const { instance_id } = params;
|
|
75
|
+
return this._client.delete(path`/agent_gateways/${instance_id}/apis/${apiID}`, options);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Changes an API's settings. A field left out stays as it is, `"base_url": null`
|
|
80
|
+
* clears the base URL, and `auth` is replaced whole. The instance must be `ready`;
|
|
81
|
+
* otherwise the request answers `409`.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const agentGatewayAPIResponse =
|
|
86
|
+
* await client.agentGateways.apis.update(
|
|
87
|
+
* 'dbe53cc0-bf7e-4f7a-8d84-752d19890eb3',
|
|
88
|
+
* {
|
|
89
|
+
* instance_id: '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
90
|
+
* tools: ['findpetsbystatus', 'getpetbyid'],
|
|
91
|
+
* },
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
update(
|
|
96
|
+
apiID: string,
|
|
97
|
+
params: APIUpdateParams,
|
|
98
|
+
options?: RequestOptions,
|
|
99
|
+
): APIPromise<AgentGatewayAPIResponse> {
|
|
100
|
+
const { instance_id, ...body } = params;
|
|
101
|
+
return this._client.patch(path`/agent_gateways/${instance_id}/apis/${apiID}`, { body, ...options });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface AgentGatewayAPI {
|
|
106
|
+
/**
|
|
107
|
+
* Identifies the API.
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The server's outbound authentication method. Credentials are never returned.
|
|
113
|
+
*/
|
|
114
|
+
auth: AgentGatewayShownAuth;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Where the gateway sends the API's requests. `null` takes the description's first
|
|
118
|
+
* `servers` entry.
|
|
119
|
+
*/
|
|
120
|
+
base_url: string | null;
|
|
121
|
+
|
|
122
|
+
created_at: string | null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Headers copied from the agent's request, by name.
|
|
126
|
+
*/
|
|
127
|
+
forwarded_headers: Array<string>;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* A name for the API, unique on the instance across MCP servers and APIs,
|
|
131
|
+
* regardless of case. Letters, digits, `_`, and `.`. The gateway prefixes the
|
|
132
|
+
* API's tools with it and a hyphen.
|
|
133
|
+
*/
|
|
134
|
+
name: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* `true` lets every key on the instance use the server, granted or not.
|
|
138
|
+
*/
|
|
139
|
+
open_to_every_key: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The URL of the API's OpenAPI description.
|
|
143
|
+
*/
|
|
144
|
+
spec_url: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Headers sent on every request.
|
|
148
|
+
*/
|
|
149
|
+
static_headers: { [key: string]: string };
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The operations the API exposes as tools, by tool name. `[]` exposes every
|
|
153
|
+
* operation.
|
|
154
|
+
*/
|
|
155
|
+
tools: Array<string>;
|
|
156
|
+
|
|
157
|
+
updated_at: string | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface AgentGatewayAPIResponse {
|
|
161
|
+
data: AgentGatewayAPI;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* The gateway sends no credential.
|
|
166
|
+
*/
|
|
167
|
+
export interface AgentGatewayNoAuth {
|
|
168
|
+
type?: 'none';
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The gateway gets its own access token with the `client_credentials` grant and
|
|
173
|
+
* sends it as a bearer token on every request, renewing it before it expires. The
|
|
174
|
+
* client ID and secret are write-only.
|
|
175
|
+
*/
|
|
176
|
+
export interface AgentGatewayOAuthClientCredentials {
|
|
177
|
+
client_id: string;
|
|
178
|
+
|
|
179
|
+
client_secret: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The OAuth provider's token endpoint.
|
|
183
|
+
*/
|
|
184
|
+
token_url: string;
|
|
185
|
+
|
|
186
|
+
type: 'oauth_client_credentials';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The token's audience, sent in the token request.
|
|
190
|
+
*/
|
|
191
|
+
audience?: string | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Whether the client ID and secret go in the token request's body or as HTTP Basic
|
|
195
|
+
* authentication.
|
|
196
|
+
*/
|
|
197
|
+
credentials_in?: 'body' | 'basic';
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The resource the token is for, sent in the token request.
|
|
201
|
+
*/
|
|
202
|
+
resource?: string | null;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The scopes to request.
|
|
206
|
+
*/
|
|
207
|
+
scopes?: Array<string>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The gateway forwards the agent's own `Authorization` header to the server
|
|
212
|
+
* unchanged.
|
|
213
|
+
*/
|
|
214
|
+
export interface AgentGatewayPassthroughAuth {
|
|
215
|
+
type?: 'passthrough';
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The server's outbound authentication method. Credentials are never returned.
|
|
220
|
+
*/
|
|
221
|
+
export interface AgentGatewayShownAuth {
|
|
222
|
+
/**
|
|
223
|
+
* The method's `type`.
|
|
224
|
+
*/
|
|
225
|
+
type: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* A static credential the gateway sends on every request. Write-only: responses
|
|
230
|
+
* show its `type` only.
|
|
231
|
+
*/
|
|
232
|
+
export interface AgentGatewayStaticAuth {
|
|
233
|
+
/**
|
|
234
|
+
* How the credential is sent: `api_key` as `X-API-Key: <value>`, `bearer_token` as
|
|
235
|
+
* `Authorization: Bearer <value>`, `basic` as
|
|
236
|
+
* `Authorization: Basic <base64 of value>` with `value` in the form
|
|
237
|
+
* `user:password`, `token` as `Authorization: token <value>`, and `authorization`
|
|
238
|
+
* as `Authorization: <value>`.
|
|
239
|
+
*/
|
|
240
|
+
type: 'api_key' | 'bearer_token' | 'basic' | 'token' | 'authorization';
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The credential.
|
|
244
|
+
*/
|
|
245
|
+
value: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* A header name that replaces `X-API-Key` or `Authorization`.
|
|
249
|
+
*/
|
|
250
|
+
header?: string | null;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface APIListResponse {
|
|
254
|
+
data: Array<AgentGatewayAPI>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface APICreateParams {
|
|
258
|
+
/**
|
|
259
|
+
* A name for the API, unique on the instance across MCP servers and APIs,
|
|
260
|
+
* regardless of case. Up to 100 letters, digits, `_`, and `.`. The gateway
|
|
261
|
+
* prefixes the API's tools with it and a hyphen.
|
|
262
|
+
*/
|
|
263
|
+
name: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The URL of the API's OpenAPI description: OpenAPI 3.0, OpenAPI 3.1, or Swagger
|
|
267
|
+
* 2.0.
|
|
268
|
+
*/
|
|
269
|
+
spec_url: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* How the gateway authenticates to the API. AWS Signature Version 4 is for MCP
|
|
273
|
+
* servers only. Replaced whole on an update.
|
|
274
|
+
*/
|
|
275
|
+
auth?:
|
|
276
|
+
| AgentGatewayNoAuth
|
|
277
|
+
| AgentGatewayStaticAuth
|
|
278
|
+
| AgentGatewayOAuthClientCredentials
|
|
279
|
+
| AgentGatewayPassthroughAuth;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Where the gateway sends the API's requests. Without it, the gateway takes the
|
|
283
|
+
* description's first `servers` entry.
|
|
284
|
+
*/
|
|
285
|
+
base_url?: string | null;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Headers copied from the agent's request, by name.
|
|
289
|
+
*/
|
|
290
|
+
forwarded_headers?: Array<string>;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* `true` lets every key on the instance use the server, granted or not.
|
|
294
|
+
*/
|
|
295
|
+
open_to_every_key?: boolean;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Headers sent on every request.
|
|
299
|
+
*/
|
|
300
|
+
static_headers?: { [key: string]: string };
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The operations the API exposes as tools, by tool name. `[]` exposes every
|
|
304
|
+
* operation.
|
|
305
|
+
*/
|
|
306
|
+
tools?: Array<string>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface APIDeleteParams {
|
|
310
|
+
/**
|
|
311
|
+
* The Agent Gateway's `id`.
|
|
312
|
+
*/
|
|
313
|
+
instance_id: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface APIUpdateParams {
|
|
317
|
+
/**
|
|
318
|
+
* Path param: The Agent Gateway's `id`.
|
|
319
|
+
*/
|
|
320
|
+
instance_id: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Body param: How the gateway authenticates to the API. AWS Signature Version 4 is
|
|
324
|
+
* for MCP servers only. Replaced whole on an update.
|
|
325
|
+
*/
|
|
326
|
+
auth?:
|
|
327
|
+
| AgentGatewayNoAuth
|
|
328
|
+
| AgentGatewayStaticAuth
|
|
329
|
+
| AgentGatewayOAuthClientCredentials
|
|
330
|
+
| AgentGatewayPassthroughAuth;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Body param: Where the gateway sends the API's requests. Without it, the gateway
|
|
334
|
+
* takes the description's first `servers` entry.
|
|
335
|
+
*/
|
|
336
|
+
base_url?: string | null;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Body param: Headers copied from the agent's request, by name.
|
|
340
|
+
*/
|
|
341
|
+
forwarded_headers?: Array<string>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Body param: A name for the API, unique on the instance across MCP servers and
|
|
345
|
+
* APIs, regardless of case. Letters, digits, `_`, and `.`. The gateway prefixes
|
|
346
|
+
* the API's tools with it and a hyphen.
|
|
347
|
+
*/
|
|
348
|
+
name?: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Body param: `true` lets every key on the instance use the server, granted or
|
|
352
|
+
* not.
|
|
353
|
+
*/
|
|
354
|
+
open_to_every_key?: boolean;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Body param: The URL of the API's OpenAPI description: OpenAPI 3.0, OpenAPI 3.1,
|
|
358
|
+
* or Swagger 2.0.
|
|
359
|
+
*/
|
|
360
|
+
spec_url?: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Body param: Headers sent on every request.
|
|
364
|
+
*/
|
|
365
|
+
static_headers?: { [key: string]: string };
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Body param: The operations the API exposes as tools, by tool name. `[]` exposes
|
|
369
|
+
* every operation.
|
|
370
|
+
*/
|
|
371
|
+
tools?: Array<string>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export declare namespace APIs {
|
|
375
|
+
export {
|
|
376
|
+
type AgentGatewayAPI as AgentGatewayAPI,
|
|
377
|
+
type AgentGatewayAPIResponse as AgentGatewayAPIResponse,
|
|
378
|
+
type AgentGatewayNoAuth as AgentGatewayNoAuth,
|
|
379
|
+
type AgentGatewayOAuthClientCredentials as AgentGatewayOAuthClientCredentials,
|
|
380
|
+
type AgentGatewayPassthroughAuth as AgentGatewayPassthroughAuth,
|
|
381
|
+
type AgentGatewayShownAuth as AgentGatewayShownAuth,
|
|
382
|
+
type AgentGatewayStaticAuth as AgentGatewayStaticAuth,
|
|
383
|
+
type APIListResponse as APIListResponse,
|
|
384
|
+
type APICreateParams as APICreateParams,
|
|
385
|
+
type APIDeleteParams as APIDeleteParams,
|
|
386
|
+
type APIUpdateParams as APIUpdateParams,
|
|
387
|
+
};
|
|
388
|
+
}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Checks an instance runs on model and tool requests.
|
|
10
|
+
*/
|
|
11
|
+
export class Guardrails extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Lists the instance's guardrails, without their secrets. The instance must be
|
|
14
|
+
* `ready`; otherwise the request answers `409`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const guardrails =
|
|
19
|
+
* await client.agentGateways.guardrails.list(
|
|
20
|
+
* '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
list(instanceID: string, options?: RequestOptions): APIPromise<GuardrailListResponse> {
|
|
25
|
+
return this._client.get(path`/agent_gateways/${instanceID}/guardrails`, options);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Adds a check the instance runs on model and tool requests. It runs on every
|
|
30
|
+
* request when `always_on`, and otherwise on the requests that name it in
|
|
31
|
+
* `guardrails`. The instance must be `ready`; otherwise the request answers `409`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const agentGatewayGuardrailResponse =
|
|
36
|
+
* await client.agentGateways.guardrails.create(
|
|
37
|
+
* '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
38
|
+
* {
|
|
39
|
+
* modes: ['before_request'],
|
|
40
|
+
* name: 'mask-pii',
|
|
41
|
+
* type: 'content_filter',
|
|
42
|
+
* settings: {
|
|
43
|
+
* patterns: [
|
|
44
|
+
* { name: 'us_ssn', action: 'mask' },
|
|
45
|
+
* { name: 'email', action: 'mask' },
|
|
46
|
+
* ],
|
|
47
|
+
* },
|
|
48
|
+
* },
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
create(
|
|
53
|
+
instanceID: string,
|
|
54
|
+
body: GuardrailCreateParams,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<AgentGatewayGuardrailResponse> {
|
|
57
|
+
return this._client.post(path`/agent_gateways/${instanceID}/guardrails`, { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Removes a guardrail and returns it as it was. The instance must be `ready`;
|
|
62
|
+
* otherwise the request answers `409`.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const agentGatewayGuardrailResponse =
|
|
67
|
+
* await client.agentGateways.guardrails.delete(
|
|
68
|
+
* '9645e556-6532-4341-8cab-21b58cdef529',
|
|
69
|
+
* { instance_id: '32ce035d-3165-4031-b1a7-a7c0c259590a' },
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
delete(
|
|
74
|
+
guardrailID: string,
|
|
75
|
+
params: GuardrailDeleteParams,
|
|
76
|
+
options?: RequestOptions,
|
|
77
|
+
): APIPromise<AgentGatewayGuardrailResponse> {
|
|
78
|
+
const { instance_id } = params;
|
|
79
|
+
return this._client.delete(path`/agent_gateways/${instance_id}/guardrails/${guardrailID}`, options);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Changes a guardrail's `name`, `modes`, `always_on`, or `settings`. `settings` is
|
|
84
|
+
* replaced whole, secrets included. The `type` cannot change. The instance must be
|
|
85
|
+
* `ready`; otherwise the request answers `409`.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const agentGatewayGuardrailResponse =
|
|
90
|
+
* await client.agentGateways.guardrails.update(
|
|
91
|
+
* '9645e556-6532-4341-8cab-21b58cdef529',
|
|
92
|
+
* {
|
|
93
|
+
* instance_id: '32ce035d-3165-4031-b1a7-a7c0c259590a',
|
|
94
|
+
* always_on: true,
|
|
95
|
+
* },
|
|
96
|
+
* );
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
update(
|
|
100
|
+
guardrailID: string,
|
|
101
|
+
params: GuardrailUpdateParams,
|
|
102
|
+
options?: RequestOptions,
|
|
103
|
+
): APIPromise<AgentGatewayGuardrailResponse> {
|
|
104
|
+
const { instance_id, ...body } = params;
|
|
105
|
+
return this._client.patch(path`/agent_gateways/${instance_id}/guardrails/${guardrailID}`, {
|
|
106
|
+
body,
|
|
107
|
+
...options,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface AgentGatewayGuardrail {
|
|
113
|
+
/**
|
|
114
|
+
* Identifies the guardrail.
|
|
115
|
+
*/
|
|
116
|
+
id: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Whether it runs on every request.
|
|
120
|
+
*/
|
|
121
|
+
always_on: boolean;
|
|
122
|
+
|
|
123
|
+
created_at: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* When the guardrail runs.
|
|
127
|
+
*/
|
|
128
|
+
modes: Array<
|
|
129
|
+
| 'before_request'
|
|
130
|
+
| 'during_request'
|
|
131
|
+
| 'after_request'
|
|
132
|
+
| 'logging_only'
|
|
133
|
+
| 'before_tool_request'
|
|
134
|
+
| 'during_tool_request'
|
|
135
|
+
| 'after_tool_request'
|
|
136
|
+
>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* What a request names in its `guardrails` field.
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The type's settings. `content_filter`: `patterns` (prebuilt patterns by name,
|
|
145
|
+
* such as `us_ssn` or `email`), `regexes`, `keywords`, and `categories` (such as
|
|
146
|
+
* `prompt_injection`), each with an `action` of `block` or `mask`.
|
|
147
|
+
* `tool_permission`: `rules` (`id`, `tool_name`, `tool_type`, `decision`,
|
|
148
|
+
* `argument_patterns`), a `default` decision, and `on_denied` (`block` or
|
|
149
|
+
* `rewrite`). `model_judge`: a `model` on the instance and weighted `criteria`
|
|
150
|
+
* (`name`, `description`, `weight`, the weights summing to 100). `custom_code`:
|
|
151
|
+
* `code` defining `apply_guardrail(inputs, request_data, input_type)`. `lakera`:
|
|
152
|
+
* `api_key`, `project_id`, `api_base`. `presidio`: `analyzer_url`,
|
|
153
|
+
* `anonymizer_url`, `entities` (entity name to `block` or `mask`), `language`.
|
|
154
|
+
* `bedrock`: `guardrail_id`, `version`, `region`, and `access_key_id` with
|
|
155
|
+
* `secret_access_key`, or `role_name`. `azure_content_safety`: `api_key`,
|
|
156
|
+
* `endpoint`, `severity` (0 to 7). Provider secrets are write-only. Responses
|
|
157
|
+
* leave the secrets out.
|
|
158
|
+
*/
|
|
159
|
+
settings: { [key: string]: unknown };
|
|
160
|
+
|
|
161
|
+
type:
|
|
162
|
+
| 'content_filter'
|
|
163
|
+
| 'tool_permission'
|
|
164
|
+
| 'model_judge'
|
|
165
|
+
| 'custom_code'
|
|
166
|
+
| 'lakera'
|
|
167
|
+
| 'presidio'
|
|
168
|
+
| 'bedrock'
|
|
169
|
+
| 'azure_content_safety';
|
|
170
|
+
|
|
171
|
+
updated_at: string | null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface AgentGatewayGuardrailResponse {
|
|
175
|
+
data: AgentGatewayGuardrail;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface GuardrailListResponse {
|
|
179
|
+
data: Array<AgentGatewayGuardrail>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface GuardrailCreateParams {
|
|
183
|
+
/**
|
|
184
|
+
* When the guardrail runs. Each type runs in some modes only.
|
|
185
|
+
*/
|
|
186
|
+
modes: Array<
|
|
187
|
+
| 'before_request'
|
|
188
|
+
| 'during_request'
|
|
189
|
+
| 'after_request'
|
|
190
|
+
| 'logging_only'
|
|
191
|
+
| 'before_tool_request'
|
|
192
|
+
| 'during_tool_request'
|
|
193
|
+
| 'after_tool_request'
|
|
194
|
+
>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A name, unique on the instance. A request names it in its `guardrails` field.
|
|
198
|
+
*/
|
|
199
|
+
name: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The kind of check. It cannot change after create.
|
|
203
|
+
*/
|
|
204
|
+
type:
|
|
205
|
+
| 'content_filter'
|
|
206
|
+
| 'tool_permission'
|
|
207
|
+
| 'model_judge'
|
|
208
|
+
| 'custom_code'
|
|
209
|
+
| 'lakera'
|
|
210
|
+
| 'presidio'
|
|
211
|
+
| 'bedrock'
|
|
212
|
+
| 'azure_content_safety';
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* `true` runs the guardrail on every request, and a request cannot turn it off.
|
|
216
|
+
* `false` runs it on the requests that name it.
|
|
217
|
+
*/
|
|
218
|
+
always_on?: boolean;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The type's settings. `content_filter`: `patterns` (prebuilt patterns by `name`,
|
|
222
|
+
* such as `us_ssn` or `email`), `regexes` (each a `name`, which tags masked
|
|
223
|
+
* matches, and a `pattern`), `keywords` (each a `keyword`), and `categories` (each
|
|
224
|
+
* a `name`), each entry with an `action` of `block` or `mask`. `tool_permission`:
|
|
225
|
+
* `rules` (`id`, `tool_name`, `tool_type`, `decision`, `argument_patterns`), a
|
|
226
|
+
* `default` decision, and `on_denied` (`block` or `rewrite`). `model_judge`: a
|
|
227
|
+
* `model` on the instance and weighted `criteria` (`name`, `description`,
|
|
228
|
+
* `weight`, the weights summing to 100). `custom_code`: `code` defining
|
|
229
|
+
* `apply_guardrail(inputs, request_data, input_type)`. `lakera`: `api_key`,
|
|
230
|
+
* `project_id`, `api_base`. `presidio`: `analyzer_url`, `anonymizer_url`,
|
|
231
|
+
* `entities` (entity name to `block` or `mask`), `language`. `bedrock`:
|
|
232
|
+
* `guardrail_id`, `version`, `region`, and `access_key_id` with
|
|
233
|
+
* `secret_access_key`, or `role_name`. `azure_content_safety`: `api_key`,
|
|
234
|
+
* `endpoint`, `severity` (0 to 7). Provider secrets are write-only.
|
|
235
|
+
*/
|
|
236
|
+
settings?: { [key: string]: unknown };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface GuardrailDeleteParams {
|
|
240
|
+
/**
|
|
241
|
+
* The Agent Gateway's `id`.
|
|
242
|
+
*/
|
|
243
|
+
instance_id: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface GuardrailUpdateParams {
|
|
247
|
+
/**
|
|
248
|
+
* Path param: The Agent Gateway's `id`.
|
|
249
|
+
*/
|
|
250
|
+
instance_id: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Body param: `true` runs the guardrail on every request, and a request cannot
|
|
254
|
+
* turn it off. `false` runs it on the requests that name it.
|
|
255
|
+
*/
|
|
256
|
+
always_on?: boolean;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Body param: When the guardrail runs. Each type runs in some modes only.
|
|
260
|
+
*/
|
|
261
|
+
modes?: Array<
|
|
262
|
+
| 'before_request'
|
|
263
|
+
| 'during_request'
|
|
264
|
+
| 'after_request'
|
|
265
|
+
| 'logging_only'
|
|
266
|
+
| 'before_tool_request'
|
|
267
|
+
| 'during_tool_request'
|
|
268
|
+
| 'after_tool_request'
|
|
269
|
+
>;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Body param: A name, unique on the instance. A request names it in its
|
|
273
|
+
* `guardrails` field.
|
|
274
|
+
*/
|
|
275
|
+
name?: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Body param: The type's settings. `content_filter`: `patterns` (prebuilt patterns
|
|
279
|
+
* by name, such as `us_ssn` or `email`), `regexes`, `keywords`, and `categories`
|
|
280
|
+
* (such as `prompt_injection`), each with an `action` of `block` or `mask`.
|
|
281
|
+
* `tool_permission`: `rules` (`id`, `tool_name`, `tool_type`, `decision`,
|
|
282
|
+
* `argument_patterns`), a `default` decision, and `on_denied` (`block` or
|
|
283
|
+
* `rewrite`). `model_judge`: a `model` on the instance and weighted `criteria`
|
|
284
|
+
* (`name`, `description`, `weight`, the weights summing to 100). `custom_code`:
|
|
285
|
+
* `code` defining `apply_guardrail(inputs, request_data, input_type)`. `lakera`:
|
|
286
|
+
* `api_key`, `project_id`, `api_base`. `presidio`: `analyzer_url`,
|
|
287
|
+
* `anonymizer_url`, `entities` (entity name to `block` or `mask`), `language`.
|
|
288
|
+
* `bedrock`: `guardrail_id`, `version`, `region`, and `access_key_id` with
|
|
289
|
+
* `secret_access_key`, or `role_name`. `azure_content_safety`: `api_key`,
|
|
290
|
+
* `endpoint`, `severity` (0 to 7). Provider secrets are write-only.
|
|
291
|
+
*/
|
|
292
|
+
settings?: { [key: string]: unknown };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export declare namespace Guardrails {
|
|
296
|
+
export {
|
|
297
|
+
type AgentGatewayGuardrail as AgentGatewayGuardrail,
|
|
298
|
+
type AgentGatewayGuardrailResponse as AgentGatewayGuardrailResponse,
|
|
299
|
+
type GuardrailListResponse as GuardrailListResponse,
|
|
300
|
+
type GuardrailCreateParams as GuardrailCreateParams,
|
|
301
|
+
type GuardrailDeleteParams as GuardrailDeleteParams,
|
|
302
|
+
type GuardrailUpdateParams as GuardrailUpdateParams,
|
|
303
|
+
};
|
|
304
|
+
}
|