diff --git a/.changeset/risk-results-for-agent.md b/.changeset/risk-results-for-agent.md new file mode 100644 index 0000000000..662d21c52c --- /dev/null +++ b/.changeset/risk-results-for-agent.md @@ -0,0 +1,10 @@ +--- +"server": minor +"dashboard": minor +--- + +Adds `risk.results.listForAgent` — a redacted variant of `risk.results.list` for AI assistant / MCP consumption. The new endpoint returns the same fields as `listRiskResults` but replaces the `match` field with `match_redacted`, an opaque token of the form `` where `N` is the byte length and `XXXXXXXX` is the first 8 hex characters of `sha256(match)`. Identical secrets produce identical fingerprints so agents can dedupe leak counts without ever seeing secret content. + +`shadow_mcp` findings pass `match` through verbatim because the value is a server URL or stdio command identifier (already shown unmasked in the dashboard), and exact byte positions are coarsened to a single `position_known` boolean to remove reconstruction signals. + +The dashboard's AI Insights sidebar gains risk-aware suggestions on the Security Overview and Policy Center pages, plus a system-prompt rule that bars the assistant from echoing `match_redacted` values verbatim. diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index db22ba17d5..0d0fff34e4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -19850,6 +19850,176 @@ paths: x-speakeasy-name-override: list x-speakeasy-react-hook: name: RiskListResults + /rpc/risk.results.listForAgent: + get: + description: List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + operationId: listRiskResultsForAgent + parameters: + - allowEmptyValue: true + description: Optional policy ID to filter by. + in: query + name: policy_id + schema: + description: Optional policy ID to filter by. + format: uuid + type: string + - allowEmptyValue: true + description: Optional chat ID to filter by. + in: query + name: chat_id + schema: + description: Optional chat ID to filter by. + format: uuid + type: string + - allowEmptyValue: true + description: Optional rule category key to filter by (e.g. secrets, pii, financial). + in: query + name: category + schema: + description: Optional rule category key to filter by (e.g. secrets, pii, financial). + type: string + - allowEmptyValue: true + description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules). + in: query + name: rule_id + schema: + description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules). + type: string + - allowEmptyValue: true + description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body. + in: query + name: unique_match + schema: + description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body. + type: boolean + - allowEmptyValue: true + description: Filter results to messages created at or after this timestamp (ISO 8601). + in: query + name: from + schema: + description: Filter results to messages created at or after this timestamp (ISO 8601). + format: date-time + type: string + - allowEmptyValue: true + description: Filter results to messages created strictly before this timestamp (ISO 8601). + in: query + name: to + schema: + description: Filter results to messages created strictly before this timestamp (ISO 8601). + format: date-time + type: string + - allowEmptyValue: true + description: Cursor to fetch the next page of results. + in: query + name: cursor + schema: + description: Cursor to fetch the next page of results. + type: string + - allowEmptyValue: true + description: Maximum number of results to return per page. + in: query + name: limit + schema: + description: Maximum number of results to return per page. + format: int64 + maximum: 200 + minimum: 1 + type: integer + - allowEmptyValue: true + description: API Key header + in: header + name: Gram-Key + schema: + description: API Key header + type: string + - allowEmptyValue: true + description: Session header + in: header + name: Gram-Session + schema: + description: Session header + type: string + - allowEmptyValue: true + description: project header + in: header + name: Gram-Project + schema: + description: project header + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListRiskResultsForAgentResult' + description: OK response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'bad_request: request is invalid' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unauthorized: unauthorized access' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'forbidden: permission denied' + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'not_found: resource not found' + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'conflict: resource already exists' + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unsupported_media: unsupported media type' + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'invalid: request contains one or more invalidation fields' + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unexpected: an unexpected error occurred' + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'gateway_error: an unexpected error occurred' + security: + - apikey_header_Gram-Key: [] + project_slug_header_Gram-Project: [] + - project_slug_header_Gram-Project: [] + session_header_Gram-Session: [] + - {} + summary: listRiskResultsForAgent risk + tags: + - risk + x-speakeasy-group: risk.results + x-speakeasy-name-override: listForAgent + x-speakeasy-react-hook: + name: RiskListResultsForAgent /rpc/slack-apps.configure: post: description: Store Slack credentials (client ID, client secret, signing secret) for an app. @@ -32383,6 +32553,24 @@ components: description: Cursor for the next page of results. required: - chats + ListRiskResultsForAgentResult: + type: object + properties: + next_cursor: + type: string + description: Cursor for the next page of results. + results: + type: array + items: + $ref: '#/components/schemas/RiskResultRedacted' + description: The list of risk results with match content redacted to opaque fingerprints. + total_count: + type: integer + description: Total number of findings across all enabled policies. + format: int64 + required: + - results + - total_count ListRiskResultsResult: type: object properties: @@ -35347,6 +35535,72 @@ components: - chat_message_id - source - created_at + RiskResultRedacted: + type: object + properties: + chat_id: + type: string + description: The chat session containing the message. + format: uuid + chat_message_id: + type: string + description: The chat message that was scanned. + format: uuid + chat_title: + type: string + description: Title of the chat session. + confidence: + type: number + description: Confidence score for this finding. + format: double + created_at: + type: string + description: When this result was created. + format: date-time + description: + type: string + description: Human-readable description of the finding. + id: + type: string + description: The result ID. + format: uuid + match_redacted: + type: string + description: Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim. + policy_id: + type: string + description: The risk policy ID. + format: uuid + policy_version: + type: integer + description: Policy version when this result was produced. + format: int64 + position_known: + type: boolean + description: Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks. + rule_id: + type: string + description: The matched rule identifier. + source: + type: string + description: Detection source (e.g. gitleaks, presidio, shadow_mcp). + tags: + type: array + items: + type: string + description: Tags from the detection rule. + user_id: + type: string + description: The user who owns the chat session. + required: + - id + - policy_id + - policy_version + - chat_message_id + - source + - created_at + - match_redacted + - position_known RiskRuleBreakdownEntry: type: object properties: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1296135bbd..5d3438d294 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.761.5 sources: Gram-Internal: sourceNamespace: gram-api-description - sourceRevisionDigest: sha256:ff08946d7176c8b8bc960850b9c70684f888e333b31698357e743c81f1661d17 - sourceBlobDigest: sha256:a92436cb1716ed6f509abf87fdb37f9ea38580973f70cb5c99a45fdf080c7748 + sourceRevisionDigest: sha256:ff26cf6fe2b783e3957d938ce1bfa06663d2cc78ab25a89c9f873cb3db23de15 + sourceBlobDigest: sha256:c7f21640b5d998d4d1635fd4506e943031e25c1354d36fa21bf0bed2385cf91c tags: - latest - 0.0.1 @@ -11,8 +11,10 @@ targets: gram-internal: source: Gram-Internal sourceNamespace: gram-api-description - sourceRevisionDigest: sha256:ff08946d7176c8b8bc960850b9c70684f888e333b31698357e743c81f1661d17 - sourceBlobDigest: sha256:a92436cb1716ed6f509abf87fdb37f9ea38580973f70cb5c99a45fdf080c7748 + sourceRevisionDigest: sha256:ff26cf6fe2b783e3957d938ce1bfa06663d2cc78ab25a89c9f873cb3db23de15 + sourceBlobDigest: sha256:c7f21640b5d998d4d1635fd4506e943031e25c1354d36fa21bf0bed2385cf91c + codeSamplesNamespace: gram-api-description-typescript-code-samples + codeSamplesRevisionDigest: sha256:dfe824dcb045b67c3d505b5af576c90d3fc1188473c05d092505aee956d145d6 workflow: workflowVersion: 1.0.0 speakeasyVersion: pinned diff --git a/client/dashboard/src/components/insights-sidebar.tsx b/client/dashboard/src/components/insights-sidebar.tsx index ee65ed0840..628c30c2b0 100644 --- a/client/dashboard/src/components/insights-sidebar.tsx +++ b/client/dashboard/src/components/insights-sidebar.tsx @@ -285,7 +285,7 @@ export function InsightsProvider({ const sidebarWidth = `min(${SIDEBAR_MAX_WIDTH}px, ${SIDEBAR_MAX_PERCENT}vw)`; // Build system prompt with optional context info. - const baseInstructions = `You are a helpful assistant for analyzing logs in Gram, an AI observability platform. Focus exclusively on log search and analysis. + const baseInstructions = `You are a helpful assistant for analyzing logs and security findings in Gram, an AI observability platform. Focus on log search, tool-call analysis, and risk/policy findings. The current date is ${new Date().toISOString().split("T")[0]}. @@ -298,7 +298,13 @@ When a user asks about logs for a specific user, tenant, customer, or entity: 2. Identify the most relevant attribute and filter on it (e.g. { path: "@user", operator: "eq", values: ["someone@example.com"] }). 3. If no relevant @-prefixed attributes exist, tell the user and fall back to text search instead. -MCP server vs. client breakdowns: \`gram.hook.source\` and \`gram.tool_call.source\` are complementary dimensions, not aliases. \`gram.hook.source\` identifies the agent/client that invoked Gram (e.g. "claude-code", "cursor") — use this for adoption / "who's using us" questions. \`gram.tool_call.source\` identifies the downstream MCP server that handled the call (e.g. "datadog-mcp", "linear") — use this for "top servers" / per-MCP usage questions. When asked about MCP server-level breakdowns, query BOTH dimensions: a server can appear in one and not the other depending on whether you're slicing by caller or callee.`; +MCP server vs. client breakdowns: \`gram.hook.source\` and \`gram.tool_call.source\` are complementary dimensions, not aliases. \`gram.hook.source\` identifies the agent/client that invoked Gram (e.g. "claude-code", "cursor") — use this for adoption / "who's using us" questions. \`gram.tool_call.source\` identifies the downstream MCP server that handled the call (e.g. "datadog-mcp", "linear") — use this for "top servers" / per-MCP usage questions. When asked about MCP server-level breakdowns, query BOTH dimensions: a server can appear in one and not the other depending on whether you're slicing by caller or callee. + +Risk and policy findings: +- A risk policy scans chat messages for issues. Each \`source\` is a detector family: \`gitleaks\` (regex-based secret scanners — API keys, tokens), \`presidio\` (PII entities — emails, SSNs, credit cards), \`prompt_injection\` (heuristic + ML classifier for injection attempts), \`destructive_tool\` (tool calls matching destructive intent), \`shadow_mcp\` (calls to MCP servers not on an approved list). +- Use \`listRiskResultsForAgent\` for finding-level data — it returns the same shape as the dashboard's findings list but with the raw \`match\` field replaced by \`match_redacted\`: an opaque token of the form \`\` for secret-bearing sources, or the literal server identifier for \`shadow_mcp\`. The \`sha\` prefix is deterministic, so two findings of the same secret share a fingerprint — that's how you dedupe leak counts across chats without seeing the secret. +- Use \`listRiskResultsByChat\` for chat-level rollups (findings_count, latest_detected), \`listRiskPolicies\` for the policy catalog, and \`getRiskPolicyStatus\` for analysis progress (pending vs analyzed counts, workflow state). +- HARD RULE — never quote or repeat a \`match_redacted\` value, never attempt to reconstruct a redacted secret, and never echo any string that looks like an API key, token, password, or PII. Refer to findings by their \`rule_id\` (e.g. "aws-access-key-id"), \`source\` family, and \`chat_id\`. \`shadow_mcp\` matches (server URLs / stdio commands) are safe to name verbatim.`; const systemPrompt = contextInfo ? `${baseInstructions} diff --git a/client/dashboard/src/pages/security/PolicyCenter.tsx b/client/dashboard/src/pages/security/PolicyCenter.tsx index c95745a9e3..6e4a21fd8c 100644 --- a/client/dashboard/src/pages/security/PolicyCenter.tsx +++ b/client/dashboard/src/pages/security/PolicyCenter.tsx @@ -1,3 +1,4 @@ +import { InsightsConfig } from "@/components/insights-sidebar"; import { Page } from "@/components/page-layout"; import { RequireScope } from "@/components/require-scope"; import { Badge } from "@/components/ui/badge"; @@ -359,12 +360,54 @@ function PolicyCenterContent() { ); } + const enabledPolicies = policies.filter((p) => p.enabled); + const insightsContext = [ + "Page: Policy Center.", + `Total policies: ${policies.length}, enabled: ${enabledPolicies.length}.`, + `Policy actions: ${policies.map((p) => `${p.name} (${p.action})`).join(", ") || "none"}.`, + "Available risk tools: listRiskPolicies, getRiskPolicy, getRiskCapabilities, getRiskPolicyStatus, listRiskResultsForAgent (finding-level with match redaction), listRiskResultsByChat, listShadowMCPApprovals.", + "Never echo match_redacted values verbatim. Refer to findings by rule_id and source.", + ].join(" "); + + const insightsSuggestions = [ + { + title: "Policy status snapshot", + label: "what's running and what's stuck", + prompt: + "For each policy returned by listRiskPolicies, call getRiskPolicyStatus and report: enabled flag, action (flag vs block), total messages, pending messages, and workflow state. Flag any policy with non-zero pending messages.", + }, + { + title: "Quiet policies", + label: "policies with no recent findings", + prompt: + "Identify policies that have not produced any findings in the last 30 days. Use listRiskResultsForAgent with policy_id to check each policy. Report by name and last-seen finding date.", + }, + { + title: "Coverage by source", + label: "what's each source catching", + prompt: + "Group findings by source (gitleaks, presidio, prompt_injection, shadow_mcp, destructive_tool) over the last 7 days using listRiskResultsForAgent. Report counts and the top rule_id per source family.", + }, + { + title: "Capabilities check", + label: "what detectors are available", + prompt: + "Call getRiskCapabilities and tell me which detection backends are configured on this server (e.g. prompt-injection ML classifier).", + }, + ]; + return ( +

Risk Policies

diff --git a/client/dashboard/src/pages/security/SecurityOverview.tsx b/client/dashboard/src/pages/security/SecurityOverview.tsx index 45319aef08..fe1e66a637 100644 --- a/client/dashboard/src/pages/security/SecurityOverview.tsx +++ b/client/dashboard/src/pages/security/SecurityOverview.tsx @@ -1,6 +1,7 @@ import { MetricCard } from "@/components/chart/MetricCard"; import { ChartCard } from "@/components/chart/ChartCard"; import { formatChartLabel } from "@/components/chart/chartUtils"; +import { InsightsConfig } from "@/components/insights-sidebar"; import { Page } from "@/components/page-layout"; import { RequireScope } from "@/components/require-scope"; import { DashboardCard } from "@/components/ui/dashboard-card"; @@ -332,8 +333,56 @@ function SecurityOverviewContent() { const hasFindings = overview.findings > 0; + // Brief security-flavoured context for the AI Insights sidebar. Numbers are + // pulled from the current risk overview query so the assistant can reason + // about "this period" without re-fetching, but it must still call the risk + // tools for anything that isn't a top-line metric. + const insightsContext = [ + "Page: Security Overview.", + `Selected date range: ${rangeLabel}.`, + `Active risk policies: ${overview.activePolicies}.`, + `Findings in current range: ${overview.findings}.`, + `Messages scanned: ${overview.messagesScanned}.`, + `Flagged sessions: ${overview.flaggedSessions}.`, + "Available risk tools: listRiskResultsForAgent (finding-level, match is redacted to ), listRiskResultsByChat (chat-level rollups), listRiskPolicies, getRiskPolicyStatus, listShadowMCPApprovals.", + "Never echo match_redacted values verbatim. Refer to findings by rule_id and source.", + ].join(" "); + + const insightsSuggestions = [ + { + title: "Top rules this week", + label: "which rule_ids fired most", + prompt: + "Use listRiskResultsForAgent to find the top 5 rule_ids by finding count over the last 7 days. Report by source family and rule_id only — never quote any match_redacted value.", + }, + { + title: "Shadow MCP servers", + label: "unapproved MCPs in use", + prompt: + "List all shadow_mcp findings across the project. For each, name the MCP server identifier (match), the chat_id, and when it was first observed. These match values are server URLs/commands and are safe to name.", + }, + { + title: "Unique leaked secrets", + label: "dedupe by fingerprint", + prompt: + "Use listRiskResultsForAgent to count distinct leaked secrets by their match_redacted fingerprint (since identical secrets share a sha prefix). Group by rule_id and report counts. Do not print match_redacted values back to me.", + }, + { + title: "Analysis backlog", + label: "pending messages per policy", + prompt: + "For each active policy, call getRiskPolicyStatus and report pending vs analyzed message counts and workflow state. Flag any policy whose pending count is non-zero.", + }, + ]; + return ( <> +
", ""], "user_id": ""} + application/json: {"role_id": "", "user_id": ""} responses: "200": - application/json: {"email": "Connie_Bayer@hotmail.com", "id": "", "joined_at": "2024-12-28T07:55:09.816Z", "name": "", "role_ids": []} + application/json: {"email": "Connie_Bayer@hotmail.com", "id": "", "joined_at": "2024-12-28T07:55:09.816Z", "name": "", "role_id": ""} "400": application/json: {"fault": false, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": true, "timeout": true} "500": @@ -9902,6 +9926,15 @@ examples: application/json: {"fault": true, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": true, "timeout": true} "500": application/json: {"fault": true, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": true, "timeout": true} + listRiskResultsForAgent: + speakeasy-default-list-risk-results-for-agent: + responses: + "200": + application/json: {"results": [{"chat_message_id": "85523fdc-294e-46eb-80ad-c5d3dbfbce6c", "created_at": "2025-02-15T11:28:44.474Z", "id": "7529b6c3-c4e3-404d-b3bf-51c1706f2715", "match_redacted": "", "policy_id": "6391ece6-67aa-48d4-82d4-f168c2cc7ae8", "policy_version": 657869, "position_known": true, "source": ""}], "total_count": 878955} + "400": + application/json: {"fault": false, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": false, "timeout": true} + "500": + application/json: {"fault": false, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": false, "timeout": true} checkMcpEndpointSlugAvailability: speakeasy-default-check-mcp-endpoint-slug-availability: parameters: @@ -9918,7 +9951,7 @@ examples: speakeasy-default-get-risk-overview: responses: "200": - application/json: {"active_policies": 705076, "findings": 627926, "flagged_sessions": 304659, "from": "2026-06-19T12:28:06.346Z", "messages_scanned": 370773, "time_series_findings": [{"bucket_start": "2024-12-08T02:32:23.245Z", "category": "", "findings": 627926}], "to": "2025-12-13T22:42:16.392Z", "top_categories": [], "top_rules": [{"findings": 312140, "rule_id": "", "source": ""}], "top_users": [{"email": "Ocie.Corwin@gmail.com", "external_user_id": "", "findings": 58689}]} + application/json: {"active_policies": 705076, "findings": 312140, "flagged_sessions": 627926, "from": "2024-11-29T21:45:00.489Z", "messages_scanned": 821642, "time_series_findings": [], "to": "2025-12-13T22:42:16.392Z", "top_categories": [], "top_rules": [{"findings": 312140, "rule_id": "", "source": ""}], "top_users": [{"email": "Ocie.Corwin@gmail.com", "external_user_id": "", "findings": 58689}]} "400": application/json: {"fault": true, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": true, "timeout": false} "500": diff --git a/client/sdk/README.md b/client/sdk/README.md index 314aa6a8e3..8d84d807c1 100644 --- a/client/sdk/README.md +++ b/client/sdk/README.md @@ -444,6 +444,7 @@ run(); * [byChat](docs/sdks/results/README.md#bychat) - listRiskResultsByChat risk * [list](docs/sdks/results/README.md#list) - listRiskResults risk +* [listForAgent](docs/sdks/results/README.md#listforagent) - listRiskResultsForAgent risk ### [Slack](docs/sdks/slack/README.md) @@ -763,6 +764,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`riskPoliciesUpdate`](docs/sdks/policies/README.md#update) - updateRiskPolicy risk - [`riskResultsByChat`](docs/sdks/results/README.md#bychat) - listRiskResultsByChat risk - [`riskResultsList`](docs/sdks/results/README.md#list) - listRiskResults risk +- [`riskResultsListForAgent`](docs/sdks/results/README.md#listforagent) - listRiskResultsForAgent risk - [`slackConfigureSlackApp`](docs/sdks/slack/README.md#configureslackapp) - configureSlackApp slack - [`slackCreateSlackApp`](docs/sdks/slack/README.md#createslackapp) - createSlackApp slack - [`slackDeleteSlackApp`](docs/sdks/slack/README.md#deleteslackapp) - deleteSlackApp slack @@ -1050,6 +1052,7 @@ To learn about this feature and how to get started, check - [`useRiskListPolicies`](docs/sdks/policies/README.md#list) - listRiskPolicies risk - [`useRiskListResults`](docs/sdks/results/README.md#list) - listRiskResults risk - [`useRiskListResultsByChat`](docs/sdks/results/README.md#bychat) - listRiskResultsByChat risk +- [`useRiskListResultsForAgent`](docs/sdks/results/README.md#listforagent) - listRiskResultsForAgent risk - [`useRiskListShadowMCPApprovals`](docs/sdks/approvals/README.md#list) - listShadowMCPApprovals risk - [`useRiskOverview`](docs/sdks/overview/README.md#get) - getRiskOverview risk - [`useRiskPoliciesDeleteMutation`](docs/sdks/policies/README.md#delete) - deleteRiskPolicy risk diff --git a/client/sdk/src/funcs/riskResultsListForAgent.ts b/client/sdk/src/funcs/riskResultsListForAgent.ts new file mode 100644 index 0000000000..d5142e9734 --- /dev/null +++ b/client/sdk/src/funcs/riskResultsListForAgent.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4-mini"; +import { GramCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { resolveSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { GramError } from "../models/errors/gramerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * listRiskResultsForAgent risk + * + * @remarks + * List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + */ +export function riskResultsListForAgent( + client: GramCore, + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: RequestOptions, +): APIPromise< + Result< + components.ListRiskResultsForAgentResult, + | errors.ServiceError + | GramError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + security, + options, + )); +} + +async function $do( + client: GramCore, + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.ListRiskResultsForAgentResult, + | errors.ServiceError + | GramError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + z.parse( + z.optional(operations.ListRiskResultsForAgentRequest$outboundSchema), + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/rpc/risk.results.listForAgent")(); + + const query = encodeFormQuery({ + "category": payload?.category, + "chat_id": payload?.chat_id, + "cursor": payload?.cursor, + "from": payload?.from, + "limit": payload?.limit, + "policy_id": payload?.policy_id, + "rule_id": payload?.rule_id, + "to": payload?.to, + "unique_match": payload?.unique_match, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "Gram-Key": encodeSimple("Gram-Key", payload?.["Gram-Key"], { + explode: false, + charEncoding: "none", + }), + "Gram-Project": encodeSimple("Gram-Project", payload?.["Gram-Project"], { + explode: false, + charEncoding: "none", + }), + "Gram-Session": encodeSimple("Gram-Session", payload?.["Gram-Session"], { + explode: false, + charEncoding: "none", + }), + })); + + const requestSecurity = resolveSecurity( + [ + { + fieldName: "Gram-Key", + type: "apiKey:header", + value: security?.option1?.apikeyHeaderGramKey, + }, + { + fieldName: "Gram-Project", + type: "apiKey:header", + value: security?.option1?.projectSlugHeaderGramProject, + }, + ], + [ + { + fieldName: "Gram-Project", + type: "apiKey:header", + value: security?.option2?.projectSlugHeaderGramProject, + }, + { + fieldName: "Gram-Session", + type: "apiKey:header", + value: security?.option2?.sessionHeaderGramSession, + }, + ], + ); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listRiskResultsForAgent", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "409", + "415", + "422", + "4XX", + "500", + "502", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ListRiskResultsForAgentResult, + | errors.ServiceError + | GramError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.ListRiskResultsForAgentResult$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 409, 415, 422], + errors.ServiceError$inboundSchema, + ), + M.jsonErr([500, 502], errors.ServiceError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/client/sdk/src/models/components/index.ts b/client/sdk/src/models/components/index.ts index d1dbf8f720..6276d0deca 100644 --- a/client/sdk/src/models/components/index.ts +++ b/client/sdk/src/models/components/index.ts @@ -176,6 +176,7 @@ export * from "./listresourcesresult.js"; export * from "./listresponsebody.js"; export * from "./listriskpoliciesresult.js"; export * from "./listriskresultsbychatresult.js"; +export * from "./listriskresultsforagentresult.js"; export * from "./listriskresultsresult.js"; export * from "./listrolegrant.js"; export * from "./listrolesresult.js"; @@ -289,6 +290,7 @@ export * from "./riskoverviewuser.js"; export * from "./riskpolicy.js"; export * from "./riskpolicystatus.js"; export * from "./riskresult.js"; +export * from "./riskresultredacted.js"; export * from "./riskrulebreakdownentry.js"; export * from "./riskrulebreakdownresult.js"; export * from "./riskuserbreakdownresult.js"; diff --git a/client/sdk/src/models/components/listriskresultsforagentresult.ts b/client/sdk/src/models/components/listriskresultsforagentresult.ts new file mode 100644 index 0000000000..5bc5e55b15 --- /dev/null +++ b/client/sdk/src/models/components/listriskresultsforagentresult.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4-mini"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RiskResultRedacted, + RiskResultRedacted$inboundSchema, +} from "./riskresultredacted.js"; + +export type ListRiskResultsForAgentResult = { + /** + * Cursor for the next page of results. + */ + nextCursor?: string | undefined; + /** + * The list of risk results with match content redacted to opaque fingerprints. + */ + results: Array; + /** + * Total number of findings across all enabled policies. + */ + totalCount: number; +}; + +/** @internal */ +export const ListRiskResultsForAgentResult$inboundSchema: z.ZodMiniType< + ListRiskResultsForAgentResult, + unknown +> = z.pipe( + z.object({ + next_cursor: z.optional(z.string()), + results: z.array(RiskResultRedacted$inboundSchema), + total_count: z.int(), + }), + z.transform((v) => { + return remap$(v, { + "next_cursor": "nextCursor", + "total_count": "totalCount", + }); + }), +); + +export function listRiskResultsForAgentResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListRiskResultsForAgentResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListRiskResultsForAgentResult' from JSON`, + ); +} diff --git a/client/sdk/src/models/components/riskresultredacted.ts b/client/sdk/src/models/components/riskresultredacted.ts new file mode 100644 index 0000000000..938e73ea92 --- /dev/null +++ b/client/sdk/src/models/components/riskresultredacted.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4-mini"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RiskResultRedacted = { + /** + * The chat session containing the message. + */ + chatId?: string | undefined; + /** + * The chat message that was scanned. + */ + chatMessageId: string; + /** + * Title of the chat session. + */ + chatTitle?: string | undefined; + /** + * Confidence score for this finding. + */ + confidence?: number | undefined; + /** + * When this result was created. + */ + createdAt: Date; + /** + * Human-readable description of the finding. + */ + description?: string | undefined; + /** + * The result ID. + */ + id: string; + /** + * Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim. + */ + matchRedacted: string; + /** + * The risk policy ID. + */ + policyId: string; + /** + * Policy version when this result was produced. + */ + policyVersion: number; + /** + * Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks. + */ + positionKnown: boolean; + /** + * The matched rule identifier. + */ + ruleId?: string | undefined; + /** + * Detection source (e.g. gitleaks, presidio, shadow_mcp). + */ + source: string; + /** + * Tags from the detection rule. + */ + tags?: Array | undefined; + /** + * The user who owns the chat session. + */ + userId?: string | undefined; +}; + +/** @internal */ +export const RiskResultRedacted$inboundSchema: z.ZodMiniType< + RiskResultRedacted, + unknown +> = z.pipe( + z.object({ + chat_id: z.optional(z.string()), + chat_message_id: z.string(), + chat_title: z.optional(z.string()), + confidence: z.optional(z.number()), + created_at: z.pipe( + z.iso.datetime({ offset: true }), + z.transform(v => new Date(v)), + ), + description: z.optional(z.string()), + id: z.string(), + match_redacted: z.string(), + policy_id: z.string(), + policy_version: z.int(), + position_known: z.boolean(), + rule_id: z.optional(z.string()), + source: z.string(), + tags: z.optional(z.array(z.string())), + user_id: z.optional(z.string()), + }), + z.transform((v) => { + return remap$(v, { + "chat_id": "chatId", + "chat_message_id": "chatMessageId", + "chat_title": "chatTitle", + "created_at": "createdAt", + "match_redacted": "matchRedacted", + "policy_id": "policyId", + "policy_version": "policyVersion", + "position_known": "positionKnown", + "rule_id": "ruleId", + "user_id": "userId", + }); + }), +); + +export function riskResultRedactedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RiskResultRedacted$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RiskResultRedacted' from JSON`, + ); +} diff --git a/client/sdk/src/models/operations/index.ts b/client/sdk/src/models/operations/index.ts index 80bca6fd87..bcd8bb439b 100644 --- a/client/sdk/src/models/operations/index.ts +++ b/client/sdk/src/models/operations/index.ts @@ -172,6 +172,7 @@ export * from "./listriskcategories.js"; export * from "./listriskpolicies.js"; export * from "./listriskresults.js"; export * from "./listriskresultsbychat.js"; +export * from "./listriskresultsforagent.js"; export * from "./listroles.js"; export * from "./listscopes.js"; export * from "./listservernameoverrides.js"; diff --git a/client/sdk/src/models/operations/listriskresultsforagent.ts b/client/sdk/src/models/operations/listriskresultsforagent.ts new file mode 100644 index 0000000000..246b71543a --- /dev/null +++ b/client/sdk/src/models/operations/listriskresultsforagent.ts @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4-mini"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ListRiskResultsForAgentSecurityOption1 = { + apikeyHeaderGramKey: string; + projectSlugHeaderGramProject: string; +}; + +export type ListRiskResultsForAgentSecurityOption2 = { + projectSlugHeaderGramProject: string; + sessionHeaderGramSession: string; +}; + +export type ListRiskResultsForAgentSecurity = { + option1?: ListRiskResultsForAgentSecurityOption1 | undefined; + option2?: ListRiskResultsForAgentSecurityOption2 | undefined; +}; + +export type ListRiskResultsForAgentRequest = { + /** + * Optional policy ID to filter by. + */ + policyId?: string | undefined; + /** + * Optional chat ID to filter by. + */ + chatId?: string | undefined; + /** + * Optional rule category key to filter by (e.g. secrets, pii, financial). + */ + category?: string | undefined; + /** + * Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules). + */ + ruleId?: string | undefined; + /** + * If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body. + */ + uniqueMatch?: boolean | undefined; + /** + * Filter results to messages created at or after this timestamp (ISO 8601). + */ + from?: Date | undefined; + /** + * Filter results to messages created strictly before this timestamp (ISO 8601). + */ + to?: Date | undefined; + /** + * Cursor to fetch the next page of results. + */ + cursor?: string | undefined; + /** + * Maximum number of results to return per page. + */ + limit?: number | undefined; + /** + * API Key header + */ + gramKey?: string | undefined; + /** + * Session header + */ + gramSession?: string | undefined; + /** + * project header + */ + gramProject?: string | undefined; +}; + +/** @internal */ +export type ListRiskResultsForAgentSecurityOption1$Outbound = { + "apikey_header_Gram-Key": string; + "project_slug_header_Gram-Project": string; +}; + +/** @internal */ +export const ListRiskResultsForAgentSecurityOption1$outboundSchema: + z.ZodMiniType< + ListRiskResultsForAgentSecurityOption1$Outbound, + ListRiskResultsForAgentSecurityOption1 + > = z.pipe( + z.object({ + apikeyHeaderGramKey: z.string(), + projectSlugHeaderGramProject: z.string(), + }), + z.transform((v) => { + return remap$(v, { + apikeyHeaderGramKey: "apikey_header_Gram-Key", + projectSlugHeaderGramProject: "project_slug_header_Gram-Project", + }); + }), + ); + +export function listRiskResultsForAgentSecurityOption1ToJSON( + listRiskResultsForAgentSecurityOption1: + ListRiskResultsForAgentSecurityOption1, +): string { + return JSON.stringify( + ListRiskResultsForAgentSecurityOption1$outboundSchema.parse( + listRiskResultsForAgentSecurityOption1, + ), + ); +} + +/** @internal */ +export type ListRiskResultsForAgentSecurityOption2$Outbound = { + "project_slug_header_Gram-Project": string; + "session_header_Gram-Session": string; +}; + +/** @internal */ +export const ListRiskResultsForAgentSecurityOption2$outboundSchema: + z.ZodMiniType< + ListRiskResultsForAgentSecurityOption2$Outbound, + ListRiskResultsForAgentSecurityOption2 + > = z.pipe( + z.object({ + projectSlugHeaderGramProject: z.string(), + sessionHeaderGramSession: z.string(), + }), + z.transform((v) => { + return remap$(v, { + projectSlugHeaderGramProject: "project_slug_header_Gram-Project", + sessionHeaderGramSession: "session_header_Gram-Session", + }); + }), + ); + +export function listRiskResultsForAgentSecurityOption2ToJSON( + listRiskResultsForAgentSecurityOption2: + ListRiskResultsForAgentSecurityOption2, +): string { + return JSON.stringify( + ListRiskResultsForAgentSecurityOption2$outboundSchema.parse( + listRiskResultsForAgentSecurityOption2, + ), + ); +} + +/** @internal */ +export type ListRiskResultsForAgentSecurity$Outbound = { + Option1?: ListRiskResultsForAgentSecurityOption1$Outbound | undefined; + Option2?: ListRiskResultsForAgentSecurityOption2$Outbound | undefined; +}; + +/** @internal */ +export const ListRiskResultsForAgentSecurity$outboundSchema: z.ZodMiniType< + ListRiskResultsForAgentSecurity$Outbound, + ListRiskResultsForAgentSecurity +> = z.pipe( + z.object({ + option1: z.optional( + z.lazy(() => ListRiskResultsForAgentSecurityOption1$outboundSchema), + ), + option2: z.optional( + z.lazy(() => ListRiskResultsForAgentSecurityOption2$outboundSchema), + ), + }), + z.transform((v) => { + return remap$(v, { + option1: "Option1", + option2: "Option2", + }); + }), +); + +export function listRiskResultsForAgentSecurityToJSON( + listRiskResultsForAgentSecurity: ListRiskResultsForAgentSecurity, +): string { + return JSON.stringify( + ListRiskResultsForAgentSecurity$outboundSchema.parse( + listRiskResultsForAgentSecurity, + ), + ); +} + +/** @internal */ +export type ListRiskResultsForAgentRequest$Outbound = { + policy_id?: string | undefined; + chat_id?: string | undefined; + category?: string | undefined; + rule_id?: string | undefined; + unique_match?: boolean | undefined; + from?: string | undefined; + to?: string | undefined; + cursor?: string | undefined; + limit?: number | undefined; + "Gram-Key"?: string | undefined; + "Gram-Session"?: string | undefined; + "Gram-Project"?: string | undefined; +}; + +/** @internal */ +export const ListRiskResultsForAgentRequest$outboundSchema: z.ZodMiniType< + ListRiskResultsForAgentRequest$Outbound, + ListRiskResultsForAgentRequest +> = z.pipe( + z.object({ + policyId: z.optional(z.string()), + chatId: z.optional(z.string()), + category: z.optional(z.string()), + ruleId: z.optional(z.string()), + uniqueMatch: z.optional(z.boolean()), + from: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))), + to: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))), + cursor: z.optional(z.string()), + limit: z.optional(z.int()), + gramKey: z.optional(z.string()), + gramSession: z.optional(z.string()), + gramProject: z.optional(z.string()), + }), + z.transform((v) => { + return remap$(v, { + policyId: "policy_id", + chatId: "chat_id", + ruleId: "rule_id", + uniqueMatch: "unique_match", + gramKey: "Gram-Key", + gramSession: "Gram-Session", + gramProject: "Gram-Project", + }); + }), +); + +export function listRiskResultsForAgentRequestToJSON( + listRiskResultsForAgentRequest: ListRiskResultsForAgentRequest, +): string { + return JSON.stringify( + ListRiskResultsForAgentRequest$outboundSchema.parse( + listRiskResultsForAgentRequest, + ), + ); +} diff --git a/client/sdk/src/react-query/index.ts b/client/sdk/src/react-query/index.ts index 76231ef55a..bf49d1d8c2 100644 --- a/client/sdk/src/react-query/index.ts +++ b/client/sdk/src/react-query/index.ts @@ -198,6 +198,7 @@ export * from "./riskCreatePolicy.js"; export * from "./riskListPolicies.js"; export * from "./riskListResults.js"; export * from "./riskListResultsByChat.js"; +export * from "./riskListResultsForAgent.js"; export * from "./riskListShadowMCPApprovals.js"; export * from "./riskOverview.js"; export * from "./riskPoliciesDelete.js"; diff --git a/client/sdk/src/react-query/riskListResultsForAgent.core.ts b/client/sdk/src/react-query/riskListResultsForAgent.core.ts new file mode 100644 index 0000000000..fd8b1fd690 --- /dev/null +++ b/client/sdk/src/react-query/riskListResultsForAgent.core.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GramCore } from "../core.js"; +import { riskResultsListForAgent } from "../funcs/riskResultsListForAgent.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type RiskListResultsForAgentQueryData = + components.ListRiskResultsForAgentResult; + +export function prefetchRiskListResultsForAgent( + queryClient: QueryClient, + client$: GramCore, + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildRiskListResultsForAgentQuery( + client$, + request, + security, + options, + ), + }); +} + +export function buildRiskListResultsForAgentQuery( + client$: GramCore, + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeyRiskListResultsForAgent({ + policyId: request?.policyId, + chatId: request?.chatId, + category: request?.category, + ruleId: request?.ruleId, + uniqueMatch: request?.uniqueMatch, + from: request?.from, + to: request?.to, + cursor: request?.cursor, + limit: request?.limit, + gramKey: request?.gramKey, + gramSession: request?.gramSession, + gramProject: request?.gramProject, + }), + queryFn: async function riskListResultsForAgentQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(riskResultsListForAgent( + client$, + request, + security, + mergedOptions, + )); + }, + }; +} + +export function queryKeyRiskListResultsForAgent( + parameters: { + policyId?: string | undefined; + chatId?: string | undefined; + category?: string | undefined; + ruleId?: string | undefined; + uniqueMatch?: boolean | undefined; + from?: Date | undefined; + to?: Date | undefined; + cursor?: string | undefined; + limit?: number | undefined; + gramKey?: string | undefined; + gramSession?: string | undefined; + gramProject?: string | undefined; + }, +): QueryKey { + return ["@gram/client", "results", "listForAgent", parameters]; +} diff --git a/client/sdk/src/react-query/riskListResultsForAgent.ts b/client/sdk/src/react-query/riskListResultsForAgent.ts new file mode 100644 index 0000000000..6b613fc738 --- /dev/null +++ b/client/sdk/src/react-query/riskListResultsForAgent.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GramError } from "../models/errors/gramerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { useGramContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + buildRiskListResultsForAgentQuery, + prefetchRiskListResultsForAgent, + queryKeyRiskListResultsForAgent, + RiskListResultsForAgentQueryData, +} from "./riskListResultsForAgent.core.js"; +export { + buildRiskListResultsForAgentQuery, + prefetchRiskListResultsForAgent, + queryKeyRiskListResultsForAgent, + type RiskListResultsForAgentQueryData, +}; + +export type RiskListResultsForAgentQueryError = + | errors.ServiceError + | GramError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * listRiskResultsForAgent risk + * + * @remarks + * List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + */ +export function useRiskListResultsForAgent( + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: QueryHookOptions< + RiskListResultsForAgentQueryData, + RiskListResultsForAgentQueryError + >, +): UseQueryResult< + RiskListResultsForAgentQueryData, + RiskListResultsForAgentQueryError +> { + const client = useGramContext(); + return useQuery({ + ...buildRiskListResultsForAgentQuery( + client, + request, + security, + options, + ), + ...options, + }); +} + +/** + * listRiskResultsForAgent risk + * + * @remarks + * List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + */ +export function useRiskListResultsForAgentSuspense( + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: SuspenseQueryHookOptions< + RiskListResultsForAgentQueryData, + RiskListResultsForAgentQueryError + >, +): UseSuspenseQueryResult< + RiskListResultsForAgentQueryData, + RiskListResultsForAgentQueryError +> { + const client = useGramContext(); + return useSuspenseQuery({ + ...buildRiskListResultsForAgentQuery( + client, + request, + security, + options, + ), + ...options, + }); +} + +export function setRiskListResultsForAgentData( + client: QueryClient, + queryKeyBase: [ + parameters: { + policyId?: string | undefined; + chatId?: string | undefined; + category?: string | undefined; + ruleId?: string | undefined; + uniqueMatch?: boolean | undefined; + from?: Date | undefined; + to?: Date | undefined; + cursor?: string | undefined; + limit?: number | undefined; + gramKey?: string | undefined; + gramSession?: string | undefined; + gramProject?: string | undefined; + }, + ], + data: RiskListResultsForAgentQueryData, +): RiskListResultsForAgentQueryData | undefined { + const key = queryKeyRiskListResultsForAgent(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateRiskListResultsForAgent( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [parameters: { + policyId?: string | undefined; + chatId?: string | undefined; + category?: string | undefined; + ruleId?: string | undefined; + uniqueMatch?: boolean | undefined; + from?: Date | undefined; + to?: Date | undefined; + cursor?: string | undefined; + limit?: number | undefined; + gramKey?: string | undefined; + gramSession?: string | undefined; + gramProject?: string | undefined; + }] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gram/client", "results", "listForAgent", ...queryKeyBase], + }); +} + +export function invalidateAllRiskListResultsForAgent( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gram/client", "results", "listForAgent"], + }); +} diff --git a/client/sdk/src/sdk/results.ts b/client/sdk/src/sdk/results.ts index 334e12ebbc..eeeccf1cba 100644 --- a/client/sdk/src/sdk/results.ts +++ b/client/sdk/src/sdk/results.ts @@ -4,6 +4,7 @@ import { riskResultsByChat } from "../funcs/riskResultsByChat.js"; import { riskResultsList } from "../funcs/riskResultsList.js"; +import { riskResultsListForAgent } from "../funcs/riskResultsListForAgent.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -47,4 +48,23 @@ export class Results extends ClientSDK { options, )); } + + /** + * listRiskResultsForAgent risk + * + * @remarks + * List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + */ + async listForAgent( + request?: operations.ListRiskResultsForAgentRequest | undefined, + security?: operations.ListRiskResultsForAgentSecurity | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(riskResultsListForAgent( + this, + request, + security, + options, + )); + } } diff --git a/server/design/risk/design.go b/server/design/risk/design.go index 9c5f34c10e..f6e78f0018 100644 --- a/server/design/risk/design.go +++ b/server/design/risk/design.go @@ -248,6 +248,60 @@ var _ = Service("risk", func() { Meta("openapi:extension:x-speakeasy-react-hook", `{"name": "RiskListResults"}`) }) + Method("listRiskResultsForAgent", func() { + Description("List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim.") + + Payload(func() { + security.ByKeyPayload() + security.SessionPayload() + security.ProjectPayload() + Attribute("policy_id", String, "Optional policy ID to filter by.", func() { + Format(FormatUUID) + }) + Attribute("chat_id", String, "Optional chat ID to filter by.", func() { + Format(FormatUUID) + }) + Attribute("category", String, "Optional rule category key to filter by (e.g. secrets, pii, financial).") + Attribute("rule_id", String, "Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).") + Attribute("unique_match", Boolean, "If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.") + Attribute("from", String, "Filter results to messages created at or after this timestamp (ISO 8601).", func() { + Format(FormatDateTime) + }) + Attribute("to", String, "Filter results to messages created strictly before this timestamp (ISO 8601).", func() { + Format(FormatDateTime) + }) + Attribute("cursor", String, "Cursor to fetch the next page of results.") + Attribute("limit", Int, "Maximum number of results to return per page.", func() { + Minimum(1) + Maximum(200) + }) + }) + + Result(ListRiskResultsForAgentResult) + + HTTP(func() { + GET("/rpc/risk.results.listForAgent") + security.ByKeyHeader() + security.SessionHeader() + security.ProjectHeader() + Param("policy_id") + Param("chat_id") + Param("category") + Param("rule_id") + Param("unique_match") + Param("from") + Param("to") + Param("cursor") + Param("limit") + Response(StatusOK) + }) + + Meta("openapi:operationId", "listRiskResultsForAgent") + Meta("openapi:extension:x-speakeasy-group", "risk.results") + Meta("openapi:extension:x-speakeasy-name-override", "listForAgent") + Meta("openapi:extension:x-speakeasy-react-hook", `{"name": "RiskListResultsForAgent"}`) + }) + Method("listRiskResultsByChat", func() { Description("List risk results grouped by chat session for the current project.") @@ -577,6 +631,13 @@ var ListRiskResultsResult = Type("ListRiskResultsResult", func() { Required("results", "total_count") }) +var ListRiskResultsForAgentResult = Type("ListRiskResultsForAgentResult", func() { + Attribute("results", ArrayOf(shared.RiskResultRedacted), "The list of risk results with match content redacted to opaque fingerprints.") + Attribute("total_count", Int64, "Total number of findings across all enabled policies.") + Attribute("next_cursor", String, "Cursor for the next page of results.") + Required("results", "total_count") +}) + var ListRiskResultsByChatResult = Type("ListRiskResultsByChatResult", func() { Attribute("chats", ArrayOf(shared.RiskChatSummary), "Risk results grouped by chat.") Attribute("next_cursor", String, "Cursor for the next page of results.") diff --git a/server/design/shared/risk.go b/server/design/shared/risk.go index 735ef9ad95..6577a14963 100644 --- a/server/design/shared/risk.go +++ b/server/design/shared/risk.go @@ -94,6 +94,47 @@ var RiskResult = Type("RiskResult", func() { Required("id", "policy_id", "policy_version", "chat_message_id", "source", "created_at") }) +// RiskResultRedacted mirrors RiskResult but replaces the raw `match` content +// with an opaque length+SHA256-prefix fingerprint. Designed for agent / MCP +// consumption so secret content from gitleaks-, presidio-, or +// prompt-injection-class findings never reaches the model context. +// +// For shadow_mcp findings the original match value is a server URL / stdio +// command identifier that the dashboard already renders unmasked — that +// passthrough is preserved here so agents can correlate findings to servers +// without losing signal. +var RiskResultRedacted = Type("RiskResultRedacted", func() { + Meta("struct:pkg:path", "types") + + Attribute("id", String, "The result ID.", func() { + Format(FormatUUID) + }) + Attribute("policy_id", String, "The risk policy ID.", func() { + Format(FormatUUID) + }) + Attribute("policy_version", Int64, "Policy version when this result was produced.") + Attribute("chat_message_id", String, "The chat message that was scanned.", func() { + Format(FormatUUID) + }) + Attribute("chat_id", String, "The chat session containing the message.", func() { + Format(FormatUUID) + }) + Attribute("chat_title", String, "Title of the chat session.") + Attribute("user_id", String, "The user who owns the chat session.") + Attribute("source", String, "Detection source (e.g. gitleaks, presidio, shadow_mcp).") + Attribute("rule_id", String, "The matched rule identifier.") + Attribute("description", String, "Human-readable description of the finding.") + Attribute("match_redacted", String, "Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim.") + Attribute("position_known", Boolean, "Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks.") + Attribute("confidence", Float64, "Confidence score for this finding.") + Attribute("tags", ArrayOf(String), "Tags from the detection rule.") + Attribute("created_at", String, "When this result was created.", func() { + Format(FormatDateTime) + }) + + Required("id", "policy_id", "policy_version", "chat_message_id", "source", "created_at", "match_redacted", "position_known") +}) + var RiskChatSummary = Type("RiskChatSummary", func() { Meta("struct:pkg:path", "types") diff --git a/server/gen/http/cli/gram/cli.go b/server/gen/http/cli/gram/cli.go index f7f1aaf8fe..0a3337cd6d 100644 --- a/server/gen/http/cli/gram/cli.go +++ b/server/gen/http/cli/gram/cli.go @@ -107,7 +107,7 @@ func UsageCommands() []string { "remote-session-issuers (discover-remote-session-issuer|create-remote-session-issuer|update-remote-session-issuer|list-remote-session-issuers|get-remote-session-issuer|delete-remote-session-issuer)", "remote-sessions (list-remote-sessions|revoke-remote-session)", "resources list-resources", - "risk (create-risk-policy|list-risk-policies|get-risk-capabilities|get-risk-policy|update-risk-policy|delete-risk-policy|list-risk-results|list-risk-results-by-chat|get-risk-overview|list-risk-categories|get-risk-user-breakdown|get-risk-rule-breakdown|get-risk-policy-status|list-shadow-mcp-approvals|approve-shadow-mcp|revoke-shadow-mcp-approval|trigger-risk-analysis)", + "risk (create-risk-policy|list-risk-policies|get-risk-capabilities|get-risk-policy|update-risk-policy|delete-risk-policy|list-risk-results|list-risk-results-for-agent|list-risk-results-by-chat|get-risk-overview|list-risk-categories|get-risk-user-breakdown|get-risk-rule-breakdown|get-risk-policy-status|list-shadow-mcp-approvals|approve-shadow-mcp|revoke-shadow-mcp-approval|trigger-risk-analysis)", "slack (create-slack-app|list-slack-apps|get-slack-app|configure-slack-app|update-slack-app|delete-slack-app)", "telemetry (search-logs|search-tool-calls|search-chats|search-users|capture-event|get-project-metrics-summary|get-user-metrics-summary|get-observability-overview|get-project-overview|list-filter-options|list-attribute-keys|get-hooks-summary|list-hooks-traces)", "templates (create-template|update-template|get-template|list-templates|delete-template|render-template-by-id|render-template)", @@ -1278,6 +1278,20 @@ func ParseEndpoint( riskListRiskResultsSessionTokenFlag = riskListRiskResultsFlags.String("session-token", "", "") riskListRiskResultsProjectSlugInputFlag = riskListRiskResultsFlags.String("project-slug-input", "", "") + riskListRiskResultsForAgentFlags = flag.NewFlagSet("list-risk-results-for-agent", flag.ExitOnError) + riskListRiskResultsForAgentPolicyIDFlag = riskListRiskResultsForAgentFlags.String("policy-id", "", "") + riskListRiskResultsForAgentChatIDFlag = riskListRiskResultsForAgentFlags.String("chat-id", "", "") + riskListRiskResultsForAgentCategoryFlag = riskListRiskResultsForAgentFlags.String("category", "", "") + riskListRiskResultsForAgentRuleIDFlag = riskListRiskResultsForAgentFlags.String("rule-id", "", "") + riskListRiskResultsForAgentUniqueMatchFlag = riskListRiskResultsForAgentFlags.String("unique-match", "", "") + riskListRiskResultsForAgentFromFlag = riskListRiskResultsForAgentFlags.String("from", "", "") + riskListRiskResultsForAgentToFlag = riskListRiskResultsForAgentFlags.String("to", "", "") + riskListRiskResultsForAgentCursorFlag = riskListRiskResultsForAgentFlags.String("cursor", "", "") + riskListRiskResultsForAgentLimitFlag = riskListRiskResultsForAgentFlags.String("limit", "", "") + riskListRiskResultsForAgentApikeyTokenFlag = riskListRiskResultsForAgentFlags.String("apikey-token", "", "") + riskListRiskResultsForAgentSessionTokenFlag = riskListRiskResultsForAgentFlags.String("session-token", "", "") + riskListRiskResultsForAgentProjectSlugInputFlag = riskListRiskResultsForAgentFlags.String("project-slug-input", "", "") + riskListRiskResultsByChatFlags = flag.NewFlagSet("list-risk-results-by-chat", flag.ExitOnError) riskListRiskResultsByChatCursorFlag = riskListRiskResultsByChatFlags.String("cursor", "", "") riskListRiskResultsByChatLimitFlag = riskListRiskResultsByChatFlags.String("limit", "", "") @@ -2031,6 +2045,7 @@ func ParseEndpoint( riskUpdateRiskPolicyFlags.Usage = riskUpdateRiskPolicyUsage riskDeleteRiskPolicyFlags.Usage = riskDeleteRiskPolicyUsage riskListRiskResultsFlags.Usage = riskListRiskResultsUsage + riskListRiskResultsForAgentFlags.Usage = riskListRiskResultsForAgentUsage riskListRiskResultsByChatFlags.Usage = riskListRiskResultsByChatUsage riskGetRiskOverviewFlags.Usage = riskGetRiskOverviewUsage riskListRiskCategoriesFlags.Usage = riskListRiskCategoriesUsage @@ -2999,6 +3014,9 @@ func ParseEndpoint( case "list-risk-results": epf = riskListRiskResultsFlags + case "list-risk-results-for-agent": + epf = riskListRiskResultsForAgentFlags + case "list-risk-results-by-chat": epf = riskListRiskResultsByChatFlags @@ -4055,6 +4073,9 @@ func ParseEndpoint( case "list-risk-results": endpoint = c.ListRiskResults() data, err = riskc.BuildListRiskResultsPayload(*riskListRiskResultsPolicyIDFlag, *riskListRiskResultsChatIDFlag, *riskListRiskResultsCategoryFlag, *riskListRiskResultsRuleIDFlag, *riskListRiskResultsUniqueMatchFlag, *riskListRiskResultsFromFlag, *riskListRiskResultsToFlag, *riskListRiskResultsCursorFlag, *riskListRiskResultsLimitFlag, *riskListRiskResultsApikeyTokenFlag, *riskListRiskResultsSessionTokenFlag, *riskListRiskResultsProjectSlugInputFlag) + case "list-risk-results-for-agent": + endpoint = c.ListRiskResultsForAgent() + data, err = riskc.BuildListRiskResultsForAgentPayload(*riskListRiskResultsForAgentPolicyIDFlag, *riskListRiskResultsForAgentChatIDFlag, *riskListRiskResultsForAgentCategoryFlag, *riskListRiskResultsForAgentRuleIDFlag, *riskListRiskResultsForAgentUniqueMatchFlag, *riskListRiskResultsForAgentFromFlag, *riskListRiskResultsForAgentToFlag, *riskListRiskResultsForAgentCursorFlag, *riskListRiskResultsForAgentLimitFlag, *riskListRiskResultsForAgentApikeyTokenFlag, *riskListRiskResultsForAgentSessionTokenFlag, *riskListRiskResultsForAgentProjectSlugInputFlag) case "list-risk-results-by-chat": endpoint = c.ListRiskResultsByChat() data, err = riskc.BuildListRiskResultsByChatPayload(*riskListRiskResultsByChatCursorFlag, *riskListRiskResultsByChatLimitFlag, *riskListRiskResultsByChatApikeyTokenFlag, *riskListRiskResultsByChatSessionTokenFlag, *riskListRiskResultsByChatProjectSlugInputFlag) @@ -9200,6 +9221,7 @@ func riskUsage() { fmt.Fprintln(os.Stderr, ` update-risk-policy: Update a risk analysis policy.`) fmt.Fprintln(os.Stderr, ` delete-risk-policy: Delete a risk analysis policy.`) fmt.Fprintln(os.Stderr, ` list-risk-results: List risk analysis results for the current project.`) + fmt.Fprintln(os.Stderr, ` list-risk-results-for-agent: List risk analysis results with the `+"`"+`match`+"`"+` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `+"`"+`match`+"`"+` value — a non-sensitive server URL or command identifier — is passed through verbatim.`) fmt.Fprintln(os.Stderr, ` list-risk-results-by-chat: List risk results grouped by chat session for the current project.`) fmt.Fprintln(os.Stderr, ` get-risk-overview: Get risk overview metrics and trend data for the current project.`) fmt.Fprintln(os.Stderr, ` list-risk-categories: Return the canonical risk category definitions: metadata (label/description/icon) plus the classification (source / rule_id list / rule_id prefix) used to bucket findings. Dashboards and CLIs should call this instead of maintaining their own copy of the mapping.`) @@ -9394,6 +9416,46 @@ func riskListRiskResultsUsage() { fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "risk list-risk-results --policy-id \"550e8400-e29b-41d4-a716-446655440000\" --chat-id \"550e8400-e29b-41d4-a716-446655440000\" --category \"abc123\" --rule-id \"abc123\" --unique-match false --from \"1970-01-01T00:00:01Z\" --to \"1970-01-01T00:00:01Z\" --cursor \"abc123\" --limit 2 --apikey-token \"abc123\" --session-token \"abc123\" --project-slug-input \"abc123\"") } +func riskListRiskResultsForAgentUsage() { + // Header with flags + fmt.Fprintf(os.Stderr, "%s [flags] risk list-risk-results-for-agent", os.Args[0]) + fmt.Fprint(os.Stderr, " -policy-id STRING") + fmt.Fprint(os.Stderr, " -chat-id STRING") + fmt.Fprint(os.Stderr, " -category STRING") + fmt.Fprint(os.Stderr, " -rule-id STRING") + fmt.Fprint(os.Stderr, " -unique-match BOOL") + fmt.Fprint(os.Stderr, " -from STRING") + fmt.Fprint(os.Stderr, " -to STRING") + fmt.Fprint(os.Stderr, " -cursor STRING") + fmt.Fprint(os.Stderr, " -limit INT") + fmt.Fprint(os.Stderr, " -apikey-token STRING") + fmt.Fprint(os.Stderr, " -session-token STRING") + fmt.Fprint(os.Stderr, " -project-slug-input STRING") + fmt.Fprintln(os.Stderr) + + // Description + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, `List risk analysis results with the `+"`"+`match`+"`"+` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `+"`"+`match`+"`"+` value — a non-sensitive server URL or command identifier — is passed through verbatim.`) + + // Flags list + fmt.Fprintln(os.Stderr, ` -policy-id STRING: `) + fmt.Fprintln(os.Stderr, ` -chat-id STRING: `) + fmt.Fprintln(os.Stderr, ` -category STRING: `) + fmt.Fprintln(os.Stderr, ` -rule-id STRING: `) + fmt.Fprintln(os.Stderr, ` -unique-match BOOL: `) + fmt.Fprintln(os.Stderr, ` -from STRING: `) + fmt.Fprintln(os.Stderr, ` -to STRING: `) + fmt.Fprintln(os.Stderr, ` -cursor STRING: `) + fmt.Fprintln(os.Stderr, ` -limit INT: `) + fmt.Fprintln(os.Stderr, ` -apikey-token STRING: `) + fmt.Fprintln(os.Stderr, ` -session-token STRING: `) + fmt.Fprintln(os.Stderr, ` -project-slug-input STRING: `) + + fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "Example:") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "risk list-risk-results-for-agent --policy-id \"550e8400-e29b-41d4-a716-446655440000\" --chat-id \"550e8400-e29b-41d4-a716-446655440000\" --category \"abc123\" --rule-id \"abc123\" --unique-match false --from \"1970-01-01T00:00:01Z\" --to \"1970-01-01T00:00:01Z\" --cursor \"abc123\" --limit 2 --apikey-token \"abc123\" --session-token \"abc123\" --project-slug-input \"abc123\"") +} + func riskListRiskResultsByChatUsage() { // Header with flags fmt.Fprintf(os.Stderr, "%s [flags] risk list-risk-results-by-chat", os.Args[0]) diff --git a/server/gen/http/openapi3.json b/server/gen/http/openapi3.json index d3c5165e89..2a82e4d32f 100644 --- a/server/gen/http/openapi3.json +++ b/server/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Gram API Description","description":"Gram is the tools platform for AI agents","version":"0.0.1"},"servers":[{"url":"https://app.getgram.ai"}],"paths":{"/admin/auth.callback":{"get":{"tags":["admin"],"summary":"callback admin","operationId":"admin#callback","parameters":[{"name":"code","in":"query","description":"The authorization code returned by the provider on success","allowEmptyValue":true,"schema":{"type":"string","description":"The authorization code returned by the provider on success"}},{"name":"state","in":"query","description":"The state parameter returned, which should match the one generated in the login step","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The state parameter returned, which should match the one generated in the login step"}},{"name":"error","in":"query","description":"OAuth error code returned by the provider (e.g. login_required for prompt=none failures)","allowEmptyValue":true,"schema":{"type":"string","description":"OAuth error code returned by the provider (e.g. login_required for prompt=none failures)"}},{"name":"error_description","in":"query","description":"Human-readable OAuth error description","allowEmptyValue":true,"schema":{"type":"string","description":"Human-readable OAuth error description"}},{"name":"gram_admin_login_state","in":"cookie","description":"The state cookie value for CSRF sanity checking against the state parameter","allowEmptyValue":true,"schema":{"type":"string","description":"The state cookie value for CSRF sanity checking against the state parameter"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect the client to after processing the callback","schema":{"type":"string","description":"The URL to redirect the client to after processing the callback"}},"Set-Cookie":{"description":"Admin session cookie","schema":{"type":"string","description":"Admin session cookie"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/auth.login":{"get":{"tags":["admin"],"summary":"login admin","operationId":"admin#login","parameters":[{"name":"return_to","in":"query","description":"Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted."}},{"name":"prompt","in":"query","description":"Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication."}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect the user to for Google authentication","schema":{"type":"string","description":"The URL to redirect the user to for Google authentication"}},"Set-Cookie":{"description":"CSRF state cookie for sanity-checking the callback","schema":{"type":"string","description":"CSRF state cookie for sanity-checking the callback"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/auth.logout":{"post":{"tags":["admin"],"summary":"logout admin","operationId":"admin#logout","parameters":[{"name":"gram_admin","in":"cookie","description":"The session cookie value to clear for logging out","allowEmptyValue":true,"schema":{"type":"string","description":"The session cookie value to clear for logging out"}}],"responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/organization.get":{"get":{"tags":["admin"],"summary":"getOrganization admin","description":"Returns full admin details for a single organization by id or slug.","operationId":"adminGetOrganization","parameters":[{"name":"id_or_slug","in":"query","description":"Organization ID or slug.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID or slug."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganization"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.members":{"get":{"tags":["admin"],"summary":"listOrganizationMembers admin","description":"Lists members of an organization (admin view, no auth scoping).","operationId":"adminListOrganizationMembers","parameters":[{"name":"organization_id","in":"query","description":"Organization ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationMembersResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.projects":{"get":{"tags":["admin"],"summary":"listOrganizationProjects admin","description":"Lists projects belonging to an organization (admin view, no auth scoping).","operationId":"adminListOrganizationProjects","parameters":[{"name":"organization_id","in":"query","description":"Organization ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationProjectsResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.update":{"post":{"tags":["admin"],"summary":"updateOrganization admin","description":"Updates admin-managed fields on an organization. At least one of account_type or whitelisted must be supplied.","operationId":"adminUpdateOrganization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganization"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organizations.list":{"get":{"description":"Lists organizations for admin operations with optional search and filters.","operationId":"adminListOrganizations","parameters":[{"allowEmptyValue":true,"description":"Search term applied to name and slug (case-insensitive substring).","in":"query","name":"q","schema":{"description":"Search term applied to name and slug (case-insensitive substring).","type":"string"}},{"allowEmptyValue":true,"description":"Filter by gram_account_type (e.g. free, pro, enterprise).","in":"query","name":"account_type","schema":{"description":"Filter by gram_account_type (e.g. free, pro, enterprise).","type":"string"}},{"allowEmptyValue":true,"description":"Include organizations with disabled_at set. Defaults to false.","in":"query","name":"include_disabled","schema":{"description":"Include organizations with disabled_at set. Defaults to false.","type":"boolean"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"admin_auth_header_Authorization":[]}],"summary":"listOrganizations admin","tags":["admin"],"x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"}}},"/admin/project.get":{"get":{"tags":["admin"],"summary":"getProject admin","description":"Returns full admin details for a project by id or slug, including aggregated counts of child resources.","operationId":"adminGetProject","parameters":[{"name":"id_or_slug","in":"query","description":"Project ID or slug.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Project ID or slug."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProjectDetail"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/rpc/access.createRole":{"post":{"description":"Create a new custom role.","operationId":"createRole","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createRole access","tags":["access"],"x-speakeasy-name-override":"createRole","x-speakeasy-react-hook":{"name":"CreateRole"}}},"/rpc/access.deleteRole":{"delete":{"description":"Delete a custom role (system roles cannot be deleted).","operationId":"deleteRole","parameters":[{"allowEmptyValue":true,"description":"The ID of the role to delete.","in":"query","name":"id","required":true,"schema":{"description":"The ID of the role to delete.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteRole access","tags":["access"],"x-speakeasy-name-override":"deleteRole","x-speakeasy-react-hook":{"name":"DeleteRole"}}},"/rpc/access.disableRBAC":{"post":{"description":"Disable RBAC enforcement for the current organization.","operationId":"disableRBAC","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"disableRBAC access","tags":["access"],"x-speakeasy-name-override":"disableRBAC","x-speakeasy-react-hook":{"name":"DisableRBAC"}}},"/rpc/access.enableRBAC":{"post":{"description":"Enable RBAC for the current organization. Seeds default grants for system roles.","operationId":"enableRBAC","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"enableRBAC access","tags":["access"],"x-speakeasy-name-override":"enableRBAC","x-speakeasy-react-hook":{"name":"EnableRBAC"}}},"/rpc/access.getRBACStatus":{"get":{"description":"Returns whether RBAC is currently enabled for the current organization.","operationId":"getRBACStatus","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RBACStatus"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getRBACStatus access","tags":["access"],"x-speakeasy-name-override":"getRBACStatus","x-speakeasy-react-hook":{"name":"RBACStatus"}}},"/rpc/access.getRole":{"get":{"description":"Get a role by ID.","operationId":"getRole","parameters":[{"allowEmptyValue":true,"description":"The ID of the role.","in":"query","name":"id","required":true,"schema":{"description":"The ID of the role.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getRole access","tags":["access"],"x-speakeasy-name-override":"getRole","x-speakeasy-react-hook":{"name":"Role"}}},"/rpc/access.listChallengeBuckets":{"get":{"description":"List authz challenges grouped into time-based burst buckets. Consecutive challenges with the same dimensions within a 10-minute window are collapsed into a single bucket.","operationId":"listChallengeBuckets","parameters":[{"allowEmptyValue":true,"description":"Filter by outcome.","in":"query","name":"outcome","schema":{"description":"Filter by outcome.","enum":["allow","deny"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter by principal URN.","in":"query","name":"principal_urn","schema":{"description":"Filter by principal URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by scope.","in":"query","name":"scope","schema":{"description":"Filter by scope.","type":"string"}},{"allowEmptyValue":true,"description":"Filter to a specific project.","in":"query","name":"project_id","schema":{"description":"Filter to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution state. True = only resolved, false = only unresolved.","in":"query","name":"resolved","schema":{"description":"Filter by resolution state. True = only resolved, false = only unresolved.","type":"boolean"}},{"allowEmptyValue":true,"description":"Maximum number of buckets to return.","in":"query","name":"limit","schema":{"default":50,"description":"Maximum number of buckets to return.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Number of buckets to skip.","in":"query","name":"offset","schema":{"default":0,"description":"Number of buckets to skip.","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChallengeBucketsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listChallengeBuckets access","tags":["access"],"x-speakeasy-name-override":"listChallengeBuckets","x-speakeasy-react-hook":{"name":"ChallengeBuckets"}}},"/rpc/access.listChallenges":{"get":{"description":"List authz challenge events from ClickHouse, enriched with resolution state from PostgreSQL.","operationId":"listChallenges","parameters":[{"allowEmptyValue":true,"description":"Filter by outcome.","in":"query","name":"outcome","schema":{"description":"Filter by outcome.","enum":["allow","deny"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter by principal URN.","in":"query","name":"principal_urn","schema":{"description":"Filter by principal URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by scope.","in":"query","name":"scope","schema":{"description":"Filter by scope.","type":"string"}},{"allowEmptyValue":true,"description":"Filter to a specific project.","in":"query","name":"project_id","schema":{"description":"Filter to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution state. True = only resolved, false = only unresolved.","in":"query","name":"resolved","schema":{"description":"Filter by resolution state. True = only resolved, false = only unresolved.","type":"boolean"}},{"allowEmptyValue":true,"description":"Fetch specific challenges by ID. When set, other filters and pagination are ignored.","in":"query","name":"ids","schema":{"description":"Fetch specific challenges by ID. When set, other filters and pagination are ignored.","items":{"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Maximum number of results to return.","in":"query","name":"limit","schema":{"default":50,"description":"Maximum number of results to return.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Number of results to skip.","in":"query","name":"offset","schema":{"default":0,"description":"Number of results to skip.","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChallengesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listChallenges access","tags":["access"],"x-speakeasy-name-override":"listChallenges","x-speakeasy-react-hook":{"name":"Challenges"}}},"/rpc/access.listGrants":{"get":{"description":"List the current user's effective grants, including inherited role grants.","operationId":"listGrants","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserGrantsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listGrants access","tags":["access"],"x-speakeasy-name-override":"listGrants","x-speakeasy-react-hook":{"name":"Grants"}}},"/rpc/access.listMembers":{"get":{"description":"List all team members with their role assignments.","operationId":"listMembers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listMembers access","tags":["access"],"x-speakeasy-name-override":"listMembers","x-speakeasy-react-hook":{"name":"Members"}}},"/rpc/access.listRoles":{"get":{"description":"List all roles for the current organization.","operationId":"listRoles","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRolesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listRoles access","tags":["access"],"x-speakeasy-name-override":"listRoles","x-speakeasy-react-hook":{"name":"Roles"}}},"/rpc/access.listScopes":{"get":{"description":"List all available scopes and their resource types.","operationId":"listScopes","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScopesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listScopes access","tags":["access"],"x-speakeasy-name-override":"listScopes","x-speakeasy-react-hook":{"name":"ListScopes"}}},"/rpc/access.resolveChallenge":{"post":{"description":"Record resolutions for one or more denied authz challenges. The caller is responsible for assigning the role first.","operationId":"resolveChallenge","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveChallengeForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveChallengesResult"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"resolveChallenge access","tags":["access"],"x-speakeasy-name-override":"resolveChallenge","x-speakeasy-react-hook":{"name":"ResolveChallenge"}}},"/rpc/access.updateMemberRoles":{"put":{"description":"Update a team member's role assignments.","operationId":"updateMemberRoles","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRolesForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessMember"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"updateMemberRoles access","tags":["access"],"x-speakeasy-name-override":"updateMemberRoles","x-speakeasy-react-hook":{"name":"UpdateMemberRoles"}}},"/rpc/access.updateRole":{"put":{"description":"Update an existing custom role.","operationId":"updateRole","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"updateRole access","tags":["access"],"x-speakeasy-name-override":"updateRole","x-speakeasy-react-hook":{"name":"UpdateRole"}}},"/rpc/assets.createSignedChatAttachmentURL":{"post":{"description":"Create a time-limited signed URL to access a chat attachment without authentication.","operationId":"createSignedChatAttachmentURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"createSignedChatAttachmentURL assets","tags":["assets"],"x-speakeasy-name-override":"createSignedChatAttachmentURL","x-speakeasy-react-hook":{"name":"CreateSignedChatAttachmentURL"}}},"/rpc/assets.fetchOpenAPIv3FromURL":{"post":{"description":"Fetch an OpenAPI v3 document from a URL and upload it to Gram.","operationId":"fetchOpenAPIv3FromURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchOpenAPIv3FromURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"fetchOpenAPIv3FromURL assets","tags":["assets"],"x-speakeasy-name-override":"fetchOpenAPIv3FromURL","x-speakeasy-react-hook":{"name":"FetchOpenAPIv3FromURL"}}},"/rpc/assets.list":{"get":{"description":"List all assets for a project.","operationId":"listAssets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssets assets","tags":["assets"],"x-speakeasy-name-override":"listAssets","x-speakeasy-react-hook":{"name":"ListAssets"}}},"/rpc/assets.serveChatAttachment":{"get":{"description":"Serve a chat attachment from Gram.","operationId":"serveChatAttachment","parameters":[{"allowEmptyValue":true,"description":"The ID of the attachment to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the attachment to serve","type":"string"}},{"allowEmptyValue":true,"description":"The project ID that the attachment belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The project ID that the attachment belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"serveChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachment","x-speakeasy-react-hook":{"name":"serveChatAttachment"}}},"/rpc/assets.serveChatAttachmentSigned":{"get":{"description":"Serve a chat attachment using a signed URL token.","operationId":"serveChatAttachmentSigned","parameters":[{"allowEmptyValue":true,"description":"The signed JWT token","in":"query","name":"token","required":true,"schema":{"description":"The signed JWT token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveChatAttachmentSigned assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachmentSigned","x-speakeasy-react-hook":{"name":"serveChatAttachmentSigned"}}},"/rpc/assets.serveFunction":{"get":{"description":"Serve a Gram Functions asset from Gram.","operationId":"serveFunction","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveFunction assets","tags":["assets"],"x-speakeasy-name-override":"serveFunction","x-speakeasy-react-hook":{"name":"serveFunction"}}},"/rpc/assets.serveImage":{"get":{"description":"Serve an image from Gram.","operationId":"serveImage","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveImage assets","tags":["assets"],"x-speakeasy-name-override":"serveImage","x-speakeasy-react-hook":{"name":"serveImage"}}},"/rpc/assets.serveOpenAPIv3":{"get":{"description":"Serve an OpenAPIv3 asset from Gram.","operationId":"serveOpenAPIv3","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"serveOpenAPIv3","x-speakeasy-react-hook":{"name":"serveOpenAPIv3"}}},"/rpc/assets.uploadChatAttachment":{"post":{"description":"Upload a chat attachment to Gram.","operationId":"uploadChatAttachment","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"uploadChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"uploadChatAttachment","x-speakeasy-react-hook":{"name":"UploadChatAttachment"}}},"/rpc/assets.uploadFunctions":{"post":{"description":"Upload functions to Gram.","operationId":"uploadFunctions","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFunctionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadFunctions assets","tags":["assets"],"x-speakeasy-name-override":"uploadFunctions","x-speakeasy-react-hook":{"name":"UploadFunctions"}}},"/rpc/assets.uploadImage":{"post":{"description":"Upload an image to Gram.","operationId":"uploadImage","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadImage assets","tags":["assets"],"x-speakeasy-name-override":"uploadImage","x-speakeasy-react-hook":{"name":"UploadImage"}}},"/rpc/assets.uploadOpenAPIv3":{"post":{"description":"Upload an OpenAPI v3 document to Gram.","operationId":"uploadOpenAPIv3Asset","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"uploadOpenAPIv3","x-speakeasy-react-hook":{"name":"UploadOpenAPIv3"}}},"/rpc/assistantMemories.delete":{"delete":{"description":"Delete an assistant memory by ID.","operationId":"deleteAssistantMemory","parameters":[{"allowEmptyValue":true,"description":"The assistant memory ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant memory ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteAssistantMemory assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"delete"}},"/rpc/assistantMemories.get":{"get":{"description":"Get an assistant memory by ID.","operationId":"getAssistantMemory","parameters":[{"allowEmptyValue":true,"description":"The assistant memory ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant memory ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantMemory"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getAssistantMemory assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetAssistantMemory"}}},"/rpc/assistantMemories.list":{"get":{"description":"List assistant memories for an assistant.","operationId":"listAssistantMemories","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"assistant_id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional tags to filter memories by.","in":"query","name":"tags","schema":{"description":"Optional tags to filter memories by.","items":{"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Whether to include soft-deleted memories.","in":"query","name":"include_deleted","schema":{"default":false,"description":"Whether to include soft-deleted memories.","type":"boolean"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from.","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from.","type":"string"}},{"allowEmptyValue":true,"description":"The number of memories to return per page.","in":"query","name":"limit","schema":{"default":50,"description":"The number of memories to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssistantMemoriesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssistantMemories assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"ListAssistantMemories"}}},"/rpc/assistants.create":{"post":{"description":"Create an assistant.","operationId":"createAssistant","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssistantForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"create"}},"/rpc/assistants.delete":{"delete":{"description":"Delete an assistant.","operationId":"deleteAssistant","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"delete"}},"/rpc/assistants.get":{"get":{"description":"Get an assistant by ID.","operationId":"getAssistant","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"get"}},"/rpc/assistants.list":{"get":{"description":"List assistants for the current project.","operationId":"listAssistants","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssistantsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssistants assistants","tags":["assistants"],"x-speakeasy-name-override":"list"}},"/rpc/assistants.update":{"post":{"description":"Update an assistant.","operationId":"updateAssistant","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"update"}},"/rpc/auditlogs.list":{"get":{"description":"List audit logs across organization and projects.","operationId":"listAuditLogs","parameters":[{"allowEmptyValue":true,"description":"The cursor for paginating through audit logs.","in":"query","name":"cursor","schema":{"description":"The cursor for paginating through audit logs.","type":"string"}},{"allowEmptyValue":true,"description":"Project slug to filter audit logs to a specific project.","in":"query","name":"project_slug","schema":{"description":"Project slug to filter audit logs to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Actor ID to filter audit logs to a specific actor.","in":"query","name":"actor_id","schema":{"description":"Actor ID to filter audit logs to a specific actor.","type":"string"}},{"allowEmptyValue":true,"description":"Action to filter audit logs to a specific action.","in":"query","name":"action","schema":{"description":"Action to filter audit logs to a specific action.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"list auditlogs","tags":["auditlogs"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"AuditLogs"}}},"/rpc/auditlogs.listFacets":{"get":{"description":"List available audit log facet values across organization and projects.","operationId":"listAuditLogFacets","parameters":[{"allowEmptyValue":true,"description":"Project slug to filter facet values to a specific project.","in":"query","name":"project_slug","schema":{"description":"Project slug to filter facet values to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogFacetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listFacets auditlogs","tags":["auditlogs"],"x-speakeasy-name-override":"listFacets","x-speakeasy-react-hook":{"name":"AuditLogFacets"}}},"/rpc/auth.callback":{"get":{"description":"Handles the authentication callback.","operationId":"authCallback","parameters":[{"allowEmptyValue":true,"description":"The auth code for authentication from the speakeasy system","in":"query","name":"code","required":true,"schema":{"description":"The auth code for authentication from the speakeasy system","type":"string"}},{"allowEmptyValue":true,"description":"The opaque state string optionally provided during initialization.","in":"query","name":"state","schema":{"description":"The opaque state string optionally provided during initialization.","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback auth","tags":["auth"],"x-speakeasy-name-override":"callback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.info":{"get":{"description":"Provides information about the current authentication status.","operationId":"sessionInfo","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponseBody"}}},"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"info auth","tags":["auth"],"x-speakeasy-name-override":"info","x-speakeasy-react-hook":{"name":"SessionInfo"}}},"/rpc/auth.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"authLogin","parameters":[{"allowEmptyValue":true,"description":"Optional URL to redirect to after successful authentication","in":"query","name":"redirect","schema":{"description":"Optional URL to redirect to after successful authentication","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"login auth","tags":["auth"],"x-speakeasy-name-override":"login","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.logout":{"post":{"description":"Logs out the current user by clearing their session.","operationId":"logout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Empty string to clear the session","schema":{"description":"Empty string to clear the session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"logout auth","tags":["auth"],"x-speakeasy-name-override":"logout","x-speakeasy-react-hook":{"name":"Logout"}}},"/rpc/auth.register":{"post":{"description":"Register a new org for a user with their session information.","operationId":"register","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"register auth","tags":["auth"],"x-speakeasy-name-override":"register","x-speakeasy-react-hook":{"name":"Register"}}},"/rpc/auth.switchScopes":{"post":{"description":"Switches the authentication scope to a different organization.","operationId":"switchAuthScopes","parameters":[{"allowEmptyValue":true,"description":"The organization slug to switch scopes","in":"query","name":"organization_id","schema":{"description":"The organization slug to switch scopes","type":"string"}},{"allowEmptyValue":true,"description":"The project id to switch scopes too","in":"query","name":"project_id","schema":{"description":"The project id to switch scopes too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"switchScopes auth","tags":["auth"],"x-speakeasy-name-override":"switchScopes","x-speakeasy-react-hook":{"name":"SwitchScopes"}}},"/rpc/chat.creditUsage":{"get":{"description":"Get the total number of chat credits and usage for the current billing period","operationId":"creditUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditUsageResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"creditUsage chat","tags":["chat"],"x-speakeasy-name-override":"creditUsage","x-speakeasy-react-hook":{"name":"GetCreditUsage"}}},"/rpc/chat.delete":{"delete":{"description":"Soft-delete a chat by its ID","operationId":"deleteChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteChat chat","tags":["chat"],"x-speakeasy-name-override":"delete"}},"/rpc/chat.generateTitle":{"post":{"description":"Generate a title for a chat based on its messages","operationId":"generateTitle","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServeImageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"generateTitle chat","tags":["chat"],"x-speakeasy-name-override":"generateTitle"}},"/rpc/chat.list":{"get":{"description":"List all chats for a project","operationId":"listChats","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChats chat","tags":["chat"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListChats"}}},"/rpc/chat.listChatsWithResolutions":{"get":{"description":"List all chats for a project with their resolutions","operationId":"listChatsWithResolutions","parameters":[{"allowEmptyValue":true,"description":"Search query (searches chat ID, user ID, and title)","in":"query","name":"search","schema":{"description":"Search query (searches chat ID, user ID, and title)","type":"string"}},{"allowEmptyValue":true,"description":"Filter by external user ID","in":"query","name":"external_user_id","schema":{"description":"Filter by external user ID","type":"string"}},{"allowEmptyValue":true,"description":"Filter to chats produced by this assistant","in":"query","name":"assistant_id","schema":{"description":"Filter to chats produced by this assistant","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution status","in":"query","name":"resolution_status","schema":{"description":"Filter by resolution status","type":"string"}},{"allowEmptyValue":true,"description":"Filter by whether chat has risk findings: 'true', 'false', or empty for no filter.","in":"query","name":"has_risk","schema":{"description":"Filter by whether chat has risk findings: 'true', 'false', or empty for no filter.","enum":["","true","false"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created after this timestamp (ISO 8601)","in":"query","name":"from","schema":{"description":"Filter chats created after this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created before this timestamp (ISO 8601)","in":"query","name":"to","schema":{"description":"Filter chats created before this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Number of results per page","in":"query","name":"limit","schema":{"default":50,"description":"Number of results per page","format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"description":"Pagination offset","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"created_at","description":"Field to sort by","enum":["created_at","num_messages","score"],"type":"string"}},{"allowEmptyValue":true,"description":"Sort order","in":"query","name":"sort_order","schema":{"default":"desc","description":"Sort order","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsWithResolutionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChatsWithResolutions chat","tags":["chat"],"x-speakeasy-name-override":"listChatsWithResolutions","x-speakeasy-react-hook":{"name":"ListChatsWithResolutions","type":"query"}}},"/rpc/chat.load":{"get":{"description":"Load a chat by its ID","operationId":"loadChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"loadChat chat","tags":["chat"],"x-speakeasy-name-override":"load","x-speakeasy-react-hook":{"name":"LoadChat"}}},"/rpc/chat.submitFeedback":{"post":{"description":"Submit user feedback for a chat (success/failure)","operationId":"submitFeedback","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"submitFeedback chat","tags":["chat"],"x-speakeasy-name-override":"submitFeedback"}},"/rpc/chatSessions.create":{"post":{"description":"Creates a new chat session token","operationId":"createChatSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"create chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"create"}},"/rpc/chatSessions.revoke":{"delete":{"description":"Revokes an existing chat session token","operationId":"revokeChatSession","parameters":[{"allowEmptyValue":true,"description":"The chat session token to revoke","in":"query","name":"token","required":true,"schema":{"description":"The chat session token to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revoke chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"revoke"}},"/rpc/collections.attachServer":{"post":{"description":"Attach a server (toolset) to a collection","operationId":"attachServerToCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"attachServer collections","tags":["collections"],"x-speakeasy-name-override":"attachServer"}},"/rpc/collections.create":{"post":{"description":"Create an MCP collection within the organization","operationId":"createCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody2"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"create collections","tags":["collections"],"x-speakeasy-name-override":"create"}},"/rpc/collections.delete":{"delete":{"description":"Delete an MCP collection","operationId":"deleteCollection","parameters":[{"allowEmptyValue":true,"description":"ID of the collection to delete","in":"query","name":"collection_id","required":true,"schema":{"description":"ID of the collection to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"delete collections","tags":["collections"],"x-speakeasy-name-override":"delete"}},"/rpc/collections.detachServer":{"post":{"description":"Detach a server (toolset) from a collection","operationId":"detachServerFromCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachServerRequestBody"}}},"required":true},"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"detachServer collections","tags":["collections"],"x-speakeasy-name-override":"detachServer"}},"/rpc/collections.list":{"get":{"description":"List MCP collections in the organization","operationId":"listCollections","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"list collections","tags":["collections"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListCollections"}}},"/rpc/collections.listServers":{"get":{"description":"List published MCP servers from a collection","operationId":"listCollectionServers","parameters":[{"allowEmptyValue":true,"description":"Slug of the collection to serve","in":"query","name":"collection_slug","required":true,"schema":{"description":"Slug of the collection to serve","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListServersResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"listServers collections","tags":["collections"],"x-speakeasy-name-override":"listServers"}},"/rpc/collections.update":{"post":{"description":"Update an MCP collection","operationId":"updateCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"update collections","tags":["collections"],"x-speakeasy-name-override":"update"}},"/rpc/deployments.active":{"get":{"description":"Get the active deployment for a project.","operationId":"getActiveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetActiveDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getActiveDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"active","x-speakeasy-react-hook":{"name":"ActiveDeployment"}}},"/rpc/deployments.create":{"post":{"description":"Create a deployment to load tool definitions.","operationId":"createDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","in":"header","name":"Idempotency-Key","required":true,"schema":{"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateDeployment"}}},"/rpc/deployments.evolve":{"post":{"description":"Create a new deployment with additional or updated tool sources.","operationId":"evolveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"evolve deployments","tags":["deployments"],"x-speakeasy-name-override":"evolveDeployment","x-speakeasy-react-hook":{"name":"EvolveDeployment"}}},"/rpc/deployments.get":{"get":{"description":"Get a deployment by its ID.","operationId":"getDeployment","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"getById","x-speakeasy-react-hook":{"name":"Deployment"}}},"/rpc/deployments.latest":{"get":{"description":"Get the latest deployment for a project.","operationId":"getLatestDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getLatestDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"latest","x-speakeasy-react-hook":{"name":"LatestDeployment"}}},"/rpc/deployments.list":{"get":{"description":"List all deployments in descending order of creation.","operationId":"listDeployments","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listDeployments deployments","tags":["deployments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListDeployments"}}},"/rpc/deployments.logs":{"get":{"description":"Get logs for a deployment.","operationId":"getDeploymentLogs","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"deployment_id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeploymentLogs deployments","tags":["deployments"],"x-speakeasy-name-override":"logs","x-speakeasy-react-hook":{"name":"DeploymentLogs"}}},"/rpc/deployments.redeploy":{"post":{"description":"Redeploys an existing deployment.","operationId":"redeployDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"redeploy deployments","tags":["deployments"],"x-speakeasy-name-override":"redeployDeployment","x-speakeasy-react-hook":{"name":"RedeployDeployment"}}},"/rpc/domain.delete":{"delete":{"description":"Delete a custom domain","operationId":"deleteDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"deleteDomain domains","tags":["domains"],"x-speakeasy-name-override":"deleteDomain","x-speakeasy-react-hook":{"name":"deleteDomain"}}},"/rpc/domain.get":{"get":{"description":"Get the custom domain for an organization","operationId":"getDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getDomain domains","tags":["domains"],"x-speakeasy-name-override":"getDomain","x-speakeasy-react-hook":{"name":"getDomain"}}},"/rpc/domain.listMcpEndpoints":{"get":{"description":"List the MCP endpoints registered under the organization's custom domain across every project. Returns enriched rows that include the parent MCP server and project so callers can preview what a custom-domain deletion would cascade through.","operationId":"listCustomDomainMcpEndpoints","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCustomDomainMcpEndpointsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listMcpEndpoints domains","tags":["domains"],"x-speakeasy-name-override":"listMcpEndpoints","x-speakeasy-react-hook":{"name":"CustomDomainMcpEndpoints"}}},"/rpc/domain.register":{"post":{"description":"Create a custom domain for an organization","operationId":"registerDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createDomain domains","tags":["domains"],"x-speakeasy-name-override":"registerDomain","x-speakeasy-react-hook":{"name":"registerDomain"}}},"/rpc/environments.clone":{"post":{"description":"Clone an environment into a new one. Either copies only the variable names with empty placeholder values, or copies the encrypted values verbatim. Encrypted secret values are never decrypted by the application during the clone operation.","operationId":"cloneEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the source environment to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"cloneEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"clone","x-speakeasy-react-hook":{"name":"CloneEnvironment"}}},"/rpc/environments.create":{"post":{"description":"Create a new environment","operationId":"createEnvironment","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateEnvironment"}}},"/rpc/environments.delete":{"delete":{"description":"Delete an environment","operationId":"deleteEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to delete","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteEnvironment"}}},"/rpc/environments.deleteSourceLink":{"delete":{"description":"Delete a link between a source and an environment","operationId":"deleteSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteSourceLink","x-speakeasy-react-hook":{"name":"DeleteSourceEnvironmentLink"}}},"/rpc/environments.deleteToolsetLink":{"delete":{"description":"Delete a link between a toolset and an environment","operationId":"deleteToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteToolsetLink","x-speakeasy-react-hook":{"name":"DeleteToolsetEnvironmentLink"}}},"/rpc/environments.getSourceEnvironment":{"get":{"description":"Get the environment linked to a source","operationId":"getSourceEnvironment","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSourceEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getBySource","x-speakeasy-react-hook":{"name":"GetSourceEnvironment"}}},"/rpc/environments.getToolsetEnvironment":{"get":{"description":"Get the environment linked to a toolset","operationId":"getToolsetEnvironment","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getToolsetEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getByToolset","x-speakeasy-react-hook":{"name":"GetToolsetEnvironment"}}},"/rpc/environments.list":{"get":{"description":"List all environments for an organization","operationId":"listEnvironments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvironmentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listEnvironments environments","tags":["environments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListEnvironments"}}},"/rpc/environments.setSourceLink":{"put":{"description":"Set (upsert) a link between a source and an environment","operationId":"setSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSourceEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setSourceLink","x-speakeasy-react-hook":{"name":"SetSourceEnvironmentLink"}}},"/rpc/environments.setToolsetLink":{"put":{"description":"Set (upsert) a link between a toolset and an environment","operationId":"setToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetToolsetEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsetEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setToolsetLink","x-speakeasy-react-hook":{"name":"SetToolsetEnvironmentLink"}}},"/rpc/environments.update":{"post":{"description":"Update an environment","operationId":"updateEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateEnvironment"}}},"/rpc/external.receiveWorkOSWebhook":{"post":{"description":"Receive and enqueue a WorkOS webhook event.","operationId":"receiveWorkOSWebhook","parameters":[{"allowEmptyValue":true,"description":"WorkOS webhook signature header","in":"header","name":"WorkOS-Signature","schema":{"description":"WorkOS webhook signature header","type":"string"}}],"responses":{"204":{"description":"No Content response."}},"summary":"receiveWorkOSWebhook external","tags":["external"],"x-speakeasy-name-override":"receiveWorkOSWebhook","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/hooks.claude":{"post":{"tags":["hooks"],"summary":"claude hooks","description":"Unified endpoint for all Claude Code hook events. Handles SessionStart, PreToolUse, PostToolUse, and PostToolUseFailure.","operationId":"hooks#claude","parameters":[{"name":"Gram-Key","in":"header","description":"Optional API key for plugin-driven attribution.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional API key for plugin-driven attribution."}},{"name":"Gram-Project","in":"header","description":"Optional project slug for plugin-driven attribution.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional project slug for plugin-driven attribution."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rpc/hooks.codex":{"post":{"tags":["hooks"],"summary":"codex hooks","description":"Endpoint for Codex hook events. Handles SessionStart, PreToolUse, PermissionRequest, PostToolUse, UserPromptSubmit, and Stop.","operationId":"hooks#codex","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.cursor":{"post":{"tags":["hooks"],"summary":"cursor hooks","description":"Endpoint for Cursor hook events. Handles beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, and afterMCPExecution.","operationId":"hooks#cursor","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.deleteServerNameOverride":{"post":{"tags":["hooksServerNames"],"summary":"delete hooksServerNames","description":"Delete a server name display override","operationId":"deleteServerNameOverride","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRequestBody"}}}},"responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.listServerNameOverrides":{"get":{"tags":["hooksServerNames"],"summary":"list hooksServerNames","description":"List all server name display overrides for a project","operationId":"listServerNameOverrides","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServerNameOverride"}}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.otel/v1/logs":{"post":{"tags":["hooks"],"summary":"logs hooks","description":"Endpoint to receive OTEL logs data from Claude Code. Requires API key authentication.","operationId":"hooks#logs","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTELLogsPayload"}}}},"responses":{"202":{"description":"Accepted response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.otel/v1/metrics":{"post":{"tags":["hooks"],"summary":"metrics hooks","description":"Endpoint to receive OTEL metrics data from Claude Code. Requires API key authentication.","operationId":"hooks#metrics","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTELMetricsPayload"}}}},"responses":{"202":{"description":"Accepted response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.upsertServerNameOverride":{"post":{"tags":["hooksServerNames"],"summary":"upsert hooksServerNames","description":"Create or update a server name display override","operationId":"upsertServerNameOverride","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerNameOverride"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/instances.get":{"get":{"description":"Load all relevant data for an instance of a toolset and environment","operationId":"getInstance","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to load","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInstanceResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"getInstance instances","tags":["instances"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Instance"}}},"/rpc/integrations.get":{"get":{"tags":["integrations"],"summary":"get integrations","description":"Get a third-party integration by ID or name.","operationId":"integrations#get","parameters":[{"name":"id","in":"query","description":"The ID of the integration to get (refers to a package id).","allowEmptyValue":true,"schema":{"type":"string","description":"The ID of the integration to get (refers to a package id)."}},{"name":"name","in":"query","description":"The name of the integration to get (refers to a package name).","allowEmptyValue":true,"schema":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}]}},"/rpc/integrations.list":{"get":{"description":"List available third-party integrations.","operationId":"listIntegrations","parameters":[{"allowEmptyValue":true,"description":"Keywords to filter integrations by","in":"query","name":"keywords","schema":{"description":"Keywords to filter integrations by","items":{"maxLength":20,"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"list integrations","tags":["integrations"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListIntegrations"}}},"/rpc/keys.create":{"post":{"description":"Create a new api key","operationId":"createAPIKey","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createKey keys","tags":["keys"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateAPIKey"}}},"/rpc/keys.list":{"get":{"description":"List all api keys for an organization","operationId":"listAPIKeys","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listKeys keys","tags":["keys"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListAPIKeys"}}},"/rpc/keys.revoke":{"delete":{"description":"Revoke a api key","operationId":"revokeAPIKey","parameters":[{"allowEmptyValue":true,"description":"The ID of the key to revoke","in":"query","name":"id","required":true,"schema":{"description":"The ID of the key to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeKey keys","tags":["keys"],"x-speakeasy-name-override":"revokeById","x-speakeasy-react-hook":{"name":"RevokeAPIKey"}}},"/rpc/keys.verify":{"get":{"description":"Verify an api key","operationId":"validateAPIKey","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"verifyKey keys","tags":["keys"],"x-speakeasy-name-override":"validate","x-speakeasy-react-hook":{"name":"ValidateAPIKey"}}},"/rpc/mcpEndpoints.checkSlugAvailability":{"get":{"description":"Check whether an MCP endpoint slug is available. The uniqueness scope depends on whether a custom_domain_id is provided: platform-domain slugs are checked across all platform-domain endpoints (custom_domain_id IS NULL); custom-domain slugs are checked within the (custom_domain_id, slug) pair. Returns true when the slug is free.","operationId":"checkMcpEndpointSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","maxLength":128,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Optional custom domain ID. Omit to check platform-domain slug availability.","in":"query","name":"custom_domain_id","schema":{"description":"Optional custom domain ID. Omit to check platform-domain slug availability.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMcpEndpointSlugAvailability mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"checkSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMcpEndpointSlugAvailability"}}},"/rpc/mcpEndpoints.create":{"post":{"description":"Create a new MCP endpoint for an MCP server","operationId":"createMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpEndpointForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateMcpEndpoint"}}},"/rpc/mcpEndpoints.delete":{"delete":{"description":"Delete an MCP endpoint","operationId":"deleteMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP endpoint to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the MCP endpoint to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteMcpEndpoint"}}},"/rpc/mcpEndpoints.get":{"get":{"description":"Get an MCP endpoint by id or by (custom_domain_id, slug). Provide either id, or slug with an optional custom_domain_id — not both.","operationId":"getMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP endpoint","in":"query","name":"id","schema":{"description":"The ID of the MCP endpoint","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.","in":"query","name":"custom_domain_id","schema":{"description":"The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug to look up","in":"query","name":"slug","schema":{"description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","maxLength":128,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpEndpoint"}}},"/rpc/mcpEndpoints.list":{"get":{"description":"List MCP endpoints for a project. Optionally filter to only those associated with a specific MCP server.","operationId":"listMcpEndpoints","parameters":[{"allowEmptyValue":true,"description":"Optional filter: only return endpoints associated with this MCP server.","in":"query","name":"mcp_server_id","schema":{"description":"Optional filter: only return endpoints associated with this MCP server.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpEndpointsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listMcpEndpoints mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"McpEndpoints"}}},"/rpc/mcpEndpoints.update":{"post":{"description":"Update an MCP endpoint. This is a full-record replace: fields omitted from the request become null on the stored record. The id, mcp_server_id, and slug fields are required.","operationId":"updateMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpEndpointForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateMcpEndpoint"}}},"/rpc/mcpMetadata.export":{"post":{"description":"Export MCP server details as JSON for documentation and integration purposes.","operationId":"exportMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpExport"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"exportMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"export","x-speakeasy-react-hook":{"name":"ExportMcpMetadata"}}},"/rpc/mcpMetadata.get":{"get":{"description":"Fetch the metadata that powers the MCP install page.","operationId":"getMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset associated with this install page metadata","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMcpMetadataResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpMetadata"}}},"/rpc/mcpMetadata.set":{"post":{"description":"Create or update the metadata that powers the MCP install page.","operationId":"setMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpMetadata"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"set"}},"/rpc/mcpRegistries.clearCache":{"delete":{"description":"Clear the registry cache for a specific registry (admin only)","operationId":"clearMCPRegistryCache","parameters":[{"allowEmptyValue":true,"description":"The registry to clear cache for","in":"query","name":"registry_id","required":true,"schema":{"description":"The registry to clear cache for","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"clearCache mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"clearCache"}},"/rpc/mcpRegistries.getServerDetails":{"get":{"description":"Get detailed information about an MCP server including remotes","operationId":"getMCPServerDetails","parameters":[{"allowEmptyValue":true,"description":"ID of the registry","in":"query","name":"registry_id","required":true,"schema":{"description":"ID of the registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Server specifier (e.g., 'io.github.user/server')","in":"query","name":"server_specifier","required":true,"schema":{"description":"Server specifier (e.g., 'io.github.user/server')","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMCPServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getServerDetails mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"getServerDetails"}},"/rpc/mcpRegistries.listCatalog":{"get":{"description":"List available MCP servers from configured registries","operationId":"listMCPCatalog","parameters":[{"allowEmptyValue":true,"description":"Filter to a specific registry","in":"query","name":"registry_id","schema":{"description":"Filter to a specific registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Search query to filter servers by name","in":"query","name":"search","schema":{"description":"Search query to filter servers by name","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor","in":"query","name":"cursor","schema":{"description":"Pagination cursor","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCatalogResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listCatalog mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listCatalog","x-speakeasy-react-hook":{"name":"ListMCPCatalog"}}},"/rpc/mcpRegistries.listRegistries":{"get":{"description":"List all MCP registries (admin only)","operationId":"listMCPRegistries","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRegistriesResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRegistries mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listRegistries","x-speakeasy-react-hook":{"name":"ListMCPRegistries"}}},"/rpc/mcpServers.create":{"post":{"description":"Create a new MCP server","operationId":"createMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateMcpServer"}}},"/rpc/mcpServers.delete":{"delete":{"description":"Delete an MCP server","operationId":"deleteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP server to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the MCP server to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteMcpServer"}}},"/rpc/mcpServers.get":{"get":{"description":"Get an MCP server by ID or slug. Exactly one of id or slug must be provided.","operationId":"getMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP server. Mutually exclusive with slug.","in":"query","name":"id","schema":{"description":"The ID of the MCP server. Mutually exclusive with slug.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug of the MCP server. Mutually exclusive with id.","in":"query","name":"slug","schema":{"description":"The slug of the MCP server. Mutually exclusive with id.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpServer"}}},"/rpc/mcpServers.list":{"get":{"description":"List MCP servers for a project. Accepts optional remote_mcp_server_id or toolset_id filters to scope the result to a single backend; at most one filter may be supplied since the two backends are mutually exclusive.","operationId":"listMcpServers","parameters":[{"allowEmptyValue":true,"description":"Filter to MCP servers backed by this remote MCP server","in":"query","name":"remote_mcp_server_id","schema":{"description":"Filter to MCP servers backed by this remote MCP server","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter to MCP servers backed by this toolset","in":"query","name":"toolset_id","schema":{"description":"Filter to MCP servers backed by this toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpServersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listMcpServers mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"McpServers"}}},"/rpc/mcpServers.update":{"post":{"description":"Update an MCP server. This is a full-record replace for the optional UUID references: fields omitted from the request become null on the stored record. name is an exception — omitting it leaves the existing display name unchanged, while providing it requires a non-empty value and recomputes the server-side slug. The id and visibility fields are required; exactly one of remote_mcp_server_id or toolset_id must be provided.","operationId":"updateMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateMcpServer"}}},"/rpc/organizations.createPortalSession":{"post":{"description":"Create a webhook portal session.","operationId":"createPortalSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalSessionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createPortalSession organizations","tags":["organizations"],"x-speakeasy-name-override":"createPortalSession","x-speakeasy-react-hook":{"name":"CreatePortalSession"}}},"/rpc/organizations.disableWebhooks":{"post":{"description":"Disable webhooks for the active organization.","operationId":"disableWebhooks","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"disableWebhooks organizations","tags":["organizations"],"x-speakeasy-name-override":"disableWebhooks","x-speakeasy-react-hook":{"name":"DisableWebhooks"}}},"/rpc/organizations.enableWebhooks":{"post":{"description":"Enable webhooks for the active organization.","operationId":"enableWebhooks","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"enableWebhooks organizations","tags":["organizations"],"x-speakeasy-name-override":"enableWebhooks","x-speakeasy-react-hook":{"name":"EnableWebhooks"}}},"/rpc/organizations.get":{"get":{"description":"Get the active organization from the session.","operationId":"getOrganization","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"get organizations","tags":["organizations"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Organization"}}},"/rpc/organizations.listInvites":{"get":{"description":"List pending WorkOS invitations for the active organization.","operationId":"listInvites","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInvitesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listInvites organizations","tags":["organizations"],"x-speakeasy-name-override":"listInvites","x-speakeasy-react-hook":{"name":"ListInvites"}}},"/rpc/organizations.listUsers":{"get":{"description":"List users in the active organization from Gram organization_user_relationships.","operationId":"listOrganizationUsers","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listUsers organizations","tags":["organizations"],"x-speakeasy-name-override":"listUsers","x-speakeasy-react-hook":{"name":"ListOrganizationUsers"}}},"/rpc/organizations.removeUser":{"delete":{"description":"Remove a user from the active organization in Gram and delete their WorkOS organization membership.","operationId":"removeOrganizationUser","parameters":[{"allowEmptyValue":true,"description":"Gram user ID to remove.","in":"query","name":"user_id","required":true,"schema":{"description":"Gram user ID to remove.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"removeUser organizations","tags":["organizations"],"x-speakeasy-name-override":"removeUser","x-speakeasy-react-hook":{"name":"RemoveOrganizationUser"}}},"/rpc/organizations.revokeInvite":{"delete":{"description":"Revoke a pending WorkOS invitation.","operationId":"revokeInvite","parameters":[{"allowEmptyValue":true,"description":"WorkOS invitation ID.","in":"query","name":"invitation_id","required":true,"schema":{"description":"WorkOS invitation ID.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeInvite organizations","tags":["organizations"],"x-speakeasy-name-override":"revokeInvite","x-speakeasy-react-hook":{"name":"RevokeInvite"}}},"/rpc/organizations.sendInvite":{"post":{"description":"Send a WorkOS invitation for the active organization.","operationId":"sendInvite","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInviteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"sendInvite organizations","tags":["organizations"],"x-speakeasy-name-override":"sendInvite","x-speakeasy-react-hook":{"name":"SendInvite"}}},"/rpc/organizations.updateInviteRole":{"put":{"description":"Change the role assigned to a pending WorkOS invitation.","operationId":"updateInviteRole","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInviteRoleRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"updateInviteRole organizations","tags":["organizations"],"x-speakeasy-name-override":"updateInviteRole","x-speakeasy-react-hook":{"name":"UpdateInviteRole"}}},"/rpc/otelForwarding.deleteConfig":{"post":{"description":"Delete the org-wide OTEL forwarding config.","operationId":"deleteOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"deleteConfig","x-speakeasy-react-hook":{"name":"DeleteOtelForwardingConfig"}}},"/rpc/otelForwarding.getConfig":{"get":{"description":"Get the org-wide OTEL forwarding config. Returns an empty config (enabled=false, no URL) when none is set.","operationId":"getOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtelForwardingConfig"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"getConfig","x-speakeasy-react-hook":{"name":"OtelForwardingConfig"}}},"/rpc/otelForwarding.upsertConfig":{"post":{"description":"Create or update the org-wide OTEL forwarding config. Replaces the full header set on each call.","operationId":"upsertOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertConfigRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtelForwardingConfig"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"upsertConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"upsertConfig","x-speakeasy-react-hook":{"name":"UpsertOtelForwardingConfig"}}},"/rpc/packages.create":{"post":{"description":"Create a new package for a project.","operationId":"createPackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPackage packages","tags":["packages"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreatePackage"}}},"/rpc/packages.list":{"get":{"description":"List all packages for a project.","operationId":"listPackages","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPackagesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPackages packages","tags":["packages"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListPackages"}}},"/rpc/packages.listVersions":{"get":{"description":"List published versions of a package.","operationId":"listVersions","parameters":[{"allowEmptyValue":true,"description":"The name of the package","in":"query","name":"name","required":true,"schema":{"description":"The name of the package","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVersionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listVersions packages","tags":["packages"],"x-speakeasy-name-override":"listVersions","x-speakeasy-react-hook":{"name":"ListVersions"}}},"/rpc/packages.publish":{"post":{"description":"Publish a new version of a package.","operationId":"publish","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publish packages","tags":["packages"],"x-speakeasy-name-override":"publish","x-speakeasy-react-hook":{"name":"PublishPackage"}}},"/rpc/packages.update":{"put":{"description":"Update package details.","operationId":"updatePackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageResult"}}},"description":"OK response."},"304":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotModified"}}},"description":"not_modified: Not Modified response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePackage packages","tags":["packages"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdatePackage"}}},"/rpc/plugins.addPluginServer":{"post":{"description":"Add an MCP server to a plugin.","operationId":"addPluginServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPluginServerForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginServer"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"addPluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"addPluginServer","x-speakeasy-react-hook":{"name":"AddPluginServer"}}},"/rpc/plugins.createPlugin":{"post":{"description":"Create a new plugin.","operationId":"createPlugin","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePluginForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"createPlugin","x-speakeasy-react-hook":{"name":"CreatePlugin"}}},"/rpc/plugins.deletePlugin":{"delete":{"description":"Delete a plugin.","operationId":"deletePlugin","parameters":[{"allowEmptyValue":true,"in":"query","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deletePlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"deletePlugin","x-speakeasy-react-hook":{"name":"DeletePlugin"}}},"/rpc/plugins.downloadCodexInstallScript":{"get":{"description":"Download a bash install script that registers the Codex observability marketplace and pre-approves all hook events. Requires a published marketplace.","operationId":"downloadCodexInstallScript","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"text/x-shellscript":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadCodexInstallScript plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadCodexInstallScript"}},"/rpc/plugins.downloadObservabilityPlugin":{"get":{"description":"Download a ZIP of the per-org observability plugin (Gram hooks). Mints a fresh hooks-scoped API key on each download and embeds it in the plugin's hook script.","operationId":"downloadObservabilityPlugin","parameters":[{"allowEmptyValue":true,"description":"Target platform.","in":"query","name":"platform","required":true,"schema":{"description":"Target platform.","enum":["claude","cursor","codex"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadObservabilityPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadObservabilityPlugin"}},"/rpc/plugins.downloadPluginPackage":{"get":{"description":"Download a ZIP of a single plugin package for direct installation.","operationId":"downloadPluginPackage","parameters":[{"allowEmptyValue":true,"description":"The plugin to download.","in":"query","name":"plugin_id","required":true,"schema":{"description":"The plugin to download.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Target platform to download plugins for.","in":"query","name":"platform","required":true,"schema":{"description":"Target platform to download plugins for.","enum":["claude","cursor","codex"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadPluginPackage plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadPluginPackage"}},"/rpc/plugins.getPlugin":{"get":{"description":"Get a plugin with its servers and assignments.","operationId":"getPlugin","parameters":[{"allowEmptyValue":true,"in":"query","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"getPlugin","x-speakeasy-react-hook":{"name":"Plugin"}}},"/rpc/plugins.getPublishStatus":{"get":{"description":"Check whether GitHub publishing is configured and connected for this project.","operationId":"getPublishStatus","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishStatusResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPublishStatus plugins","tags":["plugins"],"x-speakeasy-name-override":"getPublishStatus","x-speakeasy-react-hook":{"name":"PublishStatus"}}},"/rpc/plugins.listPlugins":{"get":{"description":"List all plugins for the current project.","operationId":"listPlugins","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPluginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPlugins plugins","tags":["plugins"],"x-speakeasy-name-override":"listPlugins","x-speakeasy-react-hook":{"name":"Plugins"}}},"/rpc/plugins.publishPlugins":{"post":{"description":"Generate and publish all plugin packages to a GitHub repository.","operationId":"publishPlugins","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPluginsRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPluginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publishPlugins plugins","tags":["plugins"],"x-speakeasy-name-override":"publishPlugins","x-speakeasy-react-hook":{"name":"PublishPlugins"}}},"/rpc/plugins.removePluginServer":{"delete":{"description":"Remove a server from a plugin.","operationId":"removePluginServer","parameters":[{"allowEmptyValue":true,"description":"The plugin server ID to remove.","in":"query","name":"id","required":true,"schema":{"description":"The plugin server ID to remove.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"in":"query","name":"plugin_id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"removePluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"removePluginServer","x-speakeasy-react-hook":{"name":"RemovePluginServer"}}},"/rpc/plugins.setPluginAssignments":{"put":{"description":"Replace all assignments for a plugin with the given list of principal URNs.","operationId":"setPluginAssignments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPluginAssignmentsForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPluginAssignmentsResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setPluginAssignments plugins","tags":["plugins"],"x-speakeasy-name-override":"setPluginAssignments","x-speakeasy-react-hook":{"name":"SetPluginAssignments"}}},"/rpc/plugins.updatePlugin":{"put":{"description":"Update plugin metadata.","operationId":"updatePlugin","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePluginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"updatePlugin","x-speakeasy-react-hook":{"name":"UpdatePlugin"}}},"/rpc/plugins.updatePluginServer":{"put":{"description":"Update a server's configuration within a plugin.","operationId":"updatePluginServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePluginServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"updatePluginServer","x-speakeasy-react-hook":{"name":"UpdatePluginServer"}}},"/rpc/productFeatures.get":{"get":{"description":"Get the current state of all product feature flags.","operationId":"getProductFeatures","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductFeaturesResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getProductFeatures features","tags":["features"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"ProductFeatures"}}},"/rpc/productFeatures.set":{"post":{"description":"Enable or disable an organization feature flag.","operationId":"setProductFeature","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductFeatureRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"setProductFeature features","tags":["features"],"x-speakeasy-name-override":"set"}},"/rpc/projects.create":{"post":{"description":"Create a new project.","operationId":"createProject","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createProject projects","tags":["projects"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateProject"}}},"/rpc/projects.delete":{"delete":{"description":"Delete a project by its ID","operationId":"deleteProject","parameters":[{"allowEmptyValue":true,"description":"The id of the project to delete","in":"query","name":"id","required":true,"schema":{"description":"The id of the project to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteProject projects","tags":["projects"],"x-speakeasy-name-override":"deleteById","x-speakeasy-react-hook":{"name":"DeleteProject"}}},"/rpc/projects.get":{"get":{"description":"Get project details by slug.","operationId":"getProject","parameters":[{"allowEmptyValue":true,"description":"The slug of the project to get","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getProject projects","tags":["projects"],"x-speakeasy-name-override":"read","x-speakeasy-react-hook":{"name":"Project"}}},"/rpc/projects.list":{"get":{"description":"List all projects for an organization.","operationId":"listProjects","parameters":[{"allowEmptyValue":true,"description":"The ID of the organization to list projects for","in":"query","name":"organization_id","required":true,"schema":{"description":"The ID of the organization to list projects for","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listProjects projects","tags":["projects"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListProjects"}}},"/rpc/projects.listAllowedOrigins":{"get":{"description":"List allowed origins for a project.","operationId":"listAllowedOrigins","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAllowedOriginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAllowedOrigins projects","tags":["projects"],"x-speakeasy-name-override":"listAllowedOrigins","x-speakeasy-react-hook":{"name":"ListAllowedOrigins"}}},"/rpc/projects.setLogo":{"post":{"description":"Uploads a logo for a project.","operationId":"setProjectLogo","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSignedAssetURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectLogoResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setLogo projects","tags":["projects"],"x-speakeasy-name-override":"setLogo","x-speakeasy-react-hook":{"name":"setProjectLogo"}}},"/rpc/projects.setOrganizationWhitelist":{"post":{"description":"Set organization whitelist status (admin only - requires speakeasy-team API key)","operationId":"setOrganizationWhitelist","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrganizationWhitelistRequestBody"}}},"required":true},"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"setOrganizationWhitelist projects","tags":["projects"],"x-speakeasy-name-override":"setOrganizationWhitelist"}},"/rpc/projects.upsertAllowedOrigin":{"post":{"description":"Upsert an allowed origin for a project.","operationId":"upsertAllowedOrigin","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"upsertAllowedOrigin projects","tags":["projects"],"x-speakeasy-name-override":"upsertAllowedOrigin","x-speakeasy-react-hook":{"name":"UpsertAllowedOrigin"}}},"/rpc/remoteMcp.createServer":{"post":{"description":"Create a new remote MCP server","operationId":"createRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"createServer","x-speakeasy-react-hook":{"name":"CreateRemoteMcpServer"}}},"/rpc/remoteMcp.deleteServer":{"delete":{"description":"Delete a remote MCP server","operationId":"deleteRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the remote MCP server to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the remote MCP server to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"deleteServer","x-speakeasy-react-hook":{"name":"DeleteRemoteMcpServer"}}},"/rpc/remoteMcp.getServer":{"get":{"description":"Get a remote MCP server by ID or slug. Exactly one of id or slug must be provided.","operationId":"getRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the remote MCP server. Mutually exclusive with slug.","in":"query","name":"id","schema":{"description":"The ID of the remote MCP server. Mutually exclusive with slug.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug of the remote MCP server. Mutually exclusive with id.","in":"query","name":"slug","schema":{"description":"The slug of the remote MCP server. Mutually exclusive with id.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"getServer","x-speakeasy-react-hook":{"name":"GetRemoteMcpServer"}}},"/rpc/remoteMcp.listServers":{"get":{"description":"List all remote MCP servers for a project","operationId":"listRemoteMcpServers","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListServersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listServers remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"listServers","x-speakeasy-react-hook":{"name":"RemoteMcpServers"}}},"/rpc/remoteMcp.updateServer":{"post":{"description":"Update a remote MCP server","operationId":"updateRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"updateServer","x-speakeasy-react-hook":{"name":"UpdateRemoteMcpServer"}}},"/rpc/remoteMcp.verifyURL":{"post":{"description":"Probe a candidate remote MCP server URL by issuing an MCP initialize request and reporting the outcome. Used to give users a reachability signal before they save a new or updated remote MCP server. Treats reachable-but-401/403 responses as verified — auth verification is intentionally out of scope.","operationId":"verifyRemoteMcpURL","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"verifyURL remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"verifyURL","x-speakeasy-react-hook":{"name":"VerifyRemoteMcpURL"}}},"/rpc/remoteSessionClients.cloneClientFromOAuthProxyProvider":{"post":{"description":"Platform-admin-only. Clone the client_id / client_secret from an existing oauth_proxy_provider into a new remote_session_client paired with the supplied issuers. The upstream secret stays server-side: it is read from the proxy provider's stored secrets, re-encrypted, and persisted on the remote_session_client row without ever crossing the wire.","operationId":"cloneClientFromOAuthProxyProvider","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneClientFromOAuthProxyProviderForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneClientFromOAuthProxyProvider remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"cloneClientFromOAuthProxyProvider","x-speakeasy-react-hook":{"name":"CloneClientFromOAuthProxyProvider"}}},"/rpc/remoteSessionClients.create":{"post":{"description":"Register a remote_session_client by supplying a client_id and optional client_secret obtained out-of-band from the upstream issuer.","operationId":"createRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRemoteSessionClientForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateRemoteSessionClient"}}},"/rpc/remoteSessionClients.delete":{"delete":{"description":"Soft-delete a remote_session_client. Cascades to remote_sessions rows pointing at this client; affected principals are forced to re-authenticate.","operationId":"deleteRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"The remote_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteRemoteSessionClient"}}},"/rpc/remoteSessionClients.get":{"get":{"description":"Get a remote_session_client by id.","operationId":"getRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"The remote_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RemoteSessionClient"}}},"/rpc/remoteSessionClients.list":{"get":{"description":"List remote_session_clients in the caller's project.","operationId":"listRemoteSessionClients","parameters":[{"allowEmptyValue":true,"description":"Filter to clients registered with this issuer.","in":"query","name":"remote_session_issuer_id","schema":{"description":"Filter to clients registered with this issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter to clients paired with this user_session_issuer.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter to clients paired with this user_session_issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionClientsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessionClients remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessionClients"}}},"/rpc/remoteSessionClients.update":{"post":{"description":"Rotate the client_secret or change the user_session_issuer_id linkage on an existing remote_session_client.","operationId":"updateRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRemoteSessionClientForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateRemoteSessionClient"}}},"/rpc/remoteSessionIssuers.create":{"post":{"description":"Create a new remote_session_issuer.","operationId":"createRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRemoteSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.delete":{"delete":{"description":"Soft-delete a remote_session_issuer. Blocked if any remote_session_clients still reference it.","operationId":"deleteRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The remote_session_issuer id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.discover":{"post":{"description":"Hit an upstream issuer's RFC 8414 .well-known/oauth-authorization-server document and return a draft suitable for createRemoteSessionIssuer. No persistence.","operationId":"discoverRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRemoteSessionIssuerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuerDraft"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"discoverRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"discover","x-speakeasy-react-hook":{"name":"DiscoverRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.get":{"get":{"description":"Get a remote_session_issuer by id or by slug. Provide exactly one.","operationId":"getRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The remote_session_issuer id.","in":"query","name":"id","schema":{"description":"The remote_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The remote_session_issuer slug.","in":"query","name":"slug","schema":{"description":"The remote_session_issuer slug.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.list":{"get":{"description":"List remote_session_issuers in the caller's project.","operationId":"listRemoteSessionIssuers","parameters":[{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionIssuersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessionIssuers remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessionIssuers"}}},"/rpc/remoteSessionIssuers.update":{"post":{"description":"Update fields on an existing remote_session_issuer.","operationId":"updateRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRemoteSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateRemoteSessionIssuer"}}},"/rpc/remoteSessions.list":{"get":{"description":"List remote_sessions in the caller's project. access_token_encrypted and refresh_token_encrypted are never returned — only metadata (access_expires_at, refresh_expires_at, scopes).","operationId":"listRemoteSessions","parameters":[{"allowEmptyValue":true,"description":"Exact-match filter on subject URN.","in":"query","name":"subject_urn","schema":{"description":"Exact-match filter on subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by remote_session_client id.","in":"query","name":"remote_session_client_id","schema":{"description":"Filter by remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessions remoteSessions","tags":["remoteSessions"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessions"}}},"/rpc/remoteSessions.revoke":{"post":{"description":"Drop a remote_session row. The next /mcp call by that principal triggers a fresh authn challenge.","operationId":"revokeRemoteSession","parameters":[{"allowEmptyValue":true,"description":"The remote_session id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeRemoteSession remoteSessions","tags":["remoteSessions"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeRemoteSession"}}},"/rpc/resources.list":{"get":{"description":"List all resources for a project","operationId":"listResources","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of resources to return per page","in":"query","name":"limit","schema":{"description":"The number of resources to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResourcesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listResources resources","tags":["resources"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListResources"}}},"/rpc/risk.approvals.create":{"post":{"description":"Approve a shadow-MCP server so the named policy stops blocking calls to it. `match` is the same opaque server identifier surfaced in `RiskResult.match` — typically a server URL, stdio command, or `mcp__\u003cserver\u003e__` prefix.","operationId":"approveShadowMCP","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveShadowMCPRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShadowMCPApproval"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"approveShadowMCP risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"RiskApproveShadowMCP","type":"mutation"}}},"/rpc/risk.approvals.delete":{"delete":{"description":"Remove a previously-approved shadow-MCP server for a policy.","operationId":"revokeShadowMCPApproval","parameters":[{"allowEmptyValue":true,"description":"The risk policy ID.","in":"query","name":"policy_id","required":true,"schema":{"description":"The risk policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The MCP server identifier to revoke — exactly the value used to approve.","in":"query","name":"match","required":true,"schema":{"description":"The MCP server identifier to revoke — exactly the value used to approve.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"revokeShadowMCPApproval risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"delete"}},"/rpc/risk.approvals.list":{"get":{"description":"List shadow-MCP approvals (URL- or command-keyed) for a policy. Temporary Redis-backed storage; will move to a dedicated table once the feature graduates.","operationId":"listShadowMCPApprovals","parameters":[{"allowEmptyValue":true,"description":"The risk policy ID.","in":"query","name":"policy_id","required":true,"schema":{"description":"The risk policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShadowMCPApprovalsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listShadowMCPApprovals risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListShadowMCPApprovals"}}},"/rpc/risk.capabilities.get":{"get":{"description":"Get server-side risk analysis capabilities for the current project.","operationId":"getRiskCapabilities","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCapabilitiesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskCapabilities risk","tags":["risk"],"x-speakeasy-group":"risk.capabilities","x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RiskCapabilities"}}},"/rpc/risk.categories":{"get":{"description":"Return the canonical risk category definitions: metadata (label/description/icon) plus the classification (source / rule_id list / rule_id prefix) used to bucket findings. Dashboards and CLIs should call this instead of maintaining their own copy of the mapping.","operationId":"listRiskCategories","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCategoriesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskCategories risk","tags":["risk"],"x-speakeasy-group":"risk.categories","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskCategories"}}},"/rpc/risk.overview.get":{"get":{"description":"Get risk overview metrics and trend data for the current project.","operationId":"getRiskOverview","parameters":[{"allowEmptyValue":true,"description":"Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.","in":"query","name":"from","schema":{"description":"Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the overview window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the overview window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskOverview risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RiskOverview"}}},"/rpc/risk.overview.rules":{"get":{"description":"Get per-rule_id finding counts for a category within a time window. Powers the per-category drill-down chart on /risk-overview.","operationId":"getRiskRuleBreakdown","parameters":[{"allowEmptyValue":true,"description":"Required category key to break down by rule_id (e.g. secrets, pii).","in":"query","name":"category","required":true,"schema":{"description":"Required category key to break down by rule_id (e.g. secrets, pii).","type":"string"}},{"allowEmptyValue":true,"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","in":"query","name":"from","schema":{"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRuleBreakdownResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskRuleBreakdown risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"rules","x-speakeasy-react-hook":{"name":"RiskRuleBreakdown"}}},"/rpc/risk.overview.userBreakdown":{"get":{"description":"Per-user breakdowns of findings by category and by rule_id within a time window. Powers the user drill-down on /risk-overview.","operationId":"getRiskUserBreakdown","parameters":[{"allowEmptyValue":true,"description":"External user identifier to scope the breakdown to.","in":"query","name":"external_user_id","required":true,"schema":{"description":"External user identifier to scope the breakdown to.","type":"string"}},{"allowEmptyValue":true,"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","in":"query","name":"from","schema":{"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskUserBreakdownResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskUserBreakdown risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"userBreakdown","x-speakeasy-react-hook":{"name":"RiskUserBreakdown"}}},"/rpc/risk.policies.create":{"post":{"description":"Create a new risk analysis policy for the current project.","operationId":"createRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskPolicyRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"RiskCreatePolicy","type":"mutation"}}},"/rpc/risk.policies.delete":{"delete":{"description":"Delete a risk analysis policy.","operationId":"deleteRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"delete"}},"/rpc/risk.policies.get":{"get":{"description":"Get a risk analysis policy by ID.","operationId":"getRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"get"}},"/rpc/risk.policies.list":{"get":{"description":"List all risk analysis policies for the current project.","operationId":"listRiskPolicies","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskPoliciesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskPolicies risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListPolicies"}}},"/rpc/risk.policies.status":{"get":{"description":"Get the analysis status of a risk policy including progress and workflow state.","operationId":"getRiskPolicyStatus","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicyStatus"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskPolicyStatus risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"status"}},"/rpc/risk.policies.trigger":{"post":{"description":"Manually trigger risk analysis for a policy, starting or signaling the drain workflow. Defaults to the most recent 100 unanalyzed messages; pass `limit=0` to backfill every unanalyzed message.","operationId":"triggerRiskAnalysis","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRiskAnalysisRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"triggerRiskAnalysis risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"trigger"}},"/rpc/risk.policies.update":{"put":{"description":"Update a risk analysis policy.","operationId":"updateRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskPolicyRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"update"}},"/rpc/risk.results.byChat":{"get":{"description":"List risk results grouped by chat session for the current project.","operationId":"listRiskResultsByChat","parameters":[{"allowEmptyValue":true,"description":"Cursor to fetch the next page of results.","in":"query","name":"cursor","schema":{"description":"Cursor to fetch the next page of results.","type":"string"}},{"allowEmptyValue":true,"description":"Maximum number of results to return per page.","in":"query","name":"limit","schema":{"description":"Maximum number of results to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskResultsByChatResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskResultsByChat risk","tags":["risk"],"x-speakeasy-group":"risk.results","x-speakeasy-name-override":"byChat","x-speakeasy-react-hook":{"name":"RiskListResultsByChat"}}},"/rpc/risk.results.list":{"get":{"description":"List risk analysis results for the current project.","operationId":"listRiskResults","parameters":[{"allowEmptyValue":true,"description":"Optional policy ID to filter by.","in":"query","name":"policy_id","schema":{"description":"Optional policy ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional chat ID to filter by.","in":"query","name":"chat_id","schema":{"description":"Optional chat ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","in":"query","name":"category","schema":{"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","in":"query","name":"rule_id","schema":{"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","type":"string"}},{"allowEmptyValue":true,"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","in":"query","name":"unique_match","schema":{"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","type":"boolean"}},{"allowEmptyValue":true,"description":"Filter results to messages created at or after this timestamp (ISO 8601).","in":"query","name":"from","schema":{"description":"Filter results to messages created at or after this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","in":"query","name":"to","schema":{"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Cursor to fetch the next page of results.","in":"query","name":"cursor","schema":{"description":"Cursor to fetch the next page of results.","type":"string"}},{"allowEmptyValue":true,"description":"Maximum number of results to return per page.","in":"query","name":"limit","schema":{"description":"Maximum number of results to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskResultsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskResults risk","tags":["risk"],"x-speakeasy-group":"risk.results","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListResults"}}},"/rpc/slack-apps.configure":{"post":{"description":"Store Slack credentials (client ID, client secret, signing secret) for an app.","operationId":"configureSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"configureSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"configureSlackApp","x-speakeasy-react-hook":{"name":"configureSlackApp"}}},"/rpc/slack-apps.create":{"post":{"description":"Create a new Slack app and generate its manifest.","operationId":"createSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"createSlackApp","x-speakeasy-react-hook":{"name":"createSlackApp"}}},"/rpc/slack-apps.delete":{"delete":{"description":"Soft-delete a Slack app.","operationId":"deleteSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackApp","x-speakeasy-react-hook":{"name":"deleteSlackApp"}}},"/rpc/slack-apps.get":{"get":{"description":"Get details of a specific Slack app.","operationId":"getSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"getSlackApp","x-speakeasy-react-hook":{"name":"getSlackApp"}}},"/rpc/slack-apps.list":{"get":{"description":"List Slack apps for a project.","operationId":"listSlackApps","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSlackAppsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listSlackApps slack","tags":["slack"],"x-speakeasy-name-override":"listSlackApps","x-speakeasy-react-hook":{"name":"listSlackApps"}}},"/rpc/slack-apps.update":{"put":{"description":"Update a Slack app's settings.","operationId":"updateSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackApp","x-speakeasy-react-hook":{"name":"updateSlackApp"}}},"/rpc/telemetry.captureEvent":{"post":{"description":"Capture a telemetry event and forward it to PostHog","operationId":"captureEvent","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"captureEvent telemetry","tags":["telemetry"],"x-speakeasy-name-override":"captureEvent"}},"/rpc/telemetry.getHooksSummary":{"post":{"description":"Get aggregated hooks metrics grouped by server","operationId":"getHooksSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHooksSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHooksSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getHooksSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getHooksSummary","x-speakeasy-react-hook":{"name":"GetHooksSummary","type":"query"}}},"/rpc/telemetry.getObservabilityOverview":{"post":{"description":"Get observability overview metrics including time series, tool breakdowns, and summary stats","operationId":"getObservabilityOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getObservabilityOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getObservabilityOverview","x-speakeasy-react-hook":{"name":"GetObservabilityOverview","type":"query"}}},"/rpc/telemetry.getProjectMetricsSummary":{"post":{"description":"Get aggregated metrics summary for an entire project","operationId":"getProjectMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectMetricsSummary","x-speakeasy-react-hook":{"name":"GetProjectMetricsSummary","type":"query"}}},"/rpc/telemetry.getProjectOverview":{"post":{"description":"Get project-level overview including total chats, tool calls, active servers/users, and top lists","operationId":"getProjectOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectOverview","x-speakeasy-react-hook":{"name":"GetProjectOverview","type":"query"}}},"/rpc/telemetry.getUserMetricsSummary":{"post":{"description":"Get aggregated metrics summary grouped by user","operationId":"getUserMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getUserMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getUserMetricsSummary","x-speakeasy-react-hook":{"name":"GetUserMetricsSummary","type":"query"}}},"/rpc/telemetry.listAttributeKeys":{"post":{"description":"List distinct attribute keys available for filtering","operationId":"listAttributeKeys","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttributeKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAttributeKeys telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listAttributeKeys","x-speakeasy-react-hook":{"name":"ListAttributeKeys","type":"query"}}},"/rpc/telemetry.listFilterOptions":{"post":{"description":"List available filter options (API keys or users) for the observability overview","operationId":"listFilterOptions","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listFilterOptions telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listFilterOptions","x-speakeasy-react-hook":{"name":"ListFilterOptions","type":"query"}}},"/rpc/telemetry.listHooksTraces":{"post":{"description":"List hook traces aggregated by trace_id with user information","operationId":"listHooksTraces","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHooksTracesPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHooksTracesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listHooksTraces telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listHooksTraces","x-speakeasy-react-hook":{"name":"ListHooksTraces","type":"query"}}},"/rpc/telemetry.searchChats":{"post":{"description":"Search and list chat session summaries that match a search filter","operationId":"searchChats","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchChats telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchChats","x-speakeasy-react-hook":{"name":"SearchChats","type":"query"}}},"/rpc/telemetry.searchLogs":{"post":{"description":"Search and list telemetry logs that match a search filter","operationId":"searchLogs","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchLogs telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchLogs","x-speakeasy-react-hook":{"name":"SearchLogs"}}},"/rpc/telemetry.searchToolCalls":{"post":{"description":"Search and list tool calls that match a search filter","operationId":"searchToolCalls","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchToolCalls telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchToolCalls","x-speakeasy-react-hook":{"name":"SearchToolCalls"}}},"/rpc/telemetry.searchUsers":{"post":{"description":"Search and list user usage summaries grouped by user_id or external_user_id","operationId":"searchUsers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchUsers telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchUsers","x-speakeasy-react-hook":{"name":"SearchUsers","type":"query"}}},"/rpc/templates.create":{"post":{"description":"Create a new prompt template.","operationId":"createTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createTemplate templates","tags":["templates"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTemplate"}}},"/rpc/templates.delete":{"delete":{"description":"Delete prompt template by its ID or name.","operationId":"deleteTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteTemplate templates","tags":["templates"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTemplate"}}},"/rpc/templates.get":{"get":{"description":"Get prompt template by its ID or name.","operationId":"getTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getTemplate templates","tags":["templates"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Template"}}},"/rpc/templates.list":{"get":{"description":"List available prompt template.","operationId":"listTemplates","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPromptTemplatesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listTemplates templates","tags":["templates"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Templates"}}},"/rpc/templates.render":{"post":{"description":"Render a prompt template by ID with provided input data.","operationId":"renderTemplateByID","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template to render","in":"query","name":"id","required":true,"schema":{"description":"The ID of the prompt template to render","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateByIDRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplateByID templates","tags":["templates"],"x-speakeasy-name-override":"renderByID","x-speakeasy-react-hook":{"name":"RenderTemplateByID","type":"query"}}},"/rpc/templates.renderDirect":{"post":{"description":"Render a prompt template directly with all template fields provided.","operationId":"renderTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplate templates","tags":["templates"],"x-speakeasy-name-override":"render","x-speakeasy-react-hook":{"name":"RenderTemplate","type":"query"}}},"/rpc/templates.update":{"post":{"description":"Update a prompt template.","operationId":"updateTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateTemplate templates","tags":["templates"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTemplate"}}},"/rpc/tools.list":{"get":{"description":"List all tools for a project","operationId":"listTools","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of tools to return per page","in":"query","name":"limit","schema":{"description":"The number of tools to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","in":"query","name":"urn_prefix","schema":{"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","type":"string"}},{"allowEmptyValue":true,"in":"query","name":"tool_types","schema":{"default":["http","function","prompt","platform"],"items":{"description":"The type of tool","enum":["http","prompt","function","platform","externalmcp"],"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTools tools","tags":["tools"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListTools"}}},"/rpc/toolsets.addExternalOAuthServer":{"post":{"description":"Associate an external OAuth server with a toolset","operationId":"addExternalOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExternalOAuthServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addExternalOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addExternalOAuthServer","x-speakeasy-react-hook":{"name":"AddExternalOAuthServer"}}},"/rpc/toolsets.addOAuthProxyServer":{"post":{"description":"Associate an OAuth proxy server with a toolset (admin only)","operationId":"addOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addOAuthProxyServer","x-speakeasy-react-hook":{"name":"AddOAuthProxyServer"}}},"/rpc/toolsets.checkMCPSlugAvailability":{"get":{"description":"Check if a MCP slug is available","operationId":"checkMCPSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMCPSlugAvailability toolsets","tags":["toolsets"],"x-speakeasy-name-override":"checkMCPSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMCPSlugAvailability"}}},"/rpc/toolsets.clone":{"post":{"description":"Clone an existing toolset with a new name","operationId":"cloneToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Authorization":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"cloneBySlug","x-speakeasy-react-hook":{"name":"CloneToolset"}}},"/rpc/toolsets.create":{"post":{"description":"Create a new toolset with associated tools","operationId":"createToolset","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateToolset"}}},"/rpc/toolsets.delete":{"delete":{"description":"Delete a toolset by its ID","operationId":"deleteToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteToolset"}}},"/rpc/toolsets.get":{"get":{"description":"Get detailed information about a toolset including full HTTP tool definitions","operationId":"getToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Toolset"}}},"/rpc/toolsets.list":{"get":{"description":"List all toolsets for a project","operationId":"listToolsets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listToolsets toolsets","tags":["toolsets"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListToolsets"}}},"/rpc/toolsets.listForOrg":{"get":{"description":"List all toolsets across the organization (summary view)","operationId":"listToolsetsForOrg","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetSummariesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"listToolsetsForOrg toolsets","tags":["toolsets"],"x-speakeasy-name-override":"listForOrg","x-speakeasy-react-hook":{"name":"ListToolsetsForOrg"}}},"/rpc/toolsets.removeOAuthServer":{"post":{"description":"Remove OAuth server association from a toolset","operationId":"removeOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"removeOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"removeOAuthServer","x-speakeasy-react-hook":{"name":"RemoveOAuthServer"}}},"/rpc/toolsets.setUserSessionIssuer":{"post":{"description":"Link a toolset to a user_session_issuer (or pass null to unlink). The user_session_issuer must already exist in the caller's project.","operationId":"setToolsetUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to link","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserSessionIssuerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"setUserSessionIssuer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"setUserSessionIssuer","x-speakeasy-react-hook":{"name":"SetToolsetUserSessionIssuer"}}},"/rpc/toolsets.update":{"post":{"description":"Update a toolset's properties including name, description, and HTTP tools","operationId":"updateToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateToolset"}}},"/rpc/toolsets.updateOAuthProxyServer":{"post":{"description":"Update an existing OAuth proxy server associated with a toolset","operationId":"updateOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset whose OAuth proxy server to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateOAuthProxyServer","x-speakeasy-react-hook":{"name":"UpdateOAuthProxyServer"}}},"/rpc/triggers.create":{"post":{"description":"Create a trigger instance.","operationId":"createTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTriggerInstanceForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTrigger"}}},"/rpc/triggers.definitions.list":{"get":{"description":"List static trigger definitions available to a project.","operationId":"listTriggerDefinitions","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTriggerDefinitionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTriggerDefinitions triggers","tags":["triggers"],"x-speakeasy-name-override":"listDefinitions","x-speakeasy-react-hook":{"name":"TriggerDefinitions"}}},"/rpc/triggers.delete":{"delete":{"description":"Delete a trigger instance.","operationId":"deleteTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTrigger"}}},"/rpc/triggers.get":{"get":{"description":"Get a trigger instance by ID.","operationId":"getTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Trigger"}}},"/rpc/triggers.list":{"get":{"description":"List trigger instances for the current project.","operationId":"listTriggerInstances","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTriggerInstancesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTriggerInstances triggers","tags":["triggers"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Triggers"}}},"/rpc/triggers.pause":{"post":{"description":"Pause a trigger instance.","operationId":"pauseTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"pauseTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"pause","x-speakeasy-react-hook":{"name":"PauseTrigger"}}},"/rpc/triggers.resume":{"post":{"description":"Resume a trigger instance.","operationId":"resumeTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"resumeTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"resume","x-speakeasy-react-hook":{"name":"ResumeTrigger"}}},"/rpc/triggers.update":{"post":{"description":"Update a trigger instance.","operationId":"updateTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTriggerInstanceForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTrigger"}}},"/rpc/usage.createCheckout":{"post":{"description":"Create a checkout link for upgrading to the business plan","operationId":"createCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createCheckout","x-speakeasy-react-hook":{"name":"createCheckout"}}},"/rpc/usage.createCustomerSession":{"post":{"description":"Create a customer session for the user","operationId":"createCustomerSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createCustomerSession usage","tags":["usage"],"x-speakeasy-name-override":"createCustomerSession","x-speakeasy-react-hook":{"name":"createCustomerSession"}}},"/rpc/usage.createTopUpCheckout":{"post":{"description":"Create a checkout link for a one-time credit top-up purchase","operationId":"createTopUpCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createTopUpCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createTopUpCheckout","x-speakeasy-react-hook":{"name":"createTopUpCheckout"}}},"/rpc/usage.getPeriodUsage":{"get":{"description":"Get the usage for an organization for a given period","operationId":"getPeriodUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodUsage"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getPeriodUsage usage","tags":["usage"],"x-speakeasy-name-override":"getPeriodUsage","x-speakeasy-react-hook":{"name":"getPeriodUsage"}}},"/rpc/usage.getUsageTiers":{"get":{"description":"Get the usage tiers","operationId":"getUsageTiers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTiers"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"getUsageTiers usage","tags":["usage"],"x-speakeasy-name-override":"getUsageTiers","x-speakeasy-react-hook":{"name":"getUsageTiers"}}},"/rpc/userSessionClients.get":{"get":{"description":"Get a user_session_client by id.","operationId":"getUserSessionClient","parameters":[{"allowEmptyValue":true,"description":"The user_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getUserSessionClient userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"UserSessionClient"}}},"/rpc/userSessionClients.list":{"get":{"description":"List user_session_clients in the caller's project.","operationId":"listUserSessionClients","parameters":[{"allowEmptyValue":true,"description":"Filter to clients registered with this issuer.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter to clients registered with this issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionClientsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionClients userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionClients"}}},"/rpc/userSessionClients.revoke":{"post":{"description":"Soft-delete a user_session_client. Future tokens minted for this client_id are rejected; existing live user_sessions keep working until they hit expires_at.","operationId":"revokeUserSessionClient","parameters":[{"allowEmptyValue":true,"description":"The user_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSessionClient userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSessionClient"}}},"/rpc/userSessionConsents.list":{"get":{"description":"List consent records for the caller's project.","operationId":"listUserSessionConsents","parameters":[{"allowEmptyValue":true,"description":"Filter by subject URN.","in":"query","name":"subject_urn","schema":{"description":"Filter by subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_client id.","in":"query","name":"user_session_client_id","schema":{"description":"Filter by user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_issuer id (joins through user_session_clients).","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter by user_session_issuer id (joins through user_session_clients).","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionConsentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionConsents userSessionConsents","tags":["userSessionConsents"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionConsents"}}},"/rpc/userSessionConsents.revoke":{"post":{"description":"Withdraw consent. Subsequent authorization requests for matching (subject, user_session_client) pairs re-prompt.","operationId":"revokeUserSessionConsent","parameters":[{"allowEmptyValue":true,"description":"The user_session_consent id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_consent id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSessionConsent userSessionConsents","tags":["userSessionConsents"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSessionConsent"}}},"/rpc/userSessionIssuers.create":{"post":{"description":"Create a new user_session_issuer.","operationId":"createUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateUserSessionIssuer"}}},"/rpc/userSessionIssuers.delete":{"delete":{"description":"Soft-delete a user_session_issuer. Cascades to dependent user_sessions, user_session_consents, and remote_session_clients.","operationId":"deleteUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The user_session_issuer id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteUserSessionIssuer"}}},"/rpc/userSessionIssuers.get":{"get":{"description":"Get a user_session_issuer by id or by slug. Provide exactly one.","operationId":"getUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The user_session_issuer id.","in":"query","name":"id","schema":{"description":"The user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The user_session_issuer slug.","in":"query","name":"slug","schema":{"description":"The user_session_issuer slug.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"UserSessionIssuer"}}},"/rpc/userSessionIssuers.list":{"get":{"description":"List user_session_issuers in the caller's project.","operationId":"listUserSessionIssuers","parameters":[{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionIssuersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionIssuers userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionIssuers"}}},"/rpc/userSessionIssuers.update":{"post":{"description":"Update fields on an existing user_session_issuer.","operationId":"updateUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateUserSessionIssuer"}}},"/rpc/userSessions.list":{"get":{"description":"List issued user_sessions in the caller's project. refresh_token_hash is never returned.","operationId":"listUserSessions","parameters":[{"allowEmptyValue":true,"description":"Exact-match filter on subject URN.","in":"query","name":"subject_urn","schema":{"description":"Exact-match filter on subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_issuer id.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter by user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessions userSessions","tags":["userSessions"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessions"}}},"/rpc/userSessions.revoke":{"post":{"description":"Push the session's jti into the revocation cache and soft-delete the row.","operationId":"revokeUserSession","parameters":[{"allowEmptyValue":true,"description":"The user_session id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSession userSessions","tags":["userSessions"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSession"}}},"/rpc/variations.deleteGlobal":{"delete":{"description":"Create or update a globally defined tool variation.","operationId":"deleteGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"The ID of the variation to delete","in":"query","name":"variation_id","required":true,"schema":{"description":"The ID of the variation to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteGlobal variations","tags":["variations"],"x-speakeasy-name-override":"deleteGlobal","x-speakeasy-react-hook":{"name":"deleteGlobalVariation"}}},"/rpc/variations.listGlobal":{"get":{"description":"List globally defined tool variations.","operationId":"listGlobalVariations","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVariationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listGlobal variations","tags":["variations"],"x-speakeasy-name-override":"listGlobal","x-speakeasy-react-hook":{"name":"GlobalVariations"}}},"/rpc/variations.upsertGlobal":{"post":{"description":"Create or update a globally defined tool variation.","operationId":"upsertGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"upsertGlobal variations","tags":["variations"],"x-speakeasy-name-override":"upsertGlobal","x-speakeasy-react-hook":{"name":"UpsertGlobalVariation"}}}},"components":{"schemas":{"AccessMember":{"type":"object","properties":{"email":{"type":"string","description":"Email address."},"id":{"type":"string","description":"User ID."},"joined_at":{"type":"string","description":"When the member joined the organization.","format":"date-time"},"name":{"type":"string","description":"Display name."},"photo_url":{"type":"string","description":"Avatar URL."},"role_ids":{"type":"array","items":{"type":"string"},"description":"All role IDs assigned to this member."}},"required":["id","name","email","role_ids","joined_at"]},"AddDeploymentPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["name"]},"AddExternalMCPForm":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the external MCP server.","example":"My Slack Integration"},"organization_mcp_collection_registry_id":{"type":"string","description":"The ID of the internal collection registry the server is from.","format":"uuid"},"registry_id":{"type":"string","description":"The ID of the external MCP registry the server is from.","format":"uuid"},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry (e.g., 'slack', 'ai.exa/exa').","example":"slack"},"selected_remotes":{"type":"array","items":{"type":"string"},"description":"URLs of the remotes to use for this MCP server. If not provided, the backend will auto-select based on transport type preference.","example":["https://mcp.example.com/sse"]},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["name","slug","registry_server_specifier"]},"AddExternalOAuthServerForm":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","external_oauth_server"]},"AddExternalOAuthServerRequestBody":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"}},"required":["external_oauth_server"]},"AddFunctionsForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the functions file from the assets service."},"memory_mib":{"type":"integer","description":"The amount of memory in MiB to allocate for the function (1 MiB = 1024 * 1024 bytes).","format":"int64","minimum":0,"maximum":4096},"name":{"type":"string","description":"The functions file display name."},"runtime":{"type":"string","description":"The runtime to use when executing functions. Allowed values are: nodejs:22, nodejs:24, python:3.12."},"scale":{"type":"integer","description":"The number of instances to scale the function to.","format":"int64","minimum":0,"maximum":5},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug","runtime"]},"AddOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"AddOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"}},"required":["oauth_proxy_server"]},"AddOpenAPIv3DeploymentAssetForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"AddPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package to add."},"version":{"type":"string","description":"The version of the package to add. If omitted, the latest version will be used."}},"required":["name"]},"AddPluginServerForm":{"type":"object","properties":{"display_name":{"type":"string","description":"Display name for the server."},"plugin_id":{"type":"string","format":"uuid"},"policy":{"type":"string","default":"required","enum":["required","optional"]},"sort_order":{"type":"integer","default":0,"format":"int32"},"toolset_id":{"type":"string","description":"Gram toolset ID for the MCP server.","format":"uuid"}},"required":["plugin_id","toolset_id","display_name"]},"AdminListOrganizationMembersResult":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationMember"},"description":"The members of the organization."}},"required":["members"]},"AdminListOrganizationProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/AdminProject"},"description":"The projects belonging to the organization."}},"required":["projects"]},"AdminListOrganizationsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganization"},"description":"The page of organizations."}},"required":["organizations"]},"AdminOrganization":{"type":"object","properties":{"account_type":{"type":"string","description":"Gram account type (e.g. free, pro, enterprise)."},"created_at":{"type":"string","description":"The creation date of the organization.","format":"date-time"},"disabled_at":{"type":"string","description":"The time at which the organization was disabled, if any.","format":"date-time"},"free_trial_ends_at":{"type":"string","description":"The time at which the free trial ends.","format":"date-time"},"free_trial_started_at":{"type":"string","description":"The time at which the free trial started.","format":"date-time"},"id":{"type":"string","description":"The ID of the organization"},"member_count":{"type":"integer","description":"Number of active members in the organization.","format":"int64"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"},"updated_at":{"type":"string","description":"The last update date of the organization.","format":"date-time"},"whitelisted":{"type":"boolean","description":"Whether the organization is whitelisted for full access."},"workos_id":{"type":"string","description":"WorkOS organization ID, if linked."}},"description":"Organization details surfaced to admin operators.","required":["id","name","slug","account_type","whitelisted","member_count","created_at","updated_at"]},"AdminOrganizationMember":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"display_name":{"type":"string","description":"User display name."},"email":{"type":"string","description":"User email address."},"id":{"type":"string","description":"User ID."},"last_login":{"type":"string","description":"The time the user last logged in, if any.","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"description":"Organization member surfaced to admin operators.","required":["id","email","display_name","created_at","updated_at"]},"AdminProject":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"description":"Project summary surfaced to admin operators.","required":["id","name","slug","created_at","updated_at"]},"AdminProjectDetail":{"type":"object","properties":{"api_key_count":{"type":"integer","description":"Number of active API keys in the project.","format":"int64"},"assistant_count":{"type":"integer","description":"Number of active assistants in the project.","format":"int64"},"created_at":{"type":"string","format":"date-time"},"deployment_count":{"type":"integer","description":"Total number of deployments in the project.","format":"int64"},"environment_count":{"type":"integer","description":"Number of active environments in the project.","format":"int64"},"functions_runner_version":{"type":"string","description":"Functions runner version pin, if set."},"http_tool_count":{"type":"integer","description":"Number of active HTTP tool definitions in the project.","format":"int64"},"id":{"type":"string","description":"Project ID."},"logo_asset_id":{"type":"string","description":"Project logo asset ID, if set."},"name":{"type":"string","description":"Project name."},"organization_id":{"type":"string","description":"Owning organization ID."},"slug":{"type":"string","description":"Project slug."},"toolset_count":{"type":"integer","description":"Number of active toolsets in the project.","format":"int64"},"updated_at":{"type":"string","format":"date-time"}},"description":"Full project detail surfaced to admin operators, including aggregated counts of child resources.","required":["id","name","slug","organization_id","toolset_count","deployment_count","http_tool_count","environment_count","api_key_count","assistant_count","created_at","updated_at"]},"AllowedOrigin":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the allowed origin.","format":"date-time"},"id":{"type":"string","description":"The ID of the allowed origin"},"origin":{"type":"string","description":"The origin URL"},"project_id":{"type":"string","description":"The ID of the project"},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]},"updated_at":{"type":"string","description":"The last update date of the allowed origin.","format":"date-time"}},"required":["id","project_id","origin","status","created_at","updated_at"]},"ApproveShadowMCPRequestBody":{"type":"object","properties":{"match":{"type":"string","description":"The MCP server identifier to approve."},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"server_name":{"type":"string","description":"Display name of the MCP server (optional, for UI)."}},"required":["policy_id","match"]},"Asset":{"type":"object","properties":{"content_length":{"type":"integer","description":"The content length of the asset","format":"int64"},"content_type":{"type":"string","description":"The content type of the asset"},"created_at":{"type":"string","description":"The creation date of the asset.","format":"date-time"},"id":{"type":"string","description":"The ID of the asset"},"kind":{"type":"string","enum":["openapiv3","image","functions","chat_attachment","unknown"]},"sha256":{"type":"string","description":"The SHA256 hash of the asset"},"updated_at":{"type":"string","description":"The last update date of the asset.","format":"date-time"}},"required":["id","kind","sha256","content_type","content_length","created_at","updated_at"]},"Assistant":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"id":{"type":"string","description":"The assistant ID.","format":"uuid"},"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Maximum active warm runtimes for the assistant.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"project_id":{"type":"string","description":"The project ID owning the assistant.","format":"uuid"},"status":{"type":"string","description":"The assistant status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"warm_ttl_seconds":{"type":"integer","description":"Warm runtime TTL in seconds.","format":"int64"}},"required":["id","project_id","name","model","instructions","toolsets","warm_ttl_seconds","max_concurrency","status","created_at","updated_at"]},"AssistantMemory":{"type":"object","properties":{"assistant_id":{"type":"string","description":"The assistant ID owning the memory.","format":"uuid"},"content":{"type":"string","description":"The memory content."},"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"deleted_at":{"type":"string","description":"Timestamp at which the memory was soft-deleted.","format":"date-time"},"id":{"type":"string","description":"The assistant memory ID.","format":"uuid"},"last_access":{"type":"string","description":"Timestamp of the most recent access.","format":"date-time"},"superseded_at":{"type":"string","description":"Timestamp at which the memory was superseded by another memory.","format":"date-time"},"supersedes_id":{"type":"string","description":"The ID of the memory this one supersedes, if any.","format":"uuid"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags associated with the memory."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"valid_at":{"type":"string","description":"Timestamp at which the memory becomes valid.","format":"date-time"}},"required":["id","assistant_id","content","tags","created_at","updated_at","last_access","valid_at"]},"AssistantToolsetRef":{"type":"object","properties":{"environment_slug":{"type":"string","description":"Optional environment slug used when invoking the toolset."},"toolset_slug":{"type":"string","description":"The toolset slug exposed to the assistant."}},"required":["toolset_slug"]},"AttachServerRequestBody":{"type":"object","properties":{"collection_id":{"type":"string","description":"ID of the collection","format":"uuid"},"toolset_id":{"type":"string","description":"ID of the toolset to attach","format":"uuid"}},"required":["collection_id","toolset_id"]},"AuditLog":{"type":"object","properties":{"action":{"type":"string"},"actor_display_name":{"type":"string"},"actor_id":{"type":"string"},"actor_slug":{"type":"string"},"actor_type":{"type":"string"},"after_snapshot":{},"before_snapshot":{},"created_at":{"type":"string","description":"The creation date of the audit log.","format":"date-time"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"project_id":{"type":"string"},"project_slug":{"type":"string"},"subject_display_name":{"type":"string"},"subject_id":{"type":"string"},"subject_slug":{"type":"string"},"subject_type":{"type":"string"}},"required":["id","actor_id","actor_type","action","subject_id","subject_type","created_at"]},"AuditLogFacetOption":{"type":"object","properties":{"count":{"type":"integer","description":"The number of audit logs for this facet value","format":"int64"},"display_name":{"type":"string","description":"The display label shown for the facet value"},"value":{"type":"string","description":"The facet value used for filtering"}},"required":["value","display_name","count"]},"AuthzChallenge":{"type":"object","properties":{"evaluated_grant_count":{"type":"integer","description":"Total grants evaluated.","format":"int64"},"id":{"type":"string","description":"Unique challenge identifier."},"matched_grant_count":{"type":"integer","description":"Number of grants that matched.","format":"int64"},"operation":{"type":"string","enum":["require","require_any","filter"]},"organization_id":{"type":"string","description":"Organization the principal was acting in."},"outcome":{"type":"string","enum":["allow","deny","error"]},"photo_url":{"type":"string","description":"User avatar URL when available."},"principal_type":{"type":"string","description":"Kind of principal.","enum":["user","api_key","assistant"]},"principal_urn":{"type":"string","description":"Principal URN e.g. user:\u003cuuid\u003e or api_key:\u003cid\u003e."},"project_id":{"type":"string","description":"Project scope (empty for org-level checks)."},"reason":{"type":"string","enum":["grant_matched","no_grants","scope_unsatisfied","deny_grant","invalid_check","rbac_skipped_apikey","dev_override"]},"resolution_role_slug":{"type":"string","description":"Role slug assigned (when resolution_type=role_assigned)."},"resolution_type":{"type":"string","description":"How the challenge was resolved.","enum":["role_assigned","dismissed"]},"resolved_at":{"type":"string","description":"When the challenge was resolved by an admin.","format":"date-time"},"resolved_by":{"type":"string","description":"URN of the admin who resolved."},"resource_id":{"type":"string","description":"Resource ID of the check."},"resource_kind":{"type":"string","description":"Resource kind of the check."},"role_slugs":{"type":"array","items":{"type":"string"},"description":"Roles the principal had loaded."},"scope":{"type":"string","description":"Scope that was checked."},"timestamp":{"type":"string","description":"When the authz decision was made.","format":"date-time"},"user_email":{"type":"string","description":"Email when available."}},"required":["id","timestamp","organization_id","principal_urn","principal_type","operation","outcome","reason","scope","role_slugs","evaluated_grant_count","matched_grant_count"]},"BaseResourceAttributes":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"description":{"type":"string","description":"Description of the resource"},"id":{"type":"string","description":"The ID of the resource"},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"}},"description":"Common attributes shared by all resource types","required":["id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"BaseToolAttributes":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"Common attributes shared by all tool types","required":["id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"CanonicalToolAttributes":{"type":"object","properties":{"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"description":{"type":"string","description":"Description of the tool"},"name":{"type":"string","description":"The name of the tool"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"variation_id":{"type":"string","description":"The ID of the variation that was applied to the tool"}},"description":"The original details of a tool","required":["variation_id","name","description"]},"CaptureEventPayload":{"type":"object","properties":{"distinct_id":{"type":"string","description":"Distinct ID for the user or entity (defaults to organization ID if not provided)"},"event":{"type":"string","description":"Event name","example":"button_clicked","minLength":1,"maxLength":255},"properties":{"type":"object","description":"Event properties as key-value pairs","example":{"button_name":"submit","page":"checkout","value":100},"additionalProperties":true}},"description":"Payload for capturing a telemetry event","required":["event"]},"CaptureEventResult":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the event was successfully captured"}},"description":"Result of capturing a telemetry event","required":["success"]},"ChallengeBucket":{"type":"object","properties":{"challenge_count":{"type":"integer","description":"Number of individual challenges in this bucket.","format":"int64"},"challenge_ids":{"type":"array","items":{"type":"string"},"description":"IDs of all challenges in this bucket."},"evaluated_grant_count":{"type":"integer","description":"Total grants evaluated.","format":"int64"},"first_seen":{"type":"string","description":"Timestamp of the earliest challenge in the bucket.","format":"date-time"},"id":{"type":"string","description":"ID of the most recent challenge in the bucket."},"last_seen":{"type":"string","description":"Timestamp of the most recent challenge in the bucket.","format":"date-time"},"matched_grant_count":{"type":"integer","description":"Number of grants that matched.","format":"int64"},"operation":{"type":"string","enum":["require","require_any","filter"]},"organization_id":{"type":"string","description":"Organization the principal was acting in."},"outcome":{"type":"string","enum":["allow","deny","error"]},"photo_url":{"type":"string","description":"User avatar URL when available."},"principal_type":{"type":"string","description":"Kind of principal.","enum":["user","api_key","assistant"]},"principal_urn":{"type":"string","description":"Principal URN e.g. user:\u003cuuid\u003e or api_key:\u003cid\u003e."},"project_id":{"type":"string","description":"Project scope (empty for org-level checks)."},"reason":{"type":"string","enum":["grant_matched","no_grants","scope_unsatisfied","deny_grant","invalid_check","rbac_skipped_apikey","dev_override"]},"resolution_role_slug":{"type":"string","description":"Role slug assigned (when resolution_type=role_assigned)."},"resolution_type":{"type":"string","description":"How the bucket was resolved.","enum":["role_assigned","dismissed"]},"resolved_at":{"type":"string","description":"When the bucket was resolved by an admin.","format":"date-time"},"resolved_by":{"type":"string","description":"URN of the admin who resolved."},"resource_id":{"type":"string","description":"Resource ID of the check."},"resource_kind":{"type":"string","description":"Resource kind of the check."},"role_slugs":{"type":"array","items":{"type":"string"},"description":"Roles the principal had loaded."},"scope":{"type":"string","description":"Scope that was checked."},"user_email":{"type":"string","description":"Email when available."}},"description":"A group of consecutive challenges with the same dimensions that occurred within a 10-minute window.","required":["id","last_seen","first_seen","organization_id","principal_urn","principal_type","operation","outcome","reason","scope","role_slugs","evaluated_grant_count","matched_grant_count","challenge_count","challenge_ids"]},"ChallengeResolution":{"type":"object","properties":{"challenge_id":{"type":"string","description":"ClickHouse challenge ID."},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"Resolution record ID."},"organization_id":{"type":"string","description":"Organization ID."},"principal_urn":{"type":"string","description":"Denied principal."},"resolution_type":{"type":"string","enum":["role_assigned","dismissed"]},"resolved_by":{"type":"string","description":"Admin who resolved."},"resource_id":{"type":"string","description":"Resource ID."},"resource_kind":{"type":"string","description":"Resource kind."},"role_slug":{"type":"string","description":"Assigned role slug."},"scope":{"type":"string","description":"Denied scope."}},"required":["id","organization_id","challenge_id","principal_urn","scope","resolution_type","resolved_by","created_at"]},"Chat":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The list of messages in the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["messages","id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatMessage":{"type":"object","properties":{"content":{"description":"The content of the message — string for plain text, array for multimodal/tool-call content parts, null for assistant messages that only carry tool_calls"},"created_at":{"type":"string","description":"When the message was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the message"},"finish_reason":{"type":"string","description":"The finish reason of the message"},"generation":{"type":"integer","description":"Conversation generation — bumps on compaction or edit divergence","format":"int64"},"id":{"type":"string","description":"The ID of the message"},"model":{"type":"string","description":"The model that generated the message"},"role":{"type":"string","description":"The role of the message"},"tool_call_id":{"type":"string","description":"The tool call ID of the message"},"tool_calls":{"type":"string","description":"The tool calls in the message as a JSON blob"},"user_id":{"type":"string","description":"The ID of the user who created the message"}},"required":["id","role","model","created_at","generation"]},"ChatOverview":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatOverviewWithResolutions":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChatResolution"},"description":"List of resolutions for this chat"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"description":"Chat overview with embedded resolution data","required":["resolutions","id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatResolution":{"type":"object","properties":{"created_at":{"type":"string","description":"When resolution was created","format":"date-time"},"id":{"type":"string","description":"Resolution ID","format":"uuid"},"message_ids":{"type":"array","items":{"type":"string"},"description":"Message IDs associated with this resolution","example":["abc-123","def-456"]},"resolution":{"type":"string","description":"Resolution status"},"resolution_notes":{"type":"string","description":"Notes about the resolution"},"score":{"type":"integer","description":"Score 0-100","format":"int64"},"user_goal":{"type":"string","description":"User's intended goal"}},"description":"Resolution information for a chat","required":["id","user_goal","resolution","resolution_notes","score","created_at","message_ids"]},"ChatSummary":{"type":"object","properties":{"duration_seconds":{"type":"number","description":"Chat session duration in seconds","format":"double"},"end_time_unix_nano":{"type":"string","description":"Latest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"gram_chat_id":{"type":"string","description":"Chat session ID"},"log_count":{"type":"integer","description":"Total number of logs in this chat session","format":"int64"},"message_count":{"type":"integer","description":"Number of LLM completion messages in this chat session","format":"int64"},"model":{"type":"string","description":"LLM model used in this chat session"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"status":{"type":"string","description":"Chat session status","enum":["success","error"]},"tool_call_count":{"type":"integer","description":"Number of tool calls in this chat session","format":"int64"},"total_input_tokens":{"type":"integer","description":"Total input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens used (input + output)","format":"int64"},"user_id":{"type":"string","description":"User ID associated with this chat session"}},"description":"Summary information for a chat session","required":["gram_chat_id","start_time_unix_nano","end_time_unix_nano","log_count","tool_call_count","message_count","duration_seconds","status","total_input_tokens","total_output_tokens","total_tokens"]},"ClaudeHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"cwd":{"type":"string","description":"The working directory when the event fired"},"error":{"description":"The error from the tool (PostToolUseFailure only)"},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PostToolUse","PostToolUseFailure","UserPromptSubmit","Stop","SessionEnd","Notification"]},"is_interrupt":{"type":"boolean","description":"Whether the failure was caused by user interruption (PostToolUseFailure only)"},"last_assistant_message":{"type":"string","description":"Claude's final response text (Stop only)"},"message":{"type":"string","description":"Notification message text (Notification only)"},"model":{"type":"string","description":"The model identifier (SessionStart, Stop)"},"notification_type":{"type":"string","description":"Type of notification: permission_prompt, idle_prompt, auth_success, elicitation_dialog (Notification only)"},"prompt":{"type":"string","description":"The user's prompt text (UserPromptSubmit only)"},"reason":{"type":"string","description":"Why the session ended (SessionEnd only)"},"session_id":{"type":"string","description":"The Claude Code session ID"},"source":{"type":"string","description":"How the session started: startup, resume, clear, compact (SessionStart only)"},"stop_hook_active":{"type":"boolean","description":"Whether a stop hook continuation is active (Stop only)"},"title":{"type":"string","description":"Notification title (Notification only)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool (for tool-related events)"},"tool_response":{"description":"The response from the tool (PostToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"},"transcript_path":{"type":"string","description":"Path to the conversation transcript file"}},"description":"Unified payload for all Claude Code hook events","required":["hook_event_name"]},"ClaudeHookResult":{"type":"object","properties":{"continue":{"type":"boolean","description":"Whether to continue (SessionStart only)"},"decision":{"type":"string","description":"Top-level block decision for UserPromptSubmit / PostToolUse / Stop / SubagentStop. Use 'block' to halt processing."},"hookSpecificOutput":{"description":"Hook-specific output as JSON object"},"reason":{"type":"string","description":"Reason accompanying decision; shown to the user (UserPromptSubmit) or Claude (PostToolUse/Stop)."},"stopReason":{"type":"string","description":"Reason if blocked (SessionStart only)"},"suppressOutput":{"type":"boolean","description":"Whether to suppress the hook's output"},"systemMessage":{"type":"string","description":"Warning message shown to the user in the terminal"}},"description":"Unified result for all Claude Code hook events with proper response structure"},"CloneClientFromOAuthProxyProviderForm":{"type":"object","properties":{"audience":{"type":"string","description":"Optional upstream OAuth audience to send on the authorize redirect and token exchange for the cloned client.","pattern":"^[!-~]+$","maxLength":512},"oauth_proxy_provider_id":{"type":"string","description":"The oauth_proxy_provider to read client_id / client_secret from. Must live in the caller's project.","format":"uuid"},"remote_session_issuer_id":{"type":"string","description":"The remote_session_issuer the new client is registered with.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Explicit upstream OAuth scopes the dance should request for the cloned client. Omit to fall back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the cloned client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer the new client is paired with.","format":"uuid"}},"description":"Form for cloning an oauth_proxy_provider's client credentials into a new remote_session_client. The caller supplies the existing oauth_proxy_provider, plus the remote_session_issuer and user_session_issuer to pair the new client with.","required":["oauth_proxy_provider_id","remote_session_issuer_id","user_session_issuer_id"]},"CloneEnvironmentForm":{"type":"object","properties":{"copy_values":{"type":"boolean","description":"If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values."},"new_name":{"type":"string","description":"The name for the new cloned environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for cloning an existing environment into a new one","required":["slug","new_name"]},"CloneEnvironmentRequestBody":{"type":"object","properties":{"copy_values":{"type":"boolean","description":"If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values."},"new_name":{"type":"string","description":"The name for the new cloned environment"}},"required":["new_name"]},"CodexHookPayload":{"type":"object","properties":{"cwd":{"type":"string","description":"The working directory when the event fired"},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PermissionRequest","PostToolUse","UserPromptSubmit","Stop"]},"model":{"type":"string","description":"The model identifier"},"permission_type":{"type":"string","description":"The type of permission being requested (PermissionRequest only)"},"prompt":{"type":"string","description":"The user's prompt text (UserPromptSubmit only)"},"session_id":{"type":"string","description":"The Codex session ID"},"tool_input":{"description":"The input to the tool (PreToolUse only)"},"tool_name":{"type":"string","description":"The name of the tool"},"tool_output":{"description":"The output from the tool (PostToolUse only)"},"transcript_path":{"type":"string","description":"Path to the conversation transcript file"}},"description":"Payload for Codex hook events","required":["hook_event_name"]},"CodexHookResult":{"type":"object","properties":{"decision":{"type":"string","description":"Permission decision for blocking events: allow or deny"},"reason":{"type":"string","description":"Reason for the decision, shown to the user"}},"description":"Result for Codex hook events"},"ConfigureSlackAppRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"slack_client_id":{"type":"string","description":"Slack app Client ID"},"slack_client_secret":{"type":"string","description":"Slack app Client Secret"},"slack_signing_secret":{"type":"string","description":"Slack app Signing Secret"}},"required":["id","slack_client_id","slack_client_secret","slack_signing_secret"]},"CreateAssistantForm":{"type":"object","properties":{"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Optional maximum active warm runtimes.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"status":{"type":"string","description":"Optional initial status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"warm_ttl_seconds":{"type":"integer","description":"Optional warm runtime TTL in seconds.","format":"int64"}},"required":["name","model","instructions","toolsets"]},"CreateDeploymentForm":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}},"required":["idempotency_key"]},"CreateDeploymentRequestBody":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}}},"CreateDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"CreateDomainRequestBody":{"type":"object","properties":{"domain":{"type":"string","description":"The custom domain"}},"required":["domain"]},"CreateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment variable entries"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"}},"description":"Form for creating a new environment","required":["organization_id","name","entries"]},"CreateKeyForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes of the key that determines its permissions.","minItems":1}},"required":["name","scopes"]},"CreateMcpEndpointForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to register the endpoint slug under. Omit for a platform-domain endpoint.","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128}},"description":"Form for creating a new MCP endpoint. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.","required":["mcp_server_id","slug"]},"CreateMcpServerForm":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to associate with the server","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server"},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server to use as the backend","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset to use as the backend","format":"uuid"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication. When set, MCP clients are required to authenticate against this issuer before connecting.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"Form for creating a new MCP server. Exactly one of remote_mcp_server_id or toolset_id must be provided.","required":["name","visibility"]},"CreatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"name":{"type":"string","description":"The name of the package","pattern":"^[a-z0-9_-]{1,128}$","maxLength":100},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["name","title","summary"]},"CreatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"CreatePluginForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description."},"name":{"type":"string","description":"Display name for the plugin."},"slug":{"type":"string","description":"Optional URL-safe identifier. Auto-generated from name if omitted."}},"required":["name"]},"CreatePortalSessionResult":{"type":"object","properties":{"token":{"type":"string","description":"Front-end token for the webhook portal session."},"url":{"type":"string","description":"URL for the webhook portal session."}},"required":["url","token"]},"CreateProjectForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"},"session_token":{"type":"string"}},"required":["organization_id","name"]},"CreateProjectRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"}},"required":["organization_id","name"]},"CreateProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"CreatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["name","prompt","engine","kind"]},"CreatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"CreateRemoteSessionClientForm":{"type":"object","properties":{"audience":{"type":"string","description":"Optional upstream OAuth audience to send on the authorize redirect and token exchange.","pattern":"^[!-~]+$","maxLength":512},"client_id":{"type":"string","description":"client_id supplied by the caller."},"client_secret":{"type":"string","description":"client_secret supplied by the caller. Gram encrypts before persisting."},"remote_session_issuer_id":{"type":"string","description":"The owning remote_session_issuer id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this client is paired with.","format":"uuid"}},"description":"Form for creating a remote_session_client. Caller supplies client_id (and optional client_secret) obtained out-of-band from the upstream issuer.","required":["remote_session_issuer_id","user_session_issuer_id","client_id"]},"CreateRemoteSessionIssuerForm":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"Grant types advertised by the issuer."},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour. Default false."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer. Default false."},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; absent for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"},"description":"Response types advertised by the issuer."},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"Scopes advertised by the issuer."},"slug":{"type":"string","description":"Project-unique slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Token endpoint auth methods advertised by the issuer."}},"description":"Form for creating a remote_session_issuer.","required":["slug","issuer"]},"CreateRequestBody":{"type":"object","properties":{"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds (max / default 3600)","default":3600,"format":"int64","minimum":1,"maximum":3600},"user_identifier":{"type":"string","description":"Optional free-form user identifier"}},"required":["embed_origin"]},"CreateRequestBody2":{"type":"object","properties":{"description":{"type":"string","description":"Description of the collection","maxLength":500},"mcp_registry_namespace":{"type":"string","description":"Registry namespace (e.g., 'com.speakeasy.acme.my-tools')","minLength":1,"maxLength":200},"name":{"type":"string","description":"Display name for the collection","minLength":1,"maxLength":100},"slug":{"type":"string","description":"URL-friendly identifier for the collection","minLength":1,"maxLength":60},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to the collection"},"visibility":{"type":"string","description":"Visibility of the collection","default":"private","enum":["public","private"]}},"required":["name","slug","mcp_registry_namespace"]},"CreateResponseBody":{"type":"object","properties":{"client_token":{"type":"string","description":"JWT token for chat session"},"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds","format":"int64"},"status":{"type":"string","description":"Session status"},"user_identifier":{"type":"string","description":"User identifier if provided"}},"required":["embed_origin","client_token","expires_after","status"]},"CreateRiskPolicyRequestBody":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag or block.","default":"flag","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name should be auto-generated."},"enabled":{"type":"boolean","description":"Whether the policy is active."},"name":{"type":"string","description":"The policy name. If omitted, a name will be auto-generated."},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to detect."},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids to enable in addition to the heuristic baseline (e.g. 'deberta-v3-classifier')."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources to enable."},"user_message":{"type":"string","description":"Optional message shown to end users when this policy blocks an action or surfaces a flagged finding."}}},"CreateRoleForm":{"type":"object","properties":{"description":{"type":"string","description":"Description of what this role can do."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Scope grants to assign."},"member_ids":{"type":"array","items":{"type":"string"},"description":"Optional member IDs to additionally assign to this role on creation."},"name":{"type":"string","description":"Display name for the role."}},"required":["name","description","grants"]},"CreateServerForm":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/HeaderInput"},"description":"Headers to send when proxying requests to the remote server"},"name":{"type":"string","description":"Optional human-readable name for the remote MCP server. Empty values are stored as null."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server (e.g. streamable-http)"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"Form for creating a new remote MCP server","required":["url","transport_type","headers"]},"CreateSignedChatAttachmentURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLForm2":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLResult":{"type":"object","properties":{"expires_at":{"type":"string","description":"When the signed URL expires","format":"date-time"},"url":{"type":"string","description":"The signed URL to access the chat attachment"}},"required":["url","expires_at"]},"CreateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"name":{"type":"string","description":"Display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to this app"}},"required":["name","toolset_ids"]},"CreateSlackAppResult":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/SlackAppResult"}},"required":["app"]},"CreateToolsetForm":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_slug_input":{"type":"string"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateToolsetRequestBody":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateTriggerInstanceForm":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"definition_slug":{"type":"string","description":"The trigger definition slug."},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"status":{"type":"string","description":"Optional initial status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The trigger target kind.","enum":["assistant","noop"]},"target_ref":{"type":"string","description":"The opaque target reference."}},"required":["definition_slug","name","target_kind","target_ref","target_display","config"]},"CreateUserSessionIssuerForm":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"How multi-remote authn challenges are presented: chain | interactive.","enum":["chain","interactive"]},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Project-unique slug."}},"description":"Form for creating a user_session_issuer.","required":["slug","authn_challenge_mode","session_duration_hours"]},"CreditUsageResponseBody":{"type":"object","properties":{"credits_used":{"type":"number","description":"The number of credits remaining","format":"double"},"monthly_credits":{"type":"integer","description":"The number of monthly credits","format":"int64"}},"required":["credits_used","monthly_credits"]},"CursorHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"cache_read_tokens":{"type":"integer","description":"Tokens read from cache (stop, afterAgentResponse)","format":"int64"},"cache_write_tokens":{"type":"integer","description":"Tokens written to cache (stop, afterAgentResponse)","format":"int64"},"command":{"type":"string","description":"Command string for command-based MCP servers (beforeMCPExecution / afterMCPExecution only)"},"composer_mode":{"type":"string","description":"The composer mode, e.g. agent (beforeSubmitPrompt only)"},"conversation_id":{"type":"string","description":"The Cursor conversation ID"},"cursor_version":{"type":"string","description":"The Cursor IDE version"},"duration":{"type":"number","description":"Execution duration in milliseconds, excluding approval wait time (afterMCPExecution only)","format":"double"},"duration_ms":{"type":"integer","description":"Duration in milliseconds for the thinking block (afterAgentThought only)","format":"int64"},"error":{"description":"The error from the tool (postToolUseFailure only)"},"generation_id":{"type":"string","description":"The Cursor generation ID"},"hook_event_name":{"type":"string","description":"The type of hook event (e.g. beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, afterMCPExecution)"},"input_tokens":{"type":"integer","description":"Total input tokens used (stop, afterAgentResponse)","format":"int64"},"is_interrupt":{"type":"boolean","description":"Whether the failure was caused by user interruption"},"loop_count":{"type":"integer","description":"Number of agentic loops executed (stop only)","format":"int64"},"model":{"type":"string","description":"The model being used"},"output_tokens":{"type":"integer","description":"Total output tokens used (stop, afterAgentResponse)","format":"int64"},"prompt":{"type":"string","description":"The user's prompt text (beforeSubmitPrompt only)"},"result_json":{"type":"string","description":"JSON-encoded string of the MCP tool response (afterMCPExecution only)"},"session_id":{"type":"string","description":"The session ID from Cursor"},"status":{"type":"string","description":"Completion status, e.g. completed (stop only)"},"text":{"type":"string","description":"The assistant's response text (afterAgentResponse) or thinking text (afterAgentThought)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool"},"tool_response":{"description":"The response from the tool (postToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"},"transcript_path":{"type":"string","description":"Path to the conversation transcript JSONL file"},"url":{"type":"string","description":"URL of the MCP server (beforeMCPExecution / afterMCPExecution, URL-based servers only)"},"user_email":{"type":"string","description":"Email of the authenticated Cursor user, if available"}},"description":"Payload for Cursor hook events","required":["hook_event_name"]},"CursorHookResult":{"type":"object","properties":{"additional_context":{"type":"string","description":"Additional context to inject into the conversation"},"agent_message":{"type":"string","description":"Message sent back to the agent (beforeMCPExecution only)"},"permission":{"type":"string","description":"Permission decision for preToolUse / beforeMCPExecution: allow, deny, or ask"},"user_message":{"type":"string","description":"Message to display to the user"}},"description":"Result for Cursor hook events"},"CustomDomain":{"type":"object","properties":{"activated":{"type":"boolean","description":"Whether the domain is activated in ingress"},"created_at":{"type":"string","description":"When the custom domain was created.","format":"date-time"},"domain":{"type":"string","description":"The custom domain name"},"id":{"type":"string","description":"The ID of the custom domain"},"is_updating":{"type":"boolean","description":"The custom domain is actively being registered"},"organization_id":{"type":"string","description":"The ID of the organization this domain belongs to"},"updated_at":{"type":"string","description":"When the custom domain was last updated.","format":"date-time"},"verified":{"type":"boolean","description":"Whether the domain is verified"}},"required":["id","organization_id","domain","verified","activated","created_at","updated_at","is_updating"]},"CustomDomainMcpEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the MCP endpoint","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the parent MCP server","format":"uuid"},"mcp_server_name":{"type":"string","description":"The display name of the parent MCP server. May be empty if the parent has no configured name."},"mcp_server_slug":{"type":"string","description":"The url-friendly slug of the parent MCP server. May be empty if the parent has no configured slug."},"project_id":{"type":"string","description":"The ID of the project the endpoint belongs to","format":"uuid"},"project_name":{"type":"string","description":"The display name of the project the endpoint belongs to"},"project_slug":{"type":"string","description":"The url-friendly slug of the project the endpoint belongs to"},"slug":{"type":"string","description":"The endpoint slug"}},"description":"An MCP endpoint registered under a custom domain, with its parent MCP server and project denormalised for display in the dashboard's delete-impact preview.","required":["id","slug","project_id","project_name","project_slug","mcp_server_id"]},"DeleteGlobalToolVariationForm":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation to delete"}},"required":["variation_id"]},"DeleteGlobalToolVariationResult":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation that was deleted"}},"required":["variation_id"]},"DeleteRequestBody":{"type":"object","properties":{"override_id":{"type":"string","description":"Override ID to delete"}},"required":["override_id"]},"Deployment":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"DeploymentExternalMCP":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment external MCP record."},"name":{"type":"string","description":"The display name for the external MCP server."},"organization_mcp_collection_registry_id":{"type":"string","description":"The ID of the internal collection registry the server is from."},"registry_id":{"type":"string","description":"The ID of the external MCP registry the server is from."},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug","registry_server_specifier"]},"DeploymentFunctions":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"memory_mib":{"type":"integer","description":"The memory limit in MiB of function runner machines.","format":"int32"},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"runtime":{"type":"string","description":"The runtime to use when executing functions."},"scale":{"type":"integer","description":"The number of instances to run for the function.","format":"int32"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug","runtime"]},"DeploymentLogEvent":{"type":"object","properties":{"attachment_id":{"type":"string","description":"The ID of the asset tied to the log event"},"attachment_type":{"type":"string","description":"The type of the asset tied to the log event"},"created_at":{"type":"string","description":"The creation date of the log event"},"event":{"type":"string","description":"The type of event that occurred"},"id":{"type":"string","description":"The ID of the log event"},"message":{"type":"string","description":"The message of the log event"}},"required":["id","created_at","event","message"]},"DeploymentPackage":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment package."},"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["id","name","version"]},"DeploymentSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_mcp_asset_count":{"type":"integer","description":"The number of external MCP server assets.","format":"int64"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"functions_asset_count":{"type":"integer","description":"The number of Functions assets.","format":"int64"},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"openapiv3_asset_count":{"type":"integer","description":"The number of upstream OpenAPI assets.","format":"int64"},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","user_id","status","openapiv3_asset_count","openapiv3_tool_count","functions_asset_count","functions_tool_count","external_mcp_asset_count","external_mcp_tool_count"]},"DiscoverRemoteSessionIssuerRequestBody":{"type":"object","properties":{"issuer":{"type":"string","description":"Issuer URL to discover (e.g. https://login.linear.com)."}},"required":["issuer"]},"Environment":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment","format":"date-time"},"description":{"type":"string","description":"The description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntry"},"description":"List of environment entries"},"id":{"type":"string","description":"The ID of the environment"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"},"project_id":{"type":"string","description":"The project ID this environment belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the environment was last updated","format":"date-time"}},"description":"Model representing an environment","required":["id","organization_id","project_id","name","slug","entries","created_at","updated_at"]},"EnvironmentEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment entry","format":"date-time"},"name":{"type":"string","description":"The name of the environment variable"},"updated_at":{"type":"string","description":"When the environment entry was last updated","format":"date-time"},"value":{"type":"string","description":"Redacted values of the environment variable"},"value_hash":{"type":"string","description":"Hash of the value to identify matching values across environments without exposing the actual value"}},"description":"A single environment entry","required":["name","value","value_hash","created_at","updated_at"]},"EnvironmentEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment variable"},"value":{"type":"string","description":"The value of the environment variable"}},"description":"A single environment entry","required":["name","value"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"description":"unauthorized access","required":["name","id","message","temporary","timeout","fault"]},"EvolveForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to evolve. If omitted, the latest deployment will be used."},"exclude_external_mcps":{"type":"array","items":{"type":"string"},"description":"The external MCP servers, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_functions":{"type":"array","items":{"type":"string"},"description":"The functions, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_openapiv3_assets":{"type":"array","items":{"type":"string"},"description":"The OpenAPI 3.x documents, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_packages":{"type":"array","items":{"type":"string"},"description":"The packages to exclude from the new deployment when cloning a previous deployment."},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"upsert_external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"},"description":"The external MCP servers to upsert in the new deployment."},"upsert_functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"},"description":"The tool functions to upsert in the new deployment."},"upsert_openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"},"description":"The OpenAPI 3.x documents to upsert in the new deployment."},"upsert_packages":{"type":"array","items":{"$ref":"#/components/schemas/AddPackageForm"},"description":"The packages to upsert in the new deployment."}}},"EvolveResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"ExportMcpMetadataRequestBody":{"type":"object","properties":{"mcp_slug":{"type":"string","description":"The MCP server slug (from the install URL)","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["mcp_slug"]},"ExternalMCPHeaderDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"header_name":{"type":"string","description":"The actual HTTP header name to send (e.g., X-Api-Key)"},"name":{"type":"string","description":"The prefixed environment variable name (e.g., SLACK_X_API_KEY)"},"placeholder":{"type":"string","description":"Placeholder value for the header"},"required":{"type":"boolean","description":"Whether the header is required"},"secret":{"type":"boolean","description":"Whether the header value is secret"}},"required":["name","header_name","required","secret"]},"ExternalMCPRemote":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemoteHeader"},"description":"HTTP headers the MCP client should collect and send when connecting to this remote"},"transport_type":{"type":"string","description":"Transport type (sse or streamable-http)","enum":["sse","streamable-http"]},"url":{"type":"string","description":"URL of the remote endpoint","format":"uri"},"variables":{"type":"object","description":"URL template variables for this remote endpoint","additionalProperties":{"$ref":"#/components/schemas/ExternalMCPRemoteVariable"}}},"description":"A remote endpoint for an MCP server","required":["url","transport_type"]},"ExternalMCPRemoteHeader":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"is_required":{"type":"boolean","description":"Whether this header is required"},"is_secret":{"type":"boolean","description":"Whether this header value should be treated as secret"},"name":{"type":"string","description":"Header name"},"placeholder":{"type":"string","description":"Placeholder value to show when collecting this header"}},"description":"A header requirement for a remote MCP server","required":["name"]},"ExternalMCPRemoteVariable":{"type":"object","properties":{"choices":{"type":"array","items":{"type":"string"},"description":"Allowed values for the variable"},"default":{"type":"string","description":"Default value for the variable"},"description":{"type":"string","description":"Description of the variable"},"is_required":{"type":"boolean","description":"Whether this variable is required"},"is_secret":{"type":"boolean","description":"Whether this variable value should be treated as secret"}},"description":"A URL template variable for a remote MCP server"},"ExternalMCPServer":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the server does"},"icon_url":{"type":"string","description":"URL to the server's icon","format":"uri"},"meta":{"description":"Opaque metadata from the registry"},"organization_mcp_collection_registry_id":{"type":"string","description":"ID of the internal collection registry this server came from","format":"uuid"},"registry_id":{"type":"string","description":"ID of the external MCP registry this server came from","format":"uuid"},"registry_specifier":{"type":"string","description":"Server specifier used to look up in the registry (e.g., 'io.github.user/server')","example":"io.modelcontextprotocol.anonymous/exa"},"remotes":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemote"},"description":"Available remote endpoints for the server"},"title":{"type":"string","description":"Display name for the server"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPTool"},"description":"Tools available on the server"},"toolset_id":{"type":"string","description":"ID of the attached toolset when this server is listed from a Collection","format":"uuid"},"version":{"type":"string","description":"Semantic version of the server","example":"1.0.0"}},"description":"An MCP server from an external registry","required":["registry_specifier","version","description"]},"ExternalMCPTool":{"type":"object","properties":{"annotations":{"description":"Annotations for the tool"},"description":{"type":"string","description":"Description of the tool"},"input_schema":{"description":"Input schema for the tool"},"name":{"type":"string","description":"Name of the tool"}}},"ExternalMCPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_external_mcp_id":{"type":"string","description":"The ID of the deployments_external_mcps record"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"oauth_authorization_endpoint":{"type":"string","description":"The OAuth authorization endpoint URL"},"oauth_registration_endpoint":{"type":"string","description":"The OAuth dynamic client registration endpoint URL"},"oauth_scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by the server"},"oauth_token_endpoint":{"type":"string","description":"The OAuth token endpoint URL"},"oauth_version":{"type":"string","description":"OAuth version: '2.1' (MCP OAuth), '2.0' (legacy), or 'none'"},"project_id":{"type":"string","description":"The ID of the project"},"registry_id":{"type":"string","description":"The ID of the MCP registry"},"registry_server_name":{"type":"string","description":"The name of the external MCP server (e.g., exa)"},"registry_specifier":{"type":"string","description":"The specifier of the external MCP server (e.g., 'io.modelcontextprotocol.anonymous/exa')"},"remote_url":{"type":"string","description":"The URL to connect to the MCP server"},"requires_oauth":{"type":"boolean","description":"Whether the external MCP server requires OAuth authentication"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"slug":{"type":"string","description":"The slug used for tool prefixing (e.g., github)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"transport_type":{"type":"string","description":"The transport type used to connect to the MCP server","enum":["streamable-http","sse"]},"type":{"type":"string","description":"Whether or not the tool is a proxy tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A proxy tool that references an external MCP server","required":["deployment_external_mcp_id","deployment_id","registry_specifier","registry_server_name","registry_id","slug","remote_url","transport_type","requires_oauth","oauth_version","created_at","updated_at","id","project_id","name","canonical_name","description","schema","tool_urn"]},"ExternalOAuthServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the external OAuth server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the external OAuth server"},"metadata":{"description":"The metadata for the external OAuth server"},"project_id":{"type":"string","description":"The project ID this external OAuth server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the external OAuth server was last updated.","format":"date-time"}},"required":["id","project_id","slug","metadata","created_at","updated_at"]},"ExternalOAuthServerForm":{"type":"object","properties":{"metadata":{"description":"The metadata for the external OAuth server"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","metadata"]},"FetchOpenAPIv3FromURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FetchOpenAPIv3FromURLForm2":{"type":"object","properties":{"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FilterOption":{"type":"object","properties":{"count":{"type":"integer","description":"Number of events for this option","format":"int64"},"id":{"type":"string","description":"Unique identifier for the option"},"label":{"type":"string","description":"Display label for the option"}},"description":"A single filter option (API key or user)","required":["id","label","count"]},"FunctionEnvironmentVariable":{"type":"object","properties":{"auth_input_type":{"type":"string","description":"Optional value of the function variable comes from a specific auth input"},"description":{"type":"string","description":"Description of the function environment variable"},"name":{"type":"string","description":"The environment variables"}},"required":["name"]},"FunctionResourceDefinition":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the resource"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the resource"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"},"variables":{"description":"Variables configuration for the resource"}},"description":"A function resource","required":["deployment_id","function_id","runtime","id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"FunctionToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the tool"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variables":{"description":"Variables configuration for the function"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A function tool","required":["deployment_id","asset_id","function_id","runtime","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"GenerateTitleResponseBody":{"type":"object","properties":{"title":{"type":"string","description":"The generated title"}},"required":["title"]},"GetActiveDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetDeploymentForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment"}},"required":["id"]},"GetDeploymentLogsForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"},"deployment_id":{"type":"string","description":"The ID of the deployment"}},"required":["deployment_id"]},"GetDeploymentLogsResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLogEvent"},"description":"The logs for the deployment"},"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"status":{"type":"string","description":"The status of the deployment"}},"required":["events","status"]},"GetDeploymentResult":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"GetHooksSummaryPayload":{"type":"object","properties":{"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions (same as listHooksTraces)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"types_to_include":{"type":"array","items":{"type":"string","enum":["mcp","local","skill"]},"description":"Hook types to include (mcp, local, skill). If empty, includes all types.","example":["mcp","skill"]}},"description":"Payload for getting aggregated hooks metrics","required":["from","to"]},"GetHooksSummaryResult":{"type":"object","properties":{"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/HooksBreakdownRow"},"description":"Cross-dimensional pivot: (user, server, source, tool) x counts"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/HooksServerSummary"},"description":"Aggregated metrics grouped by server"},"skill_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/SkillBreakdownRow"},"description":"Per-user skill breakdown"},"skill_time_series":{"type":"array","items":{"$ref":"#/components/schemas/SkillTimeSeriesPoint"},"description":"Time-bucketed event counts by skill"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillSummary"},"description":"Aggregated metrics grouped by skill"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/HooksTimeSeriesPoint"},"description":"Time-bucketed event counts by server and user"},"total_events":{"type":"integer","description":"Total number of hook events","format":"int64"},"total_sessions":{"type":"integer","description":"Total number of unique sessions","format":"int64"},"users":{"type":"array","items":{"$ref":"#/components/schemas/HooksUserSummary"},"description":"Aggregated metrics grouped by user"}},"description":"Result of hooks summary query","required":["servers","users","skills","total_events","total_sessions","breakdown","time_series","skill_time_series","skill_breakdown"]},"GetInstanceForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"GetInstanceResult":{"type":"object","properties":{"description":{"type":"string","description":"The description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/InstanceMcpServer"},"description":"The MCP servers that are relevant to the toolset"},"name":{"type":"string","description":"The name of the toolset"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The list of prompt templates"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools"}},"required":["name","tools","mcp_servers"]},"GetIntegrationForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration to get (refers to a package id)."},"name":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},"description":"Get a third-party integration by ID or name."},"GetIntegrationResult":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Integration"}}},"GetLatestDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetMcpMetadataResponseBody":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/McpMetadata"}}},"GetMetricsSummaryResult":{"type":"object","properties":{"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of metrics summary query","required":["metrics"]},"GetObservabilityOverviewPayload":{"type":"object","properties":{"api_key_id":{"type":"string","description":"Optional API key ID filter"},"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook')"},"external_user_id":{"type":"string","description":"Optional external user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')"},"include_time_series":{"type":"boolean","description":"Whether to include time series data (default: true)","default":true},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"toolset_slug":{"type":"string","description":"Optional toolset/MCP server slug filter"},"user_id":{"type":"string","description":"Optional internal user ID filter"}},"description":"Payload for getting observability overview metrics","required":["from","to"]},"GetObservabilityOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ObservabilitySummary"},"interval_seconds":{"type":"integer","description":"The time bucket interval in seconds used for the time series data","format":"int64"},"summary":{"$ref":"#/components/schemas/ObservabilitySummary"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesBucket"},"description":"Time series data points"},"top_tools_by_count":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by call count"},"top_tools_by_failure_rate":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by failure rate"}},"description":"Result of observability overview query","required":["summary","comparison","time_series","top_tools_by_count","top_tools_by_failure_rate","interval_seconds"]},"GetProductFeaturesResponseBody":{"type":"object","properties":{"authz_challenge_logging_enabled":{"type":"boolean","description":"Whether authz challenge logging to ClickHouse is enabled"},"logs_enabled":{"type":"boolean","description":"Whether logging is enabled"},"session_capture_enabled":{"type":"boolean","description":"Whether Claude Code session capture is enabled"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool I/O logging is enabled"},"webhooks":{"type":"boolean","description":"Whether webhooks are enabled"}},"required":["logs_enabled","tool_io_logs_enabled","session_capture_enabled","authz_challenge_logging_enabled","webhooks"]},"GetProjectForm":{"type":"object","properties":{"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug"]},"GetProjectMetricsSummaryPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level metrics summary","required":["from","to"]},"GetProjectOverviewPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level overview","required":["from","to"]},"GetProjectOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ProjectOverviewSummary"},"metrics_mode":{"type":"string","description":"Indicates whether metrics are session-based or tool-call-based","enum":["session","tool_call"]},"summary":{"$ref":"#/components/schemas/ProjectOverviewSummary"}},"description":"Result of project overview query","required":["summary","comparison","metrics_mode"]},"GetProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"GetPromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"GetSignedAssetURLForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the function asset"}},"required":["asset_id"]},"GetSignedAssetURLResult":{"type":"object","properties":{"url":{"type":"string","description":"The signed URL to access the asset"}},"required":["url"]},"GetUserMetricsSummaryPayload":{"type":"object","properties":{"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook')"},"external_user_id":{"type":"string","description":"External user ID to get metrics for (mutually exclusive with user_id)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID to get metrics for (mutually exclusive with external_user_id)"}},"description":"Payload for getting user-level metrics summary","required":["from","to"]},"GetUserMetricsSummaryResult":{"type":"object","properties":{"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of user metrics summary query","required":["metrics"]},"HTTPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"default_server_url":{"type":"string","description":"The default server URL for the tool"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"http_method":{"type":"string","description":"HTTP method for the request"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"openapiv3_document_id":{"type":"string","description":"The ID of the OpenAPI v3 document"},"openapiv3_operation":{"type":"string","description":"OpenAPI v3 operation"},"package_name":{"type":"string","description":"The name of the source package"},"path":{"type":"string","description":"Path for the request"},"project_id":{"type":"string","description":"The ID of the project"},"response_filter":{"$ref":"#/components/schemas/ResponseFilter"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"security":{"type":"string","description":"Security requirements for the underlying HTTP endpoint"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"summary":{"type":"string","description":"Summary of the tool"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags list for this http tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"An HTTP tool","required":["summary","tags","http_method","path","schema","deployment_id","asset_id","id","project_id","name","canonical_name","description","tool_urn","created_at","updated_at"]},"HeaderInput":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"is_required":{"type":"boolean","description":"Whether the header is required"},"is_secret":{"type":"boolean","description":"Whether the header value is a secret"},"name":{"type":"string","description":"The header name"},"value":{"type":"string","description":"Static header value (mutually exclusive with value_from_request_header)"},"value_from_request_header":{"type":"string","description":"Name of the inbound request header to pass through (mutually exclusive with value)"}},"description":"Input for a remote MCP server header","required":["name"]},"HookSourceUsage":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total hook events for this source","format":"int64"},"source":{"type":"string","description":"Hook source (from attributes.gram.hook.source)"}},"description":"Hook source usage statistics","required":["source","event_count"]},"HookTraceSummary":{"type":"object","properties":{"block_reason":{"type":"string","description":"Reason set when hook_status is 'blocked' (e.g. shadow-MCP guard rejection)"},"event_source":{"type":"string","description":"Event source (from materialized column)"},"gram_urn":{"type":"string","description":"Gram URN associated with this hook trace"},"hook_source":{"type":"string","description":"Hook source (from attributes.gram.hook.source)"},"hook_status":{"type":"string","description":"Hook execution status","enum":["success","failure","pending","blocked"]},"log_count":{"type":"integer","description":"Total number of logs in this trace","format":"int64"},"skill_name":{"type":"string","description":"Skill name (from materialized column, only for Skill tool)"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"tool_name":{"type":"string","description":"Tool name (from materialized column)"},"tool_source":{"type":"string","description":"Tool call source (from materialized column)"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_email":{"type":"string","description":"User email (from attributes.user.email)"}},"description":"Summary information for a hook trace","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"HooksBreakdownRow":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total events for this combination","format":"int64"},"failure_count":{"type":"integer","description":"Number of failures for this combination","format":"int64"},"hook_source":{"type":"string","description":"Hook source (e.g. claude-desktop, cursor)"},"server_name":{"type":"string","description":"Server name ('local' for non-MCP tools)"},"tool_name":{"type":"string","description":"Tool name"},"user_email":{"type":"string","description":"User email address"}},"description":"Cross-dimensional aggregation row: one entry per unique (user, server, hook_source, tool) combination","required":["user_email","server_name","hook_source","tool_name","event_count","failure_count"]},"HooksServerSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this server","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"server_name":{"type":"string","description":"Server name (extracted from tool name, or 'local' for non-MCP tools)"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used for this server","format":"int64"}},"description":"Aggregated hooks metrics for a single server","required":["server_name","event_count","unique_tools","success_count","failure_count","failure_rate"]},"HooksTimeSeriesPoint":{"type":"object","properties":{"bucket_start_ns":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS int64 precision)"},"event_count":{"type":"integer","description":"Number of events in this bucket","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed hook events in this bucket","format":"int64"},"server_name":{"type":"string","description":"Server name"},"user_email":{"type":"string","description":"User email address"}},"description":"A single time-series bucket for hooks activity","required":["bucket_start_ns","server_name","user_email","event_count","failure_count"]},"HooksUserSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this user","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used by this user","format":"int64"},"user_email":{"type":"string","description":"User email address"}},"description":"Aggregated hooks metrics for a single user","required":["user_email","event_count","unique_tools","success_count","failure_count","failure_rate"]},"InfoResponseBody":{"type":"object","properties":{"active_organization_id":{"type":"string"},"gram_account_type":{"type":"string"},"has_active_subscription":{"type":"boolean","description":"Whether the organization has an active billing subscription"},"is_admin":{"type":"boolean"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntry"}},"user_display_name":{"type":"string"},"user_email":{"type":"string"},"user_id":{"type":"string"},"user_photo_url":{"type":"string"},"user_signature":{"type":"string"},"whitelisted":{"type":"boolean","description":"Whether the organization is whitelisted to access the platform"}},"required":["user_id","user_email","is_admin","active_organization_id","organizations","gram_account_type","has_active_subscription","whitelisted"]},"InstanceMcpServer":{"type":"object","properties":{"url":{"type":"string","description":"The address of the MCP server"}},"required":["url"]},"Integration":{"type":"object","properties":{"package_description":{"type":"string"},"package_description_raw":{"type":"string"},"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string","description":"The latest version of the integration"},"version_created_at":{"type":"string","format":"date-time"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationVersion"}}},"required":["package_id","package_name","package_title","package_summary","version","version_created_at","tool_names"]},"IntegrationEntry":{"type":"object","properties":{"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string"},"version_created_at":{"type":"string","format":"date-time"}},"required":["package_id","package_name","version","version_created_at","tool_names"]},"IntegrationVersion":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"version":{"type":"string"}},"required":["version","created_at"]},"Key":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the key.","format":"date-time"},"created_by_user_id":{"type":"string","description":"The ID of the user who created this key"},"id":{"type":"string","description":"The ID of the key"},"key":{"type":"string","description":"The token of the api key (only returned on key creation)"},"key_prefix":{"type":"string","description":"The store prefix of the api key for recognition"},"last_accessed_at":{"type":"string","description":"When the key was last accessed.","format":"date-time"},"name":{"type":"string","description":"The name of the key"},"organization_id":{"type":"string","description":"The organization ID this key belongs to"},"project_id":{"type":"string","description":"The optional project ID this key is scoped to"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"},"updated_at":{"type":"string","description":"When the key was last updated.","format":"date-time"}},"required":["id","organization_id","created_by_user_id","name","key_prefix","scopes","created_at","updated_at"]},"LLMClientUsage":{"type":"object","properties":{"activity_count":{"type":"integer","description":"Number of messages (session mode) or tool calls (tool_call mode)","format":"int64"},"client_name":{"type":"string","description":"Client/agent name (e.g., 'cursor', 'claude-code', 'cowork')"}},"description":"Usage breakdown by LLM client/agent","required":["client_name","activity_count"]},"ListAllowedOriginsResult":{"type":"object","properties":{"allowed_origins":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"},"description":"The list of allowed origins"}},"required":["allowed_origins"]},"ListAssetsResult":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"description":"The list of assets"}},"required":["assets"]},"ListAssistantMemoriesResult":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/AssistantMemory"},"description":"Assistant memories matching the query."},"next_cursor":{"type":"string","description":"The cursor to be used for the next page of results."}},"required":["memories"]},"ListAssistantsResult":{"type":"object","properties":{"assistants":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"},"description":"Assistants for the current project."}},"required":["assistants"]},"ListAttributeKeysPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing distinct attribute keys available for filtering","required":["from","to"]},"ListAttributeKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"description":"Distinct attribute keys. User attributes are prefixed with @"}},"description":"Result of listing distinct attribute keys","required":["keys"]},"ListAuditLogFacetsForm":{"type":"object","properties":{"project_slug":{"type":"string","description":"Project slug to filter facet values to a specific project."}}},"ListAuditLogFacetsResult":{"type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogFacetOption"},"description":"Available action facets"},"actors":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogFacetOption"},"description":"Available actor facets"}},"required":["actors","actions"]},"ListAuditLogsForm":{"type":"object","properties":{"action":{"type":"string","description":"Action to filter audit logs to a specific action."},"actor_id":{"type":"string","description":"Actor ID to filter audit logs to a specific actor."},"cursor":{"type":"string","description":"The cursor for paginating through audit logs."},"project_slug":{"type":"string","description":"Project slug to filter audit logs to a specific project."}}},"ListAuditLogsResult":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"},"description":"List of audit logs"},"next_cursor":{"type":"string","description":"The cursor to be used for the next page of results."}},"required":["logs"]},"ListCatalogResponseBody":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Pagination cursor for the next page"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListChallengeBucketsResult":{"type":"object","properties":{"buckets":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeBucket"},"description":"The challenge buckets."},"total":{"type":"integer","description":"Total number of matching buckets for pagination.","format":"int64"}},"required":["buckets","total"]},"ListChallengesResult":{"type":"object","properties":{"challenges":{"type":"array","items":{"$ref":"#/components/schemas/AuthzChallenge"},"description":"The challenge events."},"total":{"type":"integer","description":"Total number of matching challenges for pagination.","format":"int64"}},"required":["challenges","total"]},"ListChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverview"},"description":"The list of chats"}},"required":["chats"]},"ListChatsWithResolutionsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverviewWithResolutions"},"description":"List of chats with resolutions"},"total":{"type":"integer","description":"Total number of chats (before pagination)","format":"int64"}},"description":"Result of listing chats with resolutions","required":["chats","total"]},"ListCustomDomainMcpEndpointsResult":{"type":"object","properties":{"mcp_endpoints":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomainMcpEndpoint"}}},"description":"Result of listing the MCP endpoints registered under an organization's custom domain.","required":["mcp_endpoints"]},"ListDeploymentForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"}}},"ListDeploymentResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentSummary"},"description":"A list of deployments"},"next_cursor":{"type":"string","description":"The cursor to fetch results from","example":"01jp3f054qc02gbcmpp0qmyzed"}},"required":["items"]},"ListEnvironmentsResult":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}},"description":"Result type for listing environments","required":["environments"]},"ListFilterOptionsPayload":{"type":"object","properties":{"event_source":{"type":"string","description":"Optional event source filter for the option list"},"filter_type":{"type":"string","description":"Type of filter to list options for","enum":["api_key","user","internal_user","agent"]},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing filter options","required":["from","to","filter_type"]},"ListFilterOptionsResult":{"type":"object","properties":{"options":{"type":"array","items":{"$ref":"#/components/schemas/FilterOption"},"description":"List of filter options"}},"description":"Result of listing filter options","required":["options"]},"ListHooksTracesPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (trace_id)"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions for the search query"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"types_to_include":{"type":"array","items":{"type":"string","enum":["mcp","local","skill"]},"description":"Hook types to include (mcp, local, skill). If empty or not provided, includes all types.","example":["mcp","skill"]}},"description":"Payload for listing hook traces","required":["from","to"]},"ListHooksTracesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"traces":{"type":"array","items":{"$ref":"#/components/schemas/HookTraceSummary"},"description":"List of hook trace summaries"}},"description":"Result of listing hook traces","required":["traces"]},"ListIntegrationsForm":{"type":"object","properties":{"keywords":{"type":"array","items":{"type":"string","maxLength":20},"description":"Keywords to filter integrations by"}}},"ListIntegrationsResult":{"type":"object","properties":{"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEntry"},"description":"List of available third-party integrations"}}},"ListInvitesResult":{"type":"object","properties":{"invitations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"},"description":"Pending invitations for the organization only; accepted, expired, and revoked invitations are omitted."}},"required":["invitations"]},"ListKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"]},"ListMcpEndpointsResult":{"type":"object","properties":{"mcp_endpoints":{"type":"array","items":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"Result type for listing MCP endpoints","required":["mcp_endpoints"]},"ListMcpServersResult":{"type":"object","properties":{"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/McpServer"}}},"description":"Result type for listing MCP servers","required":["mcp_servers"]},"ListMembersResult":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AccessMember"},"description":"The members in your organization."}},"required":["members"]},"ListPackagesResult":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"},"description":"The list of packages"}},"required":["packages"]},"ListPluginsResult":{"type":"object","properties":{"plugins":{"type":"array","items":{"$ref":"#/components/schemas/Plugin"},"description":"The plugins in the organization."}},"required":["plugins"]},"ListProjectsPayload":{"type":"object","properties":{"apikey_token":{"type":"string"},"organization_id":{"type":"string","description":"The ID of the organization to list projects for"},"session_token":{"type":"string"}},"required":["organization_id"]},"ListProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"},"description":"The list of projects"}},"required":["projects"]},"ListPromptTemplatesResult":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The created prompt template"}},"required":["templates"]},"ListRegistriesResponseBody":{"type":"object","properties":{"registries":{"type":"array","items":{"$ref":"#/components/schemas/MCPRegistry"},"description":"List of MCP registries"}},"required":["registries"]},"ListRemoteSessionClientsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSessionClient"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_session_clients.","required":["items"]},"ListRemoteSessionIssuersResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSessionIssuer"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_session_issuers.","required":["items"]},"ListRemoteSessionsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSession"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_sessions.","required":["items"]},"ListResourcesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The list of resources"}},"required":["resources"]},"ListResponseBody":{"type":"object","properties":{"collections":{"type":"array","items":{"$ref":"#/components/schemas/MCPCollection"},"description":"List of collections"}},"required":["collections"]},"ListRiskPoliciesResult":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/RiskPolicy"},"description":"The list of risk policies."}},"required":["policies"]},"ListRiskResultsByChatResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/RiskChatSummary"},"description":"Risk results grouped by chat."},"next_cursor":{"type":"string","description":"Cursor for the next page of results."}},"required":["chats"]},"ListRiskResultsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for the next page of results."},"results":{"type":"array","items":{"$ref":"#/components/schemas/RiskResult"},"description":"The list of risk results."},"total_count":{"type":"integer","description":"Total number of findings across all enabled policies.","format":"int64"}},"required":["results","total_count"]},"ListRoleGrant":{"type":"object","properties":{"effect":{"type":"string","description":"Whether this grant allows or denies the scope. Defaults to 'allow' when omitted.","default":"allow","enum":["allow","deny"]},"scope":{"type":"string","description":"The scope slug this grant applies to.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"selectors":{"type":"array","items":{"$ref":"#/components/schemas/Selector"},"description":"Selector constraints. Null means unrestricted."},"sub_scopes":{"type":"array","items":{"type":"string","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"description":"The inherited scopes the primary scope grants."}},"required":["scope"]},"ListRolesResult":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"The roles in your organization."}},"required":["roles"]},"ListScopesResult":{"type":"object","properties":{"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ScopeDefinition"},"description":"The scopes available in access control."}},"required":["scopes"]},"ListServersResponseBody":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListServersResult":{"type":"object","properties":{"remote_mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"Result type for listing remote MCP servers","required":["remote_mcp_servers"]},"ListShadowMCPApprovalsResult":{"type":"object","properties":{"approvals":{"type":"array","items":{"$ref":"#/components/schemas/ShadowMCPApproval"},"description":"The approved shadow-MCP servers for the policy (URL- or command-keyed)."}},"required":["approvals"]},"ListSlackAppsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppResult"},"description":"List of Slack apps"}},"required":["items"]},"ListToolsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools (polymorphic union of HTTP tools and prompt templates)"}},"required":["tools"]},"ListToolsetSummariesResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetSummary"},"description":"The list of toolset summaries"}},"required":["toolsets"]},"ListToolsetsResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetEntry"},"description":"The list of toolsets"}},"required":["toolsets"]},"ListTriggerDefinitionsResult":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/components/schemas/TriggerDefinition"},"description":"The available trigger definitions."}},"required":["definitions"]},"ListTriggerInstancesResult":{"type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/TriggerInstance"},"description":"The trigger instances for the current project."}},"required":["triggers"]},"ListUserGrantsResult":{"type":"object","properties":{"grants":{"type":"array","items":{"$ref":"#/components/schemas/ListRoleGrant"},"description":"The user's effective grants in this organization."}},"required":["grants"]},"ListUserSessionClientsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionClient"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_clients.","required":["items"]},"ListUserSessionConsentsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionConsent"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_consents.","required":["items"]},"ListUserSessionIssuersResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionIssuer"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_issuers.","required":["items"]},"ListUserSessionsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSession"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_sessions.","required":["items"]},"ListUsersResult":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationUser"},"description":"Users linked to the organization in Gram."}},"required":["users"]},"ListVariationsResult":{"type":"object","properties":{"variations":{"type":"array","items":{"$ref":"#/components/schemas/ToolVariation"}}},"required":["variations"]},"ListVersionsForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package"}},"required":["name"]},"ListVersionsResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PackageVersion"}}},"required":["package","versions"]},"LogFilter":{"type":"object","properties":{"operator":{"type":"string","description":"Comparison operator","default":"eq","enum":["eq","not_eq","contains","exists","not_exists","in"]},"path":{"type":"string","description":"Attribute path. Use @ prefix for custom attributes (e.g. '@user.region'), or bare path for system attributes (e.g. 'http.route').","example":"@user.region","pattern":"^@?[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$","minLength":1,"maxLength":256},"values":{"type":"array","items":{"type":"string"},"description":"Values to compare against. Pass one value for single-value operators (eq, not_eq, contains) and multiple for 'in'. Ignored for 'exists' and 'not_exists'.","maxItems":256}},"description":"A single filter condition for a log search query.","required":["path"]},"MCPCollection":{"type":"object","properties":{"description":{"type":"string","description":"Description of the collection"},"id":{"type":"string","description":"Collection ID","format":"uuid"},"mcp_registry_namespace":{"type":"string","description":"Registry namespace"},"name":{"type":"string","description":"Display name for the collection"},"slug":{"type":"string","description":"URL-friendly identifier"},"visibility":{"type":"string","description":"Visibility of the collection","enum":["public","private"]}},"description":"An MCP collection within an organization","required":["id","name","slug","visibility"]},"MCPRegistry":{"type":"object","properties":{"id":{"type":"string","description":"Registry ID","format":"uuid"},"name":{"type":"string","description":"Display name for the registry"},"url":{"type":"string","description":"URL of the registry"}},"description":"An MCP registry","required":["id","name","url"]},"McpEndpoint":{"type":"object","properties":{"created_at":{"type":"string","description":"When the MCP endpoint was created","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain this endpoint slug is registered under. Null for platform-domain endpoints.","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP endpoint","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"project_id":{"type":"string","description":"The project ID this MCP endpoint belongs to","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128},"updated_at":{"type":"string","description":"When the MCP endpoint was last updated","format":"date-time"}},"description":"An MCP endpoint: a url-friendly slug identifier that addresses an MCP server.","required":["id","project_id","mcp_server_id","slug","created_at","updated_at"]},"McpEnvironmentConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"When the config was created","format":"date-time"},"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"id":{"type":"string","description":"The ID of the environment config"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"updated_at":{"type":"string","description":"When the config was last updated","format":"date-time"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Represents an environment variable configured for an MCP server.","required":["id","variable_name","provided_by","created_at","updated_at"]},"McpEnvironmentConfigInput":{"type":"object","properties":{"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Input for configuring an environment variable for an MCP server.","required":["variable_name","provided_by"]},"McpExport":{"type":"object","properties":{"authentication":{"$ref":"#/components/schemas/McpExportAuthentication"},"description":{"type":"string","description":"Description of the MCP server"},"documentation_url":{"type":"string","description":"Link to external documentation"},"instructions":{"type":"string","description":"Server instructions for users"},"logo_url":{"type":"string","description":"URL to the server logo"},"name":{"type":"string","description":"The MCP server name"},"server_url":{"type":"string","description":"The MCP server URL"},"slug":{"type":"string","description":"The MCP server slug"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpExportTool"},"description":"Available tools on this MCP server"}},"description":"Complete MCP server export for documentation and integration","required":["name","slug","server_url","tools","authentication"]},"McpExportAuthHeader":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name (e.g., API Key)"},"name":{"type":"string","description":"The HTTP header name (e.g., Authorization)"}},"description":"An authentication header required by the MCP server","required":["name","display_name"]},"McpExportAuthentication":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpExportAuthHeader"},"description":"Required authentication headers"},"required":{"type":"boolean","description":"Whether authentication is required"}},"description":"Authentication requirements for the MCP server","required":["required","headers"]},"McpExportTool":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the tool does"},"input_schema":{"description":"JSON Schema for the tool's input parameters"},"name":{"type":"string","description":"The tool name"}},"description":"A tool definition in the MCP export","required":["name","description","input_schema"]},"McpMetadata":{"type":"object","properties":{"created_at":{"type":"string","description":"When the metadata entry was created","format":"date-time"},"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfig"},"description":"The list of environment variables configured for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page","format":"uri"},"id":{"type":"string","description":"The ID of the metadata record"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo","format":"uuid"},"toolset_id":{"type":"string","description":"The toolset associated with this install page metadata","format":"uuid"},"updated_at":{"type":"string","description":"When the metadata entry was last updated","format":"date-time"}},"description":"Metadata used to configure the MCP install page.","required":["id","toolset_id","created_at","updated_at"]},"McpServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the MCP server was created","format":"date-time"},"environment_id":{"type":"string","description":"The ID of the environment associated with the server","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP server","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server"},"project_id":{"type":"string","description":"The project ID this MCP server belongs to","format":"uuid"},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server used as the backend","format":"uuid"},"slug":{"type":"string","description":"A URL-safe, project-unique slug derived server-side from the name and ID"},"toolset_id":{"type":"string","description":"The ID of the toolset used as the backend","format":"uuid"},"updated_at":{"type":"string","description":"When the MCP server was last updated","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication for this server, if any.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"An MCP server configuration: authentication, environment, and backend selection for an MCP server.","required":["id","project_id","visibility","created_at","updated_at"]},"ModelUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Number of times used","format":"int64"},"name":{"type":"string","description":"Model name"}},"description":"Model usage statistics","required":["name","count"]},"NotModified":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]},"OAuthEnablementMetadata":{"type":"object","properties":{"oauth2_security_count":{"type":"integer","description":"Count of security variables that are OAuth2 supported","format":"int64"}},"required":["oauth2_security_count"]},"OAuthProxyProvider":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"created_at":{"type":"string","description":"When the OAuth proxy provider was created.","format":"date-time"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"The grant types supported by this provider"},"id":{"type":"string","description":"The ID of the OAuth proxy provider"},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by this provider"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"The token endpoint auth methods supported by this provider"},"updated_at":{"type":"string","description":"When the OAuth proxy provider was last updated.","format":"date-time"}},"required":["id","slug","provider_type","authorization_endpoint","token_endpoint","created_at","updated_at"]},"OAuthProxyServer":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"created_at":{"type":"string","description":"When the OAuth proxy server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the OAuth proxy server"},"oauth_proxy_providers":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProxyProvider"},"description":"The OAuth proxy providers for this server"},"project_id":{"type":"string","description":"The project ID this OAuth proxy server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the OAuth proxy server was last updated.","format":"date-time"}},"required":["id","project_id","slug","created_at","updated_at"]},"OAuthProxyServerForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (client_secret_basic or client_secret_post)"}},"required":["slug","provider_type"]},"OAuthProxyServerUpdateForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request (omit = no change, empty array = clear)"},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (omit = no change, empty array = clear)"}}},"OTELAttribute":{"type":"object","properties":{"key":{"type":"string","description":"Attribute key"},"value":{"$ref":"#/components/schemas/OTELAttributeValue"}},"description":"OTEL log attribute with key and typed value","required":["key"]},"OTELAttributeValue":{"type":"object","properties":{"arrayValue":{"description":"Array value (passed through)"},"boolValue":{"type":"boolean","description":"Boolean value"},"bytesValue":{"type":"string","description":"Bytes value (base64-encoded per OTLP/JSON)"},"doubleValue":{"type":"number","description":"Double value","format":"double"},"intValue":{"description":"Integer value (string-encoded per OTLP/JSON, or raw number)"},"kvlistValue":{"description":"Key-value list value (passed through)"},"stringValue":{"type":"string","description":"String value"}},"description":"OTEL attribute value - any of the OTLP/JSON value kinds"},"OTELLogBody":{"type":"object","properties":{"stringValue":{"type":"string","description":"String body value"}},"description":"OTEL log body"},"OTELLogRecord":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELAttribute"},"description":"Log attributes"},"body":{"$ref":"#/components/schemas/OTELLogBody"},"droppedAttributesCount":{"type":"integer","description":"Number of dropped attributes","format":"int64"},"observedTimeUnixNano":{"type":"string","description":"Observed timestamp in nanoseconds"},"timeUnixNano":{"type":"string","description":"Timestamp in nanoseconds since Unix epoch"}},"description":"Individual OTEL log record"},"OTELLogsPayload":{"type":"object","properties":{"resourceLogs":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceLog"},"description":"Array of resource logs"}},"description":"OTEL logs export payload"},"OTELMetric":{"type":"object","properties":{"description":{"type":"string","description":"Metric description"},"exponentialHistogram":{"description":"ExponentialHistogram metric data (passed through)"},"gauge":{"description":"Gauge metric data (passed through)"},"histogram":{"description":"Histogram metric data (passed through)"},"name":{"type":"string","description":"Metric name"},"sum":{"$ref":"#/components/schemas/OTELSum"},"summary":{"description":"Summary metric data (passed through)"},"unit":{"type":"string","description":"Metric unit"}},"description":"OTEL metric"},"OTELMetricsPayload":{"type":"object","properties":{"resourceMetrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceMetrics"},"description":"Array of resource metrics"}},"description":"OTEL metrics export payload"},"OTELNumberDataPoint":{"type":"object","properties":{"asDouble":{"type":"number","description":"Value as double","format":"double"},"asInt":{"description":"Value as integer (string-encoded per OTLP/JSON, or raw number)"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELAttribute"},"description":"Data point attributes"},"startTimeUnixNano":{"type":"string","description":"Start timestamp in nanoseconds"},"timeUnixNano":{"type":"string","description":"Timestamp in nanoseconds"}},"description":"OTEL number data point"},"OTELResource":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceAttribute"},"description":"Resource attributes"},"droppedAttributesCount":{"type":"integer","description":"Number of dropped attributes","format":"int64"}},"description":"OTEL resource information"},"OTELResourceAttribute":{"type":"object","properties":{"key":{"type":"string","description":"Resource attribute key"},"value":{"$ref":"#/components/schemas/OTELAttributeValue"}},"description":"OTEL resource attribute","required":["key"]},"OTELResourceLog":{"type":"object","properties":{"resource":{"$ref":"#/components/schemas/OTELResource"},"scopeLogs":{"type":"array","items":{"$ref":"#/components/schemas/OTELScopeLog"},"description":"Array of scope logs"}},"description":"OTEL resource logs container"},"OTELResourceMetrics":{"type":"object","properties":{"resource":{"$ref":"#/components/schemas/OTELResource"},"scopeMetrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELScopeMetrics"},"description":"Array of scope metrics"}},"description":"OTEL resource metrics container"},"OTELScope":{"type":"object","properties":{"name":{"type":"string","description":"Scope name"},"version":{"type":"string","description":"Scope version"}},"description":"OTEL instrumentation scope"},"OTELScopeLog":{"type":"object","properties":{"logRecords":{"type":"array","items":{"$ref":"#/components/schemas/OTELLogRecord"},"description":"Array of log records"},"scope":{"$ref":"#/components/schemas/OTELScope"}},"description":"OTEL scope logs container"},"OTELScopeMetrics":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELMetric"},"description":"Array of metrics"},"scope":{"$ref":"#/components/schemas/OTELScope"}},"description":"OTEL scope metrics container"},"OTELSum":{"type":"object","properties":{"aggregationTemporality":{"description":"Aggregation temporality (number or enum string)"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/OTELNumberDataPoint"},"description":"Data points"},"isMonotonic":{"type":"boolean","description":"Whether the sum is monotonic"}},"description":"OTEL sum metric"},"ObservabilitySummary":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"avg_resolution_time_ms":{"type":"number","description":"Average time to resolution in milliseconds","format":"double"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","avg_session_duration_ms","avg_resolution_time_ms","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","total_tool_calls","failed_tool_calls","avg_latency_ms"]},"OpenAPIv3DeploymentAsset":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug"]},"Organization":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"The creation date of the organization.","format":"date-time"},"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the organization.","format":"date-time"},"webhooks_enabled":{"type":"boolean","description":"Whether webhooks are enabled for the organization"},"webhooks_onboarded":{"type":"boolean","description":"Whether webhooks support is initialized for the organization"}},"required":["id","name","slug","account_type","webhooks_onboarded","webhooks_enabled","created_at","updated_at"]},"OrganizationEntry":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"}},"slug":{"type":"string"},"user_workspace_slugs":{"type":"array","items":{"type":"string"}}},"required":["id","name","slug","projects"]},"OrganizationInvitation":{"type":"object","properties":{"accepted_at":{"type":"string","description":"When the invitation was accepted.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","description":"Invitee email address."},"expires_at":{"type":"string","description":"When the invitation expires.","format":"date-time"},"id":{"type":"string","description":"WorkOS invitation ID."},"inviter_user_id":{"type":"string","description":"Gram user ID of the inviter, when known."},"revoked_at":{"type":"string","description":"When the invitation was revoked.","format":"date-time"},"role_slug":{"type":"string","description":"WorkOS role slug assigned when the invite is accepted."},"state":{"type":"string","description":"Invitation lifecycle state.","enum":["pending","accepted","expired","revoked"]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","email","state","created_at","updated_at"]},"OrganizationInvitationAccept":{"type":"object","properties":{"accept_invitation_url":{"type":"string","description":"URL to complete acceptance in WorkOS (may be empty when not actionable)."},"email":{"type":"string","description":"Invitee email address."},"organization_name":{"type":"string","description":"Gram organization display name when the org is linked in Gram; empty if unknown."},"state":{"type":"string","description":"Invitation lifecycle state.","enum":["pending","accepted","expired","revoked"]}},"required":["email","state","organization_name","accept_invitation_url"]},"OrganizationUser":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","description":"User email address."},"id":{"type":"string","description":"Gram relationship row ID."},"last_login":{"type":"string","description":"Timestamp of the user's most recent login.","format":"date-time"},"name":{"type":"string","description":"User display name."},"organization_id":{"type":"string","description":"Gram organization ID."},"photo_url":{"type":"string","description":"User photo URL."},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","description":"Gram user ID."},"workos_membership_id":{"type":"string","description":"WorkOS organization membership ID when known."}},"required":["id","organization_id","user_id","name","email","created_at","updated_at"]},"OtelForwardingConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"ISO 8601 timestamp when the config was created. Omitted when no config is set.","format":"date-time"},"enabled":{"type":"boolean","description":"Whether forwarding is currently active."},"endpoint_url":{"type":"string","description":"URL each OTEL payload is POSTed to. Empty string when no config is set."},"headers":{"type":"array","items":{"$ref":"#/components/schemas/OtelForwardingHeader"},"description":"Headers configured for this endpoint. Values are never returned."},"id":{"type":"string","description":"Config ID. Omitted when no config is set for the organization."},"organization_id":{"type":"string","description":"Organization the config belongs to."},"updated_at":{"type":"string","description":"ISO 8601 timestamp of the most recent change. Omitted when no config is set.","format":"date-time"}},"description":"Per-organization config that controls forwarding of OTEL payloads received on the hooks endpoints to a customer-owned URL. When no config is set, id/created_at/updated_at are omitted and enabled defaults to false.","required":["organization_id","endpoint_url","enabled","headers"]},"OtelForwardingHeader":{"type":"object","properties":{"has_value":{"type":"boolean","description":"Whether a non-empty value is currently stored for this header. Always false on write-only operations."},"name":{"type":"string","description":"Header name."}},"description":"HTTP header forwarded with each OTEL payload.","required":["name","has_value"]},"OtelForwardingHeaderInput":{"type":"object","properties":{"name":{"type":"string","description":"Header name."},"value":{"type":"string","description":"Header value. Stored encrypted at rest; never returned on reads."}},"description":"HTTP header value provided when upserting a forwarding config.","required":["name","value"]},"Package":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package","format":"date-time"},"deleted_at":{"type":"string","description":"The deletion date of the package","format":"date-time"},"description":{"type":"string","description":"The description of the package. This contains HTML content."},"description_raw":{"type":"string","description":"The unsanitized, user-supplied description of the package. Limited markdown syntax is supported."},"id":{"type":"string","description":"The ID of the package"},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package"},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package"},"latest_version":{"type":"string","description":"The latest version of the package"},"name":{"type":"string","description":"The name of the package"},"organization_id":{"type":"string","description":"The ID of the organization that owns the package"},"project_id":{"type":"string","description":"The ID of the project that owns the package"},"summary":{"type":"string","description":"The summary of the package"},"title":{"type":"string","description":"The title of the package"},"updated_at":{"type":"string","description":"The last update date of the package","format":"date-time"},"url":{"type":"string","description":"External URL for the package owner"}},"required":["id","name","project_id","organization_id","created_at","updated_at"]},"PackageVersion":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package version","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment that the version belongs to"},"id":{"type":"string","description":"The ID of the package version"},"package_id":{"type":"string","description":"The ID of the package that the version belongs to"},"semver":{"type":"string","description":"The semantic version value"},"visibility":{"type":"string","description":"The visibility of the package version"}},"required":["id","package_id","deployment_id","visibility","semver","created_at"]},"PeriodUsage":{"type":"object","properties":{"actual_enabled_server_count":{"type":"integer","description":"The number of servers enabled at the time of the request","format":"int64"},"credits":{"type":"integer","description":"The number of credits used","format":"int64"},"has_active_subscription":{"type":"boolean","description":"Whether the project has an active subscription"},"included_credits":{"type":"integer","description":"The number of credits included in the tier","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"servers":{"type":"integer","description":"The number of servers used, according to the Polar meter","format":"int64"},"tool_calls":{"type":"integer","description":"The number of tool calls used","format":"int64"}},"required":["tool_calls","included_tool_calls","servers","included_servers","actual_enabled_server_count","credits","included_credits","has_active_subscription"]},"PlatformToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"owner_id":{"type":"string","description":"Optional owning entity ID"},"owner_kind":{"type":"string","description":"The entity kind that owns this tool's lifecycle"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"source_slug":{"type":"string","description":"The backing platform tool source (for example: logs)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A platform-owned tool served directly by the platform","required":["source_slug","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"Plugin":{"type":"object","properties":{"assignment_count":{"type":"integer","description":"Number of role/user assignments.","format":"int64"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/PluginAssignment"},"description":"Role/user assignments."},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string","description":"Optional description."},"id":{"type":"string","description":"Unique plugin identifier.","format":"uuid"},"name":{"type":"string","description":"Display name."},"server_count":{"type":"integer","description":"Number of active servers in this plugin.","format":"int64"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/PluginServer"},"description":"Servers included in this plugin."},"slug":{"type":"string","description":"URL-safe identifier, unique per org."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","created_at","updated_at"]},"PluginAssignment":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"Unique assignment identifier.","format":"uuid"},"principal_urn":{"type":"string","description":"Principal URN (e.g. role:engineering, user:id, or *)."}},"required":["id","principal_urn","created_at"]},"PluginServer":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"display_name":{"type":"string","description":"Display name shown in generated plugin config."},"id":{"type":"string","description":"Unique plugin server identifier.","format":"uuid"},"policy":{"type":"string","description":"Whether this server is required or optional.","enum":["required","optional"]},"sort_order":{"type":"integer","description":"Ordering within the plugin.","format":"int32"},"toolset_id":{"type":"string","description":"Gram toolset ID.","format":"uuid"}},"required":["id","toolset_id","display_name","policy","sort_order","created_at"]},"Project":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"logo_asset_id":{"type":"string","description":"The ID of the logo asset for the project"},"name":{"type":"string","description":"The name of the project"},"organization_id":{"type":"string","description":"The ID of the organization that owns the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"required":["id","name","slug","organization_id","created_at","updated_at"]},"ProjectEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug"]},"ProjectOverviewSummary":{"type":"object","properties":{"active_servers_count":{"type":"integer","description":"Number of MCP servers with at least one tool call in the time period","format":"int64"},"active_users_count":{"type":"integer","description":"Number of unique users with activity in the time period","format":"int64"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"llm_client_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/LLMClientUsage"},"description":"Breakdown of messages/activity by LLM client/agent"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"top_servers":{"type":"array","items":{"$ref":"#/components/schemas/TopServer"},"description":"Top 10 MCP servers by tool call count"},"top_users":{"type":"array","items":{"$ref":"#/components/schemas/TopUser"},"description":"Top 10 users by activity (# of messages or tool calls depending on metrics_mode)"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated project-level summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","total_tool_calls","failed_tool_calls","active_servers_count","active_users_count","top_users","top_servers","llm_client_breakdown"]},"ProjectSummary":{"type":"object","properties":{"avg_chat_duration_ms":{"type":"number","description":"Average chat request duration in milliseconds","format":"double"},"avg_chat_resolution_score":{"type":"number","description":"Average chat resolution score (0-100)","format":"double"},"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"avg_tool_duration_ms":{"type":"number","description":"Average tool call duration in milliseconds","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"chat_resolution_abandoned":{"type":"integer","description":"Chats abandoned by user","format":"int64"},"chat_resolution_failure":{"type":"integer","description":"Chats that failed to resolve","format":"int64"},"chat_resolution_partial":{"type":"integer","description":"Chats partially resolved","format":"int64"},"chat_resolution_success":{"type":"integer","description":"Chats resolved successfully","format":"int64"},"distinct_models":{"type":"integer","description":"Number of distinct models used (project scope only)","format":"int64"},"distinct_providers":{"type":"integer","description":"Number of distinct providers used (project scope only)","format":"int64"},"finish_reason_stop":{"type":"integer","description":"Requests that completed naturally","format":"int64"},"finish_reason_tool_calls":{"type":"integer","description":"Requests that resulted in tool calls","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsage"},"description":"List of models used with call counts"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"List of tools used with success/failure counts"},"total_chat_requests":{"type":"integer","description":"Total number of chat requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions (project scope only)","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated metrics","required":["first_seen_unix_nano","last_seen_unix_nano","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","avg_tokens_per_request","total_chat_requests","avg_chat_duration_ms","finish_reason_stop","finish_reason_tool_calls","total_tool_calls","tool_call_success","tool_call_failure","avg_tool_duration_ms","chat_resolution_success","chat_resolution_failure","chat_resolution_partial","chat_resolution_abandoned","avg_chat_resolution_score","total_chats","distinct_models","distinct_providers","models","tools"]},"PromptTemplate":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"history_id":{"type":"string","description":"The revision tree ID for the prompt template"},"id":{"type":"string","description":"The ID of the tool"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the tool"},"predecessor_id":{"type":"string","description":"The previous version of the prompt template to use as predecessor"},"project_id":{"type":"string","description":"The ID of the project"},"prompt":{"type":"string","description":"The template content"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A prompt template","required":["id","history_id","name","prompt","engine","kind","tools_hint","tool_urn","created_at","updated_at","project_id","canonical_name","description","schema"]},"PromptTemplateEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the prompt template"},"kind":{"type":"string","description":"The kind of the prompt template"},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name"]},"PublishPackageForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The deployment ID to associate with the package version"},"name":{"type":"string","description":"The name of the package"},"version":{"type":"string","description":"The new semantic version of the package to publish"},"visibility":{"type":"string","description":"The visibility of the package version","enum":["public","private"]}},"required":["name","version","deployment_id","visibility"]},"PublishPackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"version":{"$ref":"#/components/schemas/PackageVersion"}},"required":["package","version"]},"PublishPluginsRequestBody":{"type":"object","properties":{"github_usernames":{"type":"array","items":{"type":"string"},"description":"GitHub usernames to add as collaborators on the repo."}}},"PublishPluginsResult":{"type":"object","properties":{"repo_url":{"type":"string","description":"The URL of the published GitHub repository."}},"required":["repo_url"]},"PublishStatusResult":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether GitHub publishing is configured on the server."},"connected":{"type":"boolean","description":"Whether this project has a GitHub connection."},"marketplace_url":{"type":"string","description":"Git-based Claude Code marketplace URL — the value to pass to `/plugin marketplace add` or set as the source URL in `extraKnownMarketplaces`. Present once a marketplace token has been minted, which happens automatically on the first publish."},"repo_name":{"type":"string","description":"GitHub repo name, if connected."},"repo_owner":{"type":"string","description":"GitHub repo owner, if connected."},"repo_url":{"type":"string","description":"Full GitHub repository URL, if connected."}},"required":["configured","connected"]},"RBACStatus":{"type":"object","properties":{"rbac_enabled":{"type":"boolean","description":"Whether RBAC enforcement is currently enabled for this organization."}},"required":["rbac_enabled"]},"RedeployRequestBody":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to redeploy."}},"required":["deployment_id"]},"RedeployResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"RegisterRequestBody":{"type":"object","properties":{"org_name":{"type":"string","description":"The name of the org to register"}},"required":["org_name"]},"RemoteMcpServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the remote MCP server was created","format":"date-time"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/RemoteMcpServerHeader"},"description":"Headers configured for this remote MCP server"},"id":{"type":"string","description":"The ID of the remote MCP server","format":"uuid"},"name":{"type":"string","description":"Optional human-readable name for the remote MCP server"},"project_id":{"type":"string","description":"The project ID this remote MCP server belongs to","format":"uuid"},"slug":{"type":"string","description":"URL-friendly slug derived from the URL and ID."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server"},"updated_at":{"type":"string","description":"When the remote MCP server was last updated","format":"date-time"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"A remote MCP server configuration","required":["id","project_id","url","transport_type","headers","created_at","updated_at"]},"RemoteMcpServerHeader":{"type":"object","properties":{"created_at":{"type":"string","description":"When the header was created","format":"date-time"},"description":{"type":"string","description":"Description of the header"},"id":{"type":"string","description":"The ID of the header","format":"uuid"},"is_required":{"type":"boolean","description":"Whether the header is required"},"is_secret":{"type":"boolean","description":"Whether the header value is a secret"},"name":{"type":"string","description":"The header name"},"updated_at":{"type":"string","description":"When the header was last updated","format":"date-time"},"value":{"type":"string","description":"The header value (redacted if secret)"},"value_from_request_header":{"type":"string","description":"Name of the inbound request header to pass through"}},"description":"A header configured for a remote MCP server","required":["id","name","is_required","is_secret","created_at","updated_at"]},"RemoteSession":{"type":"object","properties":{"access_expires_at":{"type":"string","description":"Upstream access-token expiry. Independent of refresh_expires_at.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The remote_session id.","format":"uuid"},"refresh_expires_at":{"type":"string","description":"Upstream refresh-token expiry. Null when the session has no refresh token.","format":"date-time"},"remote_session_client_id":{"type":"string","description":"The remote_session_client this session was minted against.","format":"uuid"},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes held by this session."},"subject_urn":{"type":"string","description":"The session's subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this session is bound to.","format":"uuid"}},"description":"A remote_session record — Gram's upstream OAuth session for a (principal, remote_session_client) pair. access_token_encrypted and refresh_token_encrypted are never returned.","required":["id","subject_urn","user_session_issuer_id","remote_session_client_id","access_expires_at","scopes","created_at","updated_at"]},"RemoteSessionClient":{"type":"object","properties":{"audience":{"type":"string","description":"Upstream OAuth audience sent on the authorize redirect and token exchange. Null omits the audience parameter."},"client_id":{"type":"string","description":"The client_id used to identify this client at the issuer's token and authorization endpoints."},"client_id_issued_at":{"type":"string","format":"date-time"},"client_secret_expires_at":{"type":"string","description":"Null when the secret does not expire.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The remote_session_client id.","format":"uuid"},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"remote_session_issuer_id":{"type":"string","description":"The owning remote_session_issuer id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string"},"description":"Explicit upstream OAuth scopes the dance requests for this client. Null falls back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the client authenticates at the issuer's token endpoint. Null resolves to client_secret_basic at runtime.","enum":["client_secret_basic","client_secret_post"]},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this client is paired with.","format":"uuid"}},"description":"A remote_session_client record. client_secret_encrypted is never returned.","required":["id","project_id","remote_session_issuer_id","user_session_issuer_id","client_id","client_id_issued_at","created_at","updated_at"]},"RemoteSessionIssuer":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"created_at":{"type":"string","format":"date-time"},"grant_types_supported":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"The remote_session_issuer id.","format":"uuid"},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI; null when not advertised."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer."},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; null for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"slug":{"type":"string","description":"Project-unique slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"}},"description":"A remote_session_issuer record — upstream Authorization Server identity that Gram speaks OAuth to.","required":["id","project_id","slug","issuer","oidc","passthrough","created_at","updated_at"]},"RemoteSessionIssuerDraft":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"discovery_warnings":{"type":"array","items":{"type":"string"},"description":"Warnings describing any RFC 8414 deviations encountered during discovery."},"grant_types_supported":{"type":"array","items":{"type":"string"}},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI; null when not advertised."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer."},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; null for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"description":"A draft remote_session_issuer returned by discover. Same shape as RemoteSessionIssuer minus id/project_id/timestamps, plus discovery_warnings describing any RFC 8414 deviations.","required":["issuer","oidc","passthrough","discovery_warnings"]},"RenderTemplateByIDRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true}},"required":["arguments"]},"RenderTemplateRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"prompt":{"type":"string","description":"The template content to render"}},"required":["prompt","arguments","engine","kind"]},"RenderTemplateResult":{"type":"object","properties":{"prompt":{"type":"string","description":"The rendered prompt"}},"required":["prompt"]},"ResolveChallengeForm":{"type":"object","properties":{"challenge_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the challenges in ClickHouse to resolve."},"principal_urn":{"type":"string","description":"Principal that was denied."},"resolution_type":{"type":"string","description":"How the challenge is being resolved.","enum":["role_assigned","dismissed"]},"resource_id":{"type":"string","description":"Resource ID from the challenge."},"resource_kind":{"type":"string","description":"Resource kind from the challenge."},"role_slug":{"type":"string","description":"Role slug to assign (required when resolution_type=role_assigned)."},"scope":{"type":"string","description":"Scope that was denied."}},"required":["challenge_ids","principal_urn","scope","resolution_type"]},"ResolveChallengesResult":{"type":"object","properties":{"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeResolution"},"description":"The created resolution records."}},"required":["resolutions"]},"Resource":{"type":"object","properties":{"function_resource_definition":{"$ref":"#/components/schemas/FunctionResourceDefinition"}},"description":"A polymorphic resource - currently only function resources are supported"},"ResourceEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the resource"},"name":{"type":"string","description":"The name of the resource"},"resource_urn":{"type":"string","description":"The URN of the resource"},"type":{"type":"string","enum":["function"]},"uri":{"type":"string","description":"The uri of the resource"}},"required":["type","id","name","uri","resource_urn"]},"ResponseFilter":{"type":"object","properties":{"content_types":{"type":"array","items":{"type":"string"},"description":"Content types to filter for"},"status_codes":{"type":"array","items":{"type":"string"},"description":"Status codes to filter for"},"type":{"type":"string","description":"Response filter type for the tool"}},"description":"Response filter metadata for the tool","required":["type","status_codes","content_types"]},"RiskCapabilitiesResult":{"type":"object","properties":{"pi_classifier_enabled":{"type":"boolean","description":"Whether the prompt-injection ML classifier is configured on this server."}},"required":["pi_classifier_enabled"]},"RiskCategoriesResult":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskCategoryDefinition"},"description":"Categories in classification-priority order. The last entry is the 'custom' fallback for findings that match none of the others."}},"description":"Canonical risk category definitions used to classify findings, in classification-priority order. Consumers should iterate in order and pick the first match.","required":["categories"]},"RiskCategoryDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Plain-English description of what this category covers."},"icon":{"type":"string","description":"Lucide icon name suggested for this category."},"key":{"type":"string","description":"Canonical category key (e.g. 'secrets', 'pii', 'shadow_mcp')."},"label":{"type":"string","description":"Human-readable category label for UI rendering."},"rule_id_prefix":{"type":"string","description":"When non-empty, findings whose rule_id starts with this prefix belong to this category. The catch-all for a family (e.g. 'pii.')."},"rule_ids":{"type":"array","items":{"type":"string"},"description":"When non-empty, findings whose rule_id is in this exact list belong to this category. Checked before rule_id_prefix."},"source":{"type":"string","description":"When non-empty, findings whose source equals this value belong to this category."}},"description":"One canonical risk category and how findings are classified into it.","required":["key","label","description","icon","source","rule_ids","rule_id_prefix"]},"RiskChatSummary":{"type":"object","properties":{"chat_id":{"type":"string","description":"The chat session ID.","format":"uuid"},"chat_title":{"type":"string","description":"Title of the chat session."},"findings_count":{"type":"integer","description":"Number of findings in this chat.","format":"int64"},"latest_detected":{"type":"string","description":"When the most recent finding was detected.","format":"date-time"},"user_id":{"type":"string","description":"The user who owns the chat session."}},"required":["chat_id","findings_count","latest_detected"]},"RiskOverviewCategory":{"type":"object","properties":{"category":{"type":"string","description":"Policy category key."},"findings":{"type":"integer","description":"Finding count for this category.","format":"int64"}},"required":["category","findings"]},"RiskOverviewResult":{"type":"object","properties":{"active_policies":{"type":"integer","description":"Enabled risk policies for the current project.","format":"int64"},"findings":{"type":"integer","description":"Policy findings in the window.","format":"int64"},"flagged_sessions":{"type":"integer","description":"Chat sessions with at least one finding in the window.","format":"int64"},"from":{"type":"string","description":"Inclusive start of the overview window.","format":"date-time"},"messages_scanned":{"type":"integer","description":"Messages analyzed by risk policies in the window.","format":"int64"},"time_series_findings":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewTimeSeriesFinding"},"description":"Time-series finding counts by category in the window."},"to":{"type":"string","description":"Exclusive end of the overview window.","format":"date-time"},"top_categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewCategory"},"description":"Top policy categories by finding count."},"top_rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Top rule_ids by finding count."},"top_users":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewUser"},"description":"Top users by finding count."}},"required":["from","to","messages_scanned","findings","flagged_sessions","active_policies","top_categories","top_users","top_rules","time_series_findings"]},"RiskOverviewTimeSeriesFinding":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Time bucket start.","format":"date-time"},"category":{"type":"string","description":"Policy category key."},"findings":{"type":"integer","description":"Finding count for this category and time bucket.","format":"int64"}},"required":["bucket_start","category","findings"]},"RiskOverviewUser":{"type":"object","properties":{"email":{"type":"string","description":"User email, or Unknown user when unavailable."},"external_user_id":{"type":"string","description":"External user identifier as recorded on chats, when known. Empty when the finding cannot be attributed to an external user."},"findings":{"type":"integer","description":"Finding count for this user.","format":"int64"}},"required":["email","external_user_id","findings"]},"RiskPolicy":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag (log only) or block (deny in real-time).","default":"flag","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name is auto-generated. When true, the name is regenerated on each update."},"created_at":{"type":"string","description":"When the policy was created.","format":"date-time"},"enabled":{"type":"boolean","description":"Whether the policy is active."},"id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"name":{"type":"string","description":"The policy name."},"pending_messages":{"type":"integer","description":"Number of messages not yet analyzed at the current policy version.","format":"int64"},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to scan for. When empty, scans all entities."},"project_id":{"type":"string","description":"The project ID.","format":"uuid"},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids enabled in addition to the heuristic baseline (e.g. 'deberta-v3-classifier'). When empty, only heuristics run."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources enabled for this policy."},"total_messages":{"type":"integer","description":"Total number of messages in the project.","format":"int64"},"updated_at":{"type":"string","description":"When the policy was last updated.","format":"date-time"},"user_message":{"type":"string","description":"Optional message shown to the end user when this policy blocks an action or surfaces a flagged finding. When unset, a default message is rendered."},"version":{"type":"integer","description":"Policy version, incremented on each update.","format":"int64"}},"required":["id","project_id","name","sources","enabled","action","auto_name","version","created_at","updated_at","pending_messages","total_messages"]},"RiskPolicyStatus":{"type":"object","properties":{"analyzed_messages":{"type":"integer","description":"Messages analyzed at the current policy version.","format":"int64"},"findings_count":{"type":"integer","description":"Number of findings at the current policy version.","format":"int64"},"pending_messages":{"type":"integer","description":"Messages not yet analyzed.","format":"int64"},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"policy_version":{"type":"integer","description":"Current policy version.","format":"int64"},"total_messages":{"type":"integer","description":"Total messages in the project.","format":"int64"},"workflow_status":{"type":"string","description":"Workflow state: running, sleeping, or not_started.","enum":["running","sleeping","not_started"]}},"required":["policy_id","policy_version","total_messages","analyzed_messages","pending_messages","findings_count","workflow_status"]},"RiskResult":{"type":"object","properties":{"chat_id":{"type":"string","description":"The chat session containing the message.","format":"uuid"},"chat_message_id":{"type":"string","description":"The chat message that was scanned.","format":"uuid"},"chat_title":{"type":"string","description":"Title of the chat session."},"confidence":{"type":"number","description":"Confidence score for this finding.","format":"double"},"created_at":{"type":"string","description":"When this result was created.","format":"date-time"},"description":{"type":"string","description":"Human-readable description of the finding."},"end_pos":{"type":"integer","description":"End byte position within the message content.","format":"int64"},"id":{"type":"string","description":"The result ID.","format":"uuid"},"match":{"type":"string","description":"The matched secret or sensitive data."},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"policy_version":{"type":"integer","description":"Policy version when this result was produced.","format":"int64"},"rule_id":{"type":"string","description":"The matched rule identifier."},"source":{"type":"string","description":"Detection source (e.g. gitleaks)."},"start_pos":{"type":"integer","description":"Start byte position within the message content.","format":"int64"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags from the detection rule."},"user_id":{"type":"string","description":"The user who owns the chat session."}},"required":["id","policy_id","policy_version","chat_message_id","source","created_at"]},"RiskRuleBreakdownEntry":{"type":"object","properties":{"findings":{"type":"integer","description":"Finding count for this rule within the window.","format":"int64"},"rule_id":{"type":"string","description":"Rule identifier (e.g. 'secret.aws-access-key'). Empty when the finding has no rule_id (treat as 'unspecified')."},"source":{"type":"string","description":"Source bucket the rule belongs to (gitleaks, presidio, etc.) for label/icon resolution on the dashboard."}},"required":["rule_id","source","findings"]},"RiskRuleBreakdownResult":{"type":"object","properties":{"category":{"type":"string","description":"Category the breakdown is scoped to."},"from":{"type":"string","description":"Inclusive start of the window used.","format":"date-time"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Rules in this category, ordered by finding count descending."},"to":{"type":"string","description":"Exclusive end of the window used.","format":"date-time"},"total":{"type":"integer","description":"Total findings across all rules in this category and window.","format":"int64"}},"required":["from","to","category","rules","total"]},"RiskUserBreakdownResult":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewCategory"},"description":"Category breakdown for this user, ordered by finding count descending."},"external_user_id":{"type":"string","description":"External user the breakdown is scoped to."},"findings":{"type":"integer","description":"Total findings for this user in the window.","format":"int64"},"from":{"type":"string","description":"Inclusive start of the window used.","format":"date-time"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Rule_id breakdown for this user, ordered by finding count descending."},"to":{"type":"string","description":"Exclusive end of the window used.","format":"date-time"}},"required":["from","to","external_user_id","findings","categories","rules"]},"Role":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":"string","description":"Human-readable description."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Scope grants assigned to this role."},"id":{"type":"string","description":"Unique role identifier."},"is_system":{"type":"boolean","description":"Whether this is a built-in system role that cannot be deleted."},"member_count":{"type":"integer","description":"Number of members assigned to this role.","format":"int64"},"name":{"type":"string","description":"Display name of the role."},"slug":{"type":"string","description":"Stable WorkOS role slug."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","description","is_system","grants","member_count","created_at","updated_at"]},"RoleGrant":{"type":"object","properties":{"effect":{"type":"string","description":"Whether this grant allows or denies the scope. Defaults to 'allow' when omitted.","default":"allow","enum":["allow","deny"]},"scope":{"type":"string","description":"The scope slug this grant applies to.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"selectors":{"type":"array","items":{"$ref":"#/components/schemas/Selector"},"description":"Selector constraints. Null means unrestricted."}},"required":["scope"]},"RoleSummary":{"type":"object","properties":{"cost_per_user":{"type":"number","description":"Average cost per user (total_cost / user_count)","format":"double"},"role_id":{"type":"string","description":"Role identifier extracted from role URN"},"role_name":{"type":"string","description":"Human-readable role name"},"total_chats":{"type":"integer","description":"Total chat sessions across all users","format":"int64"},"total_cost":{"type":"number","description":"Total cost across all users with this role","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens across all users","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens across all users","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens across all users","format":"int64"},"user_count":{"type":"integer","description":"Number of users with this role","format":"int64"}},"description":"Aggregated usage summary for a role","required":["role_id","role_name","user_count","total_cost","cost_per_user","total_input_tokens","total_output_tokens","total_tokens","total_chats"]},"ScopeDefinition":{"type":"object","properties":{"description":{"type":"string","description":"What this scope protects."},"resource_type":{"type":"string","description":"The type of resource this scope applies to.","enum":["org","project","mcp","environment"]},"slug":{"type":"string","description":"Unique scope identifier.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]}},"required":["slug","description","resource_type"]},"SearchChatsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching chat sessions"},"SearchChatsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchChatsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching chat session summaries"},"SearchChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummary"},"description":"List of chat session summaries"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching chat session summaries","required":["chats"]},"SearchLogsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_chat_id":{"type":"string","description":"Chat ID filter"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"gram_urns":{"type":"array","items":{"type":"string"},"description":"Gram URN filter (one or more URNs)"},"http_method":{"type":"string","description":"HTTP method filter","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]},"http_route":{"type":"string","description":"HTTP route filter"},"http_status_code":{"type":"integer","description":"HTTP status code filter","format":"int32"},"service_name":{"type":"string","description":"Service name filter"},"severity_text":{"type":"string","description":"Severity level filter","enum":["DEBUG","INFO","WARN","ERROR","FATAL"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"trace_id":{"type":"string","description":"Trace ID filter (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching logs"},"SearchLogsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchLogsFilter"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions for the search query"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for searching telemetry logs"},"SearchLogsResult":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/TelemetryLogRecord"},"description":"List of telemetry log records"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching telemetry logs","required":["logs"]},"SearchToolCallsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching tool calls"},"SearchToolCallsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchToolCallsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching tool call summaries"},"SearchToolCallsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallSummary"},"description":"List of tool call summaries"}},"description":"Result of searching tool call summaries","required":["tool_calls"]},"SearchUsersFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook'). When set, only rows with a matching event_source are included."},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')."},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_ids":{"type":"array","items":{"type":"string"},"description":"Optional list of user identifiers to include. Matches user_id for internal searches and external_user_id for external searches."}},"description":"Filter criteria for searching user usage summaries","required":["from","to"]},"SearchUsersPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (user identifier from last item)"},"filter":{"$ref":"#/components/schemas/SearchUsersFilter"},"group_by":{"type":"string","description":"Grouping dimension for results","default":"employee","enum":["employee","role"]},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"user_type":{"type":"string","description":"Type of user identifier to group by","enum":["internal","external"]}},"description":"Payload for searching user usage summaries","required":["filter","user_type"]},"SearchUsersResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/RoleSummary"},"description":"List of role usage summaries (populated when group_by=role)"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserSummary"},"description":"List of user usage summaries (populated when group_by=employee)"}},"description":"Result of searching user usage summaries","required":["users"]},"SecurityVariable":{"type":"object","properties":{"bearer_format":{"type":"string","description":"The bearer format"},"display_name":{"type":"string","description":"User-friendly display name for the security variable (defaults to name if not set)"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"},"id":{"type":"string","description":"The unique identifier of the security variable"},"in_placement":{"type":"string","description":"Where the security token is placed"},"name":{"type":"string","description":"The name of the security scheme (actual header/parameter name)"},"oauth_flows":{"type":"string","description":"The OAuth flows","format":"binary"},"oauth_types":{"type":"array","items":{"type":"string"},"description":"The OAuth types"},"scheme":{"type":"string","description":"The security scheme"},"type":{"type":"string","description":"The type of security"}},"required":["id","name","in_placement","scheme","env_variables"]},"Selector":{"type":"object","properties":{"disposition":{"type":"string","description":"Tool disposition filter (MCP scopes only).","enum":["read_only","destructive","idempotent","open_world"]},"project_id":{"type":"string","description":"Project filter (MCP scopes only). When set with resource_id='*', grants access to all servers in the project."},"resource_id":{"type":"string","description":"The resource identifier, or '*' for all resources of this kind."},"resource_kind":{"type":"string","description":"The kind of resource this selector targets.","enum":["project","mcp","org","environment","*"]},"tool":{"type":"string","description":"Specific tool name filter (MCP scopes only)."}},"description":"A constraint that narrows which resources a grant applies to.","required":["resource_kind","resource_id"]},"SendInviteRequestBody":{"type":"object","properties":{"email":{"type":"string","description":"Email address to invite."},"role_id":{"type":"string","description":"Optional role ID for the invitee."}},"required":["email"]},"ServeChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the attachment to serve"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeChatAttachmentResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeChatAttachmentSignedForm":{"type":"object","properties":{"token":{"type":"string","description":"The signed JWT token"}},"required":["token"]},"ServeChatAttachmentSignedResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeFunctionForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeFunctionResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeImageForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the asset to serve"}},"required":["id"]},"ServeImageResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeOpenAPIv3Result":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServerNameOverride":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name"},"id":{"type":"string","description":"Override ID"},"raw_server_name":{"type":"string","description":"Original server name from hooks"}},"description":"User-defined display name for a hooks server","required":["id","raw_server_name","display_name"]},"ServerVariable":{"type":"object","properties":{"description":{"type":"string","description":"Description of the server variable"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"}},"required":["description","env_variables"]},"ServiceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"version":{"type":"string","description":"Service version"}},"description":"Service information","required":["name"]},"SetMcpMetadataRequestBody":{"type":"object","properties":{"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfigInput"},"description":"The list of environment variables to configure for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo"},"toolset_slug":{"type":"string","description":"The slug of the toolset associated with this install page metadata","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"SetOrganizationWhitelistRequestBody":{"type":"object","properties":{"organization_id":{"type":"string","description":"The ID of the organization to update"},"whitelisted":{"type":"boolean","description":"Whether the organization should be whitelisted"}},"required":["organization_id","whitelisted"]},"SetPluginAssignmentsForm":{"type":"object","properties":{"plugin_id":{"type":"string","format":"uuid"},"principal_urns":{"type":"array","items":{"type":"string"},"description":"List of principal URNs to assign."}},"required":["plugin_id","principal_urns"]},"SetPluginAssignmentsResponseBody":{"type":"object","properties":{"assignments":{"type":"array","items":{"$ref":"#/components/schemas/PluginAssignment"},"description":"The updated assignments."}},"required":["assignments"]},"SetProductFeatureRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the feature should be enabled"},"feature_name":{"type":"string","description":"Name of the feature to update","enum":["logs","tool_io_logs","session_capture","authz_challenge_logging"],"maxLength":60}},"required":["feature_name","enabled"]},"SetProjectLogoForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the asset"}},"required":["asset_id"]},"SetProjectLogoResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"SetSourceEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source (http or function)","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"required":["source_kind","source_slug","environment_id"]},"SetToolsetEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"required":["toolset_id","environment_id"]},"SetUserSessionIssuerForm":{"type":"object","properties":{"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer id to link, or null to unlink.","format":"uuid"}},"required":["slug"]},"SetUserSessionIssuerRequestBody":{"type":"object","properties":{"user_session_issuer_id":{"type":"string","description":"The user_session_issuer id to link, or null to unlink.","format":"uuid"}}},"ShadowMCPApproval":{"type":"object","properties":{"approved_at":{"type":"string","description":"When the approval was recorded.","format":"date-time"},"approved_by":{"type":"string","description":"User that recorded the approval."},"match":{"type":"string","description":"The MCP server identifier this approval covers — typically a server URL, stdio command, or `mcp__\u003cserver\u003e__` prefix (the same value surfaced in `RiskResult.match`)."},"policy_id":{"type":"string","description":"The risk policy ID this approval is scoped to.","format":"uuid"},"server_name":{"type":"string","description":"Display name of the MCP server, when known."}},"required":["policy_id","match","approved_at"]},"SkillBreakdownRow":{"type":"object","properties":{"skill_name":{"type":"string","description":"Skill name"},"use_count":{"type":"integer","description":"Use count for this skill/user combination","format":"int64"},"user_email":{"type":"string","description":"User email address"}},"description":"Per-(skill, user) aggregated counts","required":["skill_name","user_email","use_count"]},"SkillSummary":{"type":"object","properties":{"skill_name":{"type":"string","description":"Skill name (extracted from tool name)"},"unique_users":{"type":"integer","description":"Number of unique users who used this skill","format":"int64"},"use_count":{"type":"integer","description":"Total number of times this skill was used","format":"int64"}},"description":"Aggregated skills metrics for a single skill","required":["skill_name","use_count","unique_users"]},"SkillTimeSeriesPoint":{"type":"object","properties":{"bucket_start_ns":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS int64 precision)"},"event_count":{"type":"integer","description":"Number of skill use events in this bucket","format":"int64"},"skill_name":{"type":"string","description":"Skill name"}},"description":"A single time-series bucket for skill usage activity","required":["bucket_start_ns","skill_name","event_count"]},"SlackAppResult":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"icon_asset_id":{"type":"string","description":"Asset ID for the app icon"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"Display name of the Slack app"},"redirect_url":{"type":"string","description":"OAuth callback URL for this app"},"request_url":{"type":"string","description":"Event subscription URL for this app"},"slack_client_id":{"type":"string","description":"The Slack app Client ID"},"slack_team_id":{"type":"string","description":"The connected Slack workspace ID"},"slack_team_name":{"type":"string","description":"The connected Slack workspace name"},"status":{"type":"string","description":"Current status: unconfigured, active"},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Attached toolset IDs"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","toolset_ids","created_at","updated_at"]},"SourceEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the source environment link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source that can be linked to an environment","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"description":"A link between a source and an environment","required":["id","source_kind","source_slug","environment_id"]},"SubmitFeedbackRequestBody":{"type":"object","properties":{"feedback":{"type":"string","description":"User feedback: success or failure","enum":["success","failure"]},"id":{"type":"string","description":"The ID of the chat"}},"required":["id","feedback"]},"TelemetryFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for telemetry queries"},"TelemetryLogRecord":{"type":"object","properties":{"attributes":{"description":"Log attributes as JSON object"},"body":{"type":"string","description":"The primary log message"},"id":{"type":"string","description":"Log record ID","format":"uuid"},"observed_time_unix_nano":{"type":"string","description":"Unix time in nanoseconds when event was observed (string for JS int64 precision)"},"resource_attributes":{"description":"Resource attributes as JSON object"},"service":{"$ref":"#/components/schemas/ServiceInfo"},"severity_text":{"type":"string","description":"Text representation of severity"},"span_id":{"type":"string","description":"W3C span ID (16 hex characters)"},"time_unix_nano":{"type":"string","description":"Unix time in nanoseconds when event occurred (string for JS int64 precision)"},"trace_id":{"type":"string","description":"W3C trace ID (32 hex characters)"}},"description":"OpenTelemetry log record","required":["id","time_unix_nano","observed_time_unix_nano","body","attributes","resource_attributes","service"]},"TierLimits":{"type":"object","properties":{"add_on_bullets":{"type":"array","items":{"type":"string"},"description":"Add-on items bullets of the tier (optional)"},"base_price":{"type":"number","description":"The base price for the tier","format":"double"},"feature_bullets":{"type":"array","items":{"type":"string"},"description":"Key feature bullets of the tier"},"included_bullets":{"type":"array","items":{"type":"string"},"description":"Included items bullets of the tier"},"included_credits":{"type":"integer","description":"The number of credits included in the tier for playground and other dashboard activities","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"price_per_additional_server":{"type":"number","description":"The price per additional server","format":"double"},"price_per_additional_tool_call":{"type":"number","description":"The price per additional tool call","format":"double"}},"required":["base_price","included_tool_calls","included_servers","included_credits","price_per_additional_tool_call","price_per_additional_server","feature_bullets","included_bullets"]},"TimeSeriesBucket":{"type":"object","properties":{"abandoned_chats":{"type":"integer","description":"Abandoned chat sessions in this bucket","format":"int64"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"avg_tool_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"bucket_time_unix_nano":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS precision)"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens in this bucket","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens in this bucket","format":"int64"},"failed_chats":{"type":"integer","description":"Failed chat sessions in this bucket","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Failed tool calls in this bucket","format":"int64"},"partial_chats":{"type":"integer","description":"Partially resolved chat sessions in this bucket","format":"int64"},"resolved_chats":{"type":"integer","description":"Resolved chat sessions in this bucket","format":"int64"},"total_chats":{"type":"integer","description":"Total chat sessions in this bucket","format":"int64"},"total_cost":{"type":"number","description":"Total cost in this bucket","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens in this bucket","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens in this bucket","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens in this bucket","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total tool calls in this bucket","format":"int64"}},"description":"A single time bucket for time series metrics","required":["bucket_time_unix_nano","total_chats","resolved_chats","failed_chats","partial_chats","abandoned_chats","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","total_tool_calls","failed_tool_calls","avg_tool_latency_ms","avg_session_duration_ms"]},"Tool":{"type":"object","properties":{"external_mcp_tool_definition":{"$ref":"#/components/schemas/ExternalMCPToolDefinition"},"function_tool_definition":{"$ref":"#/components/schemas/FunctionToolDefinition"},"http_tool_definition":{"$ref":"#/components/schemas/HTTPToolDefinition"},"platform_tool_definition":{"$ref":"#/components/schemas/PlatformToolDefinition"},"prompt_template":{"$ref":"#/components/schemas/PromptTemplate"}},"description":"A polymorphic tool - can be an HTTP tool, function tool, prompt template, or external MCP proxy"},"ToolAnnotations":{"type":"object","properties":{"destructive_hint":{"type":"boolean","description":"If true, the tool may perform destructive updates (only meaningful when read_only_hint is false)"},"idempotent_hint":{"type":"boolean","description":"If true, repeated calls with same arguments have no additional effect (only meaningful when read_only_hint is false)"},"open_world_hint":{"type":"boolean","description":"If true, the tool interacts with external entities beyond its local environment"},"read_only_hint":{"type":"boolean","description":"If true, the tool does not modify its environment"},"title":{"type":"string","description":"Human-readable display name for the tool"}},"description":"Tool annotations providing behavioral hints about the tool"},"ToolCallSummary":{"type":"object","properties":{"event_source":{"type":"string","description":"Event source (from attributes.gram.event.source)"},"gram_urn":{"type":"string","description":"Gram URN associated with this tool call"},"http_status_code":{"type":"integer","description":"HTTP status code (if applicable)","format":"int32"},"log_count":{"type":"integer","description":"Total number of logs in this tool call","format":"int64"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"tool_name":{"type":"string","description":"Tool name (from attributes.gram.tool.name)"},"tool_source":{"type":"string","description":"Tool call source (from attributes.gram.tool_call.source)"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"}},"description":"Summary information for a tool call","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"ToolEntry":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"http_method":{"type":"string","description":"HTTP method for HTTP tools (GET, POST, PUT, PATCH, DELETE)"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"tool_urn":{"type":"string","description":"The URN of the tool"},"type":{"type":"string","description":"The type of tool","enum":["http","prompt","function","platform","externalmcp"]}},"required":["type","id","name","tool_urn"]},"ToolMetric":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average latency in milliseconds","format":"double"},"call_count":{"type":"integer","description":"Total number of calls","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed calls","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate (0.0 to 1.0)","format":"double"},"gram_urn":{"type":"string","description":"Tool URN"},"success_count":{"type":"integer","description":"Number of successful calls","format":"int64"}},"description":"Aggregated metrics for a single tool","required":["gram_urn","call_count","success_count","failure_count","avg_latency_ms","failure_rate"]},"ToolUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Total call count","format":"int64"},"failure_count":{"type":"integer","description":"Failed calls (4xx/5xx status)","format":"int64"},"success_count":{"type":"integer","description":"Successful calls (2xx status)","format":"int64"},"urn":{"type":"string","description":"Tool URN"}},"description":"Tool usage statistics","required":["urn","count","success_count","failure_count"]},"ToolVariation":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation"},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"created_at":{"type":"string","description":"The creation date of the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"group_id":{"type":"string","description":"The ID of the tool variation group"},"id":{"type":"string","description":"The ID of the tool variation"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"},"updated_at":{"type":"string","description":"The last update date of the tool variation"}},"required":["id","group_id","src_tool_name","src_tool_urn","created_at","updated_at"]},"Toolset":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServer"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"oauth_enablement_metadata":{"$ref":"#/components/schemas/OAuthEnablementMetadata"},"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServer"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The tools in this toolset"},"toolset_version":{"type":"integer","description":"The version of the toolset (will be 0 if none exists)","format":"int64"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The id of the user_session_issuer wired to this toolset. Set via toolsets.setUserSessionIssuer; null when no USI is linked."},"user_session_issuer_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","project_id","organization_id","account_type","name","slug","tools","tool_selection_mode","toolset_version","prompt_templates","tool_urns","resources","resource_urns","oauth_enablement_metadata","created_at","updated_at"]},"ToolsetEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplateEntry"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceEntry"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","name","slug","tools","tool_selection_mode","prompt_templates","tool_urns","resources","resource_urns","created_at","updated_at"]},"ToolsetEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the toolset environment link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"description":"A link between a toolset and an environment","required":["id","toolset_id","environment_id"]},"ToolsetOrigin":{"type":"object","properties":{"registry_specifier":{"type":"string","description":"The globally unique registry specifier this toolset originated from"}},"required":["registry_specifier"]},"ToolsetSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"description":"A lightweight summary of a toolset, containing only the fields needed for org-level listing (e.g. RBAC UI).","required":["id","project_id","organization_id","name","slug","tool_selection_mode","tools","created_at","updated_at"]},"TopServer":{"type":"object","properties":{"server_name":{"type":"string","description":"MCP server name"},"tool_call_count":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Top MCP server by tool call count","required":["server_name","tool_call_count"]},"TopUser":{"type":"object","properties":{"activity_count":{"type":"integer","description":"Number of messages (session mode) or tool calls (tool_call mode)","format":"int64"},"user_id":{"type":"string","description":"User ID (internal or external depending on availability)"},"user_type":{"type":"string","description":"Type of user ID","enum":["internal","external"]}},"description":"Top user by activity","required":["user_id","user_type","activity_count"]},"TriggerDefinition":{"type":"object","properties":{"config_schema":{"type":"string","description":"JSON schema describing the trigger config.","format":"json"},"description":{"type":"string","description":"Description of the trigger definition."},"env_requirements":{"type":"array","items":{"$ref":"#/components/schemas/TriggerEnvRequirement"},"description":"Environment variables required by this trigger definition."},"kind":{"type":"string","description":"The ingress kind for the trigger definition.","enum":["webhook","schedule"]},"slug":{"type":"string","description":"The trigger definition slug."},"title":{"type":"string","description":"The trigger definition title."}},"required":["slug","title","description","kind","config_schema","env_requirements"]},"TriggerEnvRequirement":{"type":"object","properties":{"description":{"type":"string","description":"Description of the variable."},"name":{"type":"string","description":"The environment variable name."},"required":{"type":"boolean","description":"Whether the variable is required."}},"required":["name","required"]},"TriggerInstance":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"definition_slug":{"type":"string","description":"The trigger definition slug."},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"id":{"type":"string","description":"The trigger instance ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"project_id":{"type":"string","description":"The project ID owning the trigger instance.","format":"uuid"},"status":{"type":"string","description":"The trigger instance status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The target kind for the trigger instance."},"target_ref":{"type":"string","description":"The opaque target reference."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"webhook_url":{"type":"string","description":"Webhook URL for webhook-backed triggers."}},"required":["id","project_id","definition_slug","name","target_kind","target_ref","target_display","config","status","created_at","updated_at"]},"TriggerRiskAnalysisRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The policy ID.","format":"uuid"},"limit":{"type":"integer","description":"Cap the backfill at the most recent N unanalyzed messages. Defaults to 100 (the recent-N drain budget). Pass 0 to request a full backfill of every unanalyzed message.","default":100,"format":"int32","minimum":0}},"required":["id"]},"UpdateAssistantForm":{"type":"object","properties":{"id":{"type":"string","description":"The assistant ID.","format":"uuid"},"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Maximum active warm runtimes.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"status":{"type":"string","description":"The assistant status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"warm_ttl_seconds":{"type":"integer","description":"Warm runtime TTL in seconds.","format":"int64"}},"required":["id"]},"UpdateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for updating an environment","required":["slug","entries_to_update","entries_to_remove"]},"UpdateEnvironmentRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"}},"required":["entries_to_update","entries_to_remove"]},"UpdateInviteRoleRequestBody":{"type":"object","properties":{"invitation_id":{"type":"string","description":"WorkOS invitation ID."},"role_id":{"type":"string","description":"Role ID to assign to the invitee."}},"required":["invitation_id","role_id"]},"UpdateMcpEndpointForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to register the endpoint slug under. Omit to move the endpoint to a platform domain.","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP endpoint to update","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128}},"description":"Form for updating an MCP endpoint. This is a full-record replace: the custom_domain_id field omitted from the request becomes null on the stored record. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.","required":["id","mcp_server_id","slug"]},"UpdateMcpServerForm":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to associate with the server","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP server to update","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server. Omit to leave the existing name unchanged; if provided, must be non-empty."},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server to use as the backend","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset to use as the backend","format":"uuid"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication. Omit to disable issuer-gated OAuth.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"Form for updating an MCP server. This is a full-record replace: fields omitted from the request become null on the stored record. Exactly one of remote_mcp_server_id or toolset_id must be provided. Omit name to leave the existing display name unchanged; the slug is recomputed server-side from the resulting name.","required":["id","visibility"]},"UpdateMemberRolesForm":{"type":"object","properties":{"role_ids":{"type":"array","items":{"type":"string"},"description":"The role IDs to assign. Replaces all existing role assignments."},"user_id":{"type":"string","description":"The user ID to update."}},"required":["user_id","role_ids"]},"UpdateOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerUpdateForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"UpdateOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerUpdateForm"}},"required":["oauth_proxy_server"]},"UpdateOrganizationRequestBody":{"type":"object","properties":{"account_type":{"type":"string","description":"New gram_account_type (e.g. free, pro, enterprise)."},"id":{"type":"string","description":"Organization ID."},"whitelisted":{"type":"boolean","description":"New whitelisted flag."}},"required":["id"]},"UpdatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"id":{"type":"string","description":"The id of the package to update","maxLength":50},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["id"]},"UpdatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"UpdatePluginForm":{"type":"object","properties":{"description":{"type":"string","description":"Updated description."},"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Updated display name."},"slug":{"type":"string","description":"Updated slug."}},"required":["id","name","slug"]},"UpdatePluginServerForm":{"type":"object","properties":{"display_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"plugin_id":{"type":"string","format":"uuid"},"policy":{"type":"string","default":"required","enum":["required","optional"]},"sort_order":{"type":"integer","default":0,"format":"int32"}},"required":["id","plugin_id","display_name"]},"UpdatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"id":{"type":"string","description":"The ID of the prompt template to update"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the prompt template. Will be updated via variation"},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["id"]},"UpdatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"UpdateRemoteSessionClientForm":{"type":"object","properties":{"audience":{"type":"string","description":"Replace the upstream OAuth audience sent for this client. Omit to leave unchanged.","pattern":"^[!-~]+$","maxLength":512},"client_secret":{"type":"string","description":"Rotate the client secret. Gram re-encrypts before persisting."},"id":{"type":"string","description":"The remote_session_client id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Replace the explicit upstream OAuth scopes for this client. Omit to leave unchanged."},"token_endpoint_auth_method":{"type":"string","description":"Change how the client authenticates at the issuer's token endpoint.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"Re-pair with a different user_session_issuer.","format":"uuid"}},"description":"Form for updating a remote_session_client. All non-id fields are optional patches.","required":["id"]},"UpdateRemoteSessionIssuerForm":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"grant_types_supported":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"The remote_session_issuer id.","format":"uuid"},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI."},"oidc":{"type":"boolean"},"passthrough":{"type":"boolean"},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"slug":{"type":"string","description":"Rename the slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"description":"Form for updating a remote_session_issuer. All non-id fields are optional patches.","required":["id"]},"UpdateRequestBody":{"type":"object","properties":{"collection_id":{"type":"string","description":"ID of the collection to update","format":"uuid"},"description":{"type":"string","description":"Description of the collection","maxLength":500},"name":{"type":"string","description":"Display name for the collection","minLength":1,"maxLength":100},"visibility":{"type":"string","description":"Visibility of the collection","enum":["public","private"]}},"required":["collection_id"]},"UpdateRiskPolicyRequestBody":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag or block.","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name should be auto-generated."},"enabled":{"type":"boolean","description":"Whether the policy is active."},"id":{"type":"string","description":"The policy ID.","format":"uuid"},"name":{"type":"string","description":"The policy name."},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to detect."},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids to enable in addition to the heuristic baseline (e.g. 'deberta-v3-classifier')."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources to enable."},"user_message":{"type":"string","description":"Optional message shown to end users when this policy blocks an action or surfaces a flagged finding. Send an empty string to clear."}},"required":["id","name"]},"UpdateRoleForm":{"type":"object","properties":{"description":{"type":"string","description":"Updated description."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Updated scope grants."},"id":{"type":"string","description":"The ID of the role to update."},"member_ids":{"type":"array","items":{"type":"string"},"description":"Optional member IDs to additionally assign to this role. Existing assignments are preserved."},"name":{"type":"string","description":"Updated display name."}},"required":["id"]},"UpdateSecurityVariableDisplayNameForm":{"type":"object","properties":{"display_name":{"type":"string","description":"The user-friendly display name. Set to empty string to clear and use the original name.","maxLength":120},"project_slug_input":{"type":"string"},"security_key":{"type":"string","description":"The security scheme key (e.g., 'BearerAuth', 'ApiKeyAuth') from the OpenAPI spec","maxLength":60},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug","security_key","display_name"]},"UpdateServerForm":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/HeaderInput"},"description":"The complete desired set of headers. Omit to leave headers unchanged. Provide an empty array to remove all headers."},"id":{"type":"string","description":"The ID of the remote MCP server to update"},"name":{"type":"string","description":"Optional human-readable name. Pass an empty string to clear the existing name."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"Form for updating a remote MCP server. When headers is provided, it represents the complete desired set of headers — any existing headers not in the list will be removed.","required":["id"]},"UpdateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"New display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"}},"required":["id"]},"UpdateToolsetForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"project_slug_input":{"type":"string"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["slug"]},"UpdateToolsetRequestBody":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"The slug of the MCP to use for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}}},"UpdateTriggerInstanceForm":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"id":{"type":"string","description":"The trigger instance ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"status":{"type":"string","description":"The trigger status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The trigger target kind.","enum":["assistant","noop"]},"target_ref":{"type":"string","description":"The opaque target reference."}},"required":["id"]},"UpdateUserSessionIssuerForm":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"chain | interactive.","enum":["chain","interactive"]},"id":{"type":"string","description":"The user_session_issuer id.","format":"uuid"},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Rename the slug."}},"description":"Form for updating a user_session_issuer. All non-id fields are optional patches.","required":["id"]},"UploadChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadChatAttachmentResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"url":{"type":"string","description":"The URL to serve the chat attachment"}},"required":["asset","url"]},"UploadFunctionsForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadFunctionsResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadImageForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadImageResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadOpenAPIv3Result":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UpsertAllowedOriginForm":{"type":"object","properties":{"origin":{"type":"string","description":"The origin URL to upsert","minLength":1,"maxLength":500},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]}},"required":["origin"]},"UpsertAllowedOriginResult":{"type":"object","properties":{"allowed_origin":{"$ref":"#/components/schemas/AllowedOrigin"}},"required":["allowed_origin"]},"UpsertConfigRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether forwarding should be active."},"endpoint_url":{"type":"string","description":"URL to forward OTEL payloads to."},"headers":{"type":"array","items":{"$ref":"#/components/schemas/OtelForwardingHeaderInput"},"description":"Full set of headers to attach. Replaces any existing headers."}},"required":["endpoint_url","enabled"]},"UpsertGlobalToolVariationForm":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation","enum":["always","never","session"]},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"summary":{"type":"string","description":"The summary of the tool variation"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"}},"required":["src_tool_name","src_tool_urn"]},"UpsertGlobalToolVariationResult":{"type":"object","properties":{"variation":{"$ref":"#/components/schemas/ToolVariation"}},"required":["variation"]},"UpsertRequestBody":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name"},"raw_server_name":{"type":"string","description":"Original server name from hooks"}},"required":["raw_server_name","display_name"]},"UsageTiers":{"type":"object","properties":{"enterprise":{"$ref":"#/components/schemas/TierLimits"},"free":{"$ref":"#/components/schemas/TierLimits"},"pro":{"$ref":"#/components/schemas/TierLimits"}},"required":["free","pro","enterprise"]},"UserSession":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","description":"Terminal session expiry; ceiling on refresh_expires_at.","format":"date-time"},"id":{"type":"string","description":"The user_session id.","format":"uuid"},"jti":{"type":"string","description":"Current access-token JTI; used by the revocation path."},"refresh_expires_at":{"type":"string","description":"Next refresh deadline.","format":"date-time"},"subject_urn":{"type":"string","description":"The session's subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The issuing user_session_issuer id.","format":"uuid"}},"description":"An issued user_session record. refresh_token_hash is never returned.","required":["id","user_session_issuer_id","subject_urn","jti","refresh_expires_at","expires_at","created_at","updated_at"]},"UserSessionClient":{"type":"object","properties":{"client_id":{"type":"string","description":"DCR-issued client_id."},"client_id_issued_at":{"type":"string","format":"date-time"},"client_name":{"type":"string","description":"Display name from the registration request."},"client_secret_expires_at":{"type":"string","description":"Null when the secret does not expire.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_client id.","format":"uuid"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Validated on every /authorize."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The owning user_session_issuer id.","format":"uuid"}},"description":"A user_session_client (DCR'd MCP client). client_secret_hash is never returned.","required":["id","user_session_issuer_id","client_id","client_name","redirect_uris","client_id_issued_at","created_at","updated_at"]},"UserSessionConsent":{"type":"object","properties":{"consented_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_consent id.","format":"uuid"},"remote_set_hash":{"type":"string","description":"SHA-256 of the sorted list of remote_session_issuer ids on the client's owning issuer at consent time."},"subject_urn":{"type":"string","description":"The consenting subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_client_id":{"type":"string","description":"The user_session_client this consent binds to.","format":"uuid"}},"description":"A user_session_consent record. Per-client (not per-issuer) consent.","required":["id","subject_urn","user_session_client_id","remote_set_hash","consented_at","created_at","updated_at"]},"UserSessionIssuer":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"chain | interactive."},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_issuer id.","format":"uuid"},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Project-unique slug."},"updated_at":{"type":"string","format":"date-time"}},"description":"A user_session_issuer record.","required":["id","project_id","slug","authn_challenge_mode","session_duration_hours","created_at","updated_at"]},"UserSummary":{"type":"object","properties":{"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"hook_sources":{"type":"array","items":{"$ref":"#/components/schemas/HookSourceUsage"},"description":"Per-hook-source usage breakdown"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"Per-tool usage breakdown"},"total_chat_requests":{"type":"integer","description":"Total number of chat completion requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"},"user_id":{"type":"string","description":"User identifier (user_id or external_user_id depending on group_by)"}},"description":"Aggregated usage summary for a single user","required":["user_id","first_seen_unix_nano","last_seen_unix_nano","total_chats","total_chat_requests","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","avg_tokens_per_request","total_tool_calls","tool_call_success","tool_call_failure","tools","hook_sources"]},"ValidateKeyOrganization":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"}},"required":["id","name","slug"]},"ValidateKeyProject":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"}},"required":["id","name","slug"]},"ValidateKeyResult":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ValidateKeyOrganization"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ValidateKeyProject"},"description":"The projects accessible with this key"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"}},"required":["organization","projects","scopes"]},"VerifyURLForm":{"type":"object","properties":{"transport_type":{"type":"string","description":"The transport type for the remote MCP server (e.g. streamable-http)"},"url":{"type":"string","description":"The URL of the remote MCP server to probe","format":"uri"}},"description":"Form for probing a remote MCP server URL","required":["url","transport_type"]},"VerifyURLResult":{"type":"object","properties":{"http_status":{"type":"integer","description":"HTTP status code returned by the URL, if any","format":"int64"},"message":{"type":"string","description":"Human-readable summary of the verification outcome"},"verified":{"type":"boolean","description":"Whether the URL responded in a way consistent with a remote MCP server"}},"description":"Outcome of a remote MCP server URL verification","required":["verified","message"]}},"securitySchemes":{"admin_auth_header_Authorization":{"type":"apiKey","description":"Admin session auth for admin endpoints. Cookie-only credential; session is validated against Google on every request.","name":"Authorization","in":"header"},"apikey_header_Authorization":{"type":"apiKey","description":"key based auth.","name":"Authorization","in":"header"},"apikey_header_Gram-Key":{"type":"apiKey","description":"key based auth.","name":"Gram-Key","in":"header"},"chat_sessions_token_header_Gram-Chat-Session":{"type":"http","description":"Gram Chat Sessions token based auth.","scheme":"bearer"},"function_token_header_Authorization":{"type":"http","description":"Gram Functions token based auth.","scheme":"bearer"},"project_slug_header_Gram-Project":{"type":"apiKey","description":"project slug header auth.","name":"Gram-Project","in":"header"},"session_header_Gram-Session":{"type":"apiKey","description":"Session based auth. By cookie or header.","name":"Gram-Session","in":"header"}}},"tags":[{"name":"access","description":"Manage roles, team member access control, and authorization challenge events."},{"name":"admin","description":"Operations supporting admin tasks, protected by Google workspace auth."},{"name":"assets","description":"Manages assets used by Gram projects."},{"name":"assistantMemories","description":"Manage assistant memory records."},{"name":"assistants","description":"Manage assistants and their runtime configuration."},{"name":"auditlogs","description":"Manages audit logs in Gram."},{"name":"auth","description":"Managed auth for gram producers and dashboard."},{"name":"chat","description":"Managed chats for gram AI consumers."},{"name":"chatSessions","description":"Manages chat session tokens for client-side authentication"},{"name":"deployments","description":"Manages deployments of tools from upstream sources."},{"name":"domains","description":"Manage custom domains for gram."},{"name":"environments","description":"Managing toolset environments."},{"name":"mcpRegistries","description":"External MCP registry operations"},{"name":"collections","description":"MCP collection operations"},{"name":"functions","description":"Endpoints for working with functions."},{"name":"hooksServerNames","description":"Manages display name overrides for hooks servers."},{"name":"hooks","description":"Receives hook events from coding assistants for tool usage observability."},{"name":"instances","description":"Consumer APIs for interacting with all relevant data for an instance of a toolset and environment."},{"name":"integrations","description":"Explore third-party tools in Gram."},{"name":"keys","description":"Managing system api keys."},{"name":"mcpEndpoints","description":"Managing MCP endpoints, the url-friendly slug identifiers that address MCP servers."},{"name":"mcpMetadata","description":"Manages metadata for the MCP install page shown to users."},{"name":"mcpServers","description":"Managing MCP servers, which configure authentication, environment, and backend selection for an MCP server."},{"name":"organizations","description":"Organization membership, invitations, and directory."},{"name":"otelForwarding","description":"Manage per-organization forwarding of inbound OTEL hook payloads to a customer-owned endpoint."},{"name":"packages","description":"Manages packages in Gram."},{"name":"plugins","description":"Manage distributable plugin bundles of MCP servers and hooks."},{"name":"features","description":"Manage product level feature controls."},{"name":"projects","description":"Manages projects in Gram."},{"name":"remoteMcp","description":"Managing remote MCP servers."},{"name":"remoteSessionClients","description":"Manage remote_session_client records — credentials Gram uses when acting as an OAuth client of a remote_session_issuer. client_secret_encrypted is never returned."},{"name":"remoteSessionIssuers","description":"Manage remote_session_issuer records — upstream Authorization Server identity records that Gram talks to as an OAuth client."},{"name":"remoteSessions","description":"Operator visibility into remote_sessions Gram is holding on a principal's behalf. Read + revoke; sessions are written by /mcp/{slug}/remote_login_callback and the silent-refresh path. access_token_encrypted and refresh_token_encrypted are never returned."},{"name":"resources","description":"Dashboard API for interacting with resources."},{"name":"risk","description":"Manage risk analysis policies and view scan results."},{"name":"slack","description":"Auth and interactions for the Gram Slack App."},{"name":"telemetry","description":"Fetch telemetry data for tools in Gram."},{"name":"templates","description":"Manages re-usable prompt templates and higher-order tools for a project."},{"name":"tools","description":"Dashboard API for interacting with tools."},{"name":"toolsets","description":"Managed toolsets for gram AI consumers."},{"name":"triggers","description":"Manage project trigger instances and static trigger definitions."},{"name":"usage","description":"Read usage for gram."},{"name":"userSessionClients","description":"Operator visibility into DCR'd MCP clients (user_session_clients). Read + revoke; registrations are written by /mcp/{slug}/register."},{"name":"userSessionConsents","description":"Operator visibility into user_session_consents — persistent consent records per (subject, user_session_client). List + revoke."},{"name":"userSessionIssuers","description":"Manage user_session_issuer records — Gram-side authorization-server configuration that issues user sessions for an MCP server."},{"name":"userSessions","description":"Operator visibility into issued user_sessions. List + revoke; sessions are written by /mcp/{slug}/token."},{"name":"variations","description":"Manage variations of tools."},{"name":"external","description":"Endpoints for external services to interact with gram."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Gram API Description","description":"Gram is the tools platform for AI agents","version":"0.0.1"},"servers":[{"url":"https://app.getgram.ai"}],"paths":{"/admin/auth.callback":{"get":{"tags":["admin"],"summary":"callback admin","operationId":"admin#callback","parameters":[{"name":"code","in":"query","description":"The authorization code returned by the provider on success","allowEmptyValue":true,"schema":{"type":"string","description":"The authorization code returned by the provider on success"}},{"name":"state","in":"query","description":"The state parameter returned, which should match the one generated in the login step","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The state parameter returned, which should match the one generated in the login step"}},{"name":"error","in":"query","description":"OAuth error code returned by the provider (e.g. login_required for prompt=none failures)","allowEmptyValue":true,"schema":{"type":"string","description":"OAuth error code returned by the provider (e.g. login_required for prompt=none failures)"}},{"name":"error_description","in":"query","description":"Human-readable OAuth error description","allowEmptyValue":true,"schema":{"type":"string","description":"Human-readable OAuth error description"}},{"name":"gram_admin_login_state","in":"cookie","description":"The state cookie value for CSRF sanity checking against the state parameter","allowEmptyValue":true,"schema":{"type":"string","description":"The state cookie value for CSRF sanity checking against the state parameter"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect the client to after processing the callback","schema":{"type":"string","description":"The URL to redirect the client to after processing the callback"}},"Set-Cookie":{"description":"Admin session cookie","schema":{"type":"string","description":"Admin session cookie"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/auth.login":{"get":{"tags":["admin"],"summary":"login admin","operationId":"admin#login","parameters":[{"name":"return_to","in":"query","description":"Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted."}},{"name":"prompt","in":"query","description":"Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication."}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect the user to for Google authentication","schema":{"type":"string","description":"The URL to redirect the user to for Google authentication"}},"Set-Cookie":{"description":"CSRF state cookie for sanity-checking the callback","schema":{"type":"string","description":"CSRF state cookie for sanity-checking the callback"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/auth.logout":{"post":{"tags":["admin"],"summary":"logout admin","operationId":"admin#logout","parameters":[{"name":"gram_admin","in":"cookie","description":"The session cookie value to clear for logging out","allowEmptyValue":true,"schema":{"type":"string","description":"The session cookie value to clear for logging out"}}],"responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/organization.get":{"get":{"tags":["admin"],"summary":"getOrganization admin","description":"Returns full admin details for a single organization by id or slug.","operationId":"adminGetOrganization","parameters":[{"name":"id_or_slug","in":"query","description":"Organization ID or slug.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID or slug."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganization"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.members":{"get":{"tags":["admin"],"summary":"listOrganizationMembers admin","description":"Lists members of an organization (admin view, no auth scoping).","operationId":"adminListOrganizationMembers","parameters":[{"name":"organization_id","in":"query","description":"Organization ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationMembersResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.projects":{"get":{"tags":["admin"],"summary":"listOrganizationProjects admin","description":"Lists projects belonging to an organization (admin view, no auth scoping).","operationId":"adminListOrganizationProjects","parameters":[{"name":"organization_id","in":"query","description":"Organization ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Organization ID."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationProjectsResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organization.update":{"post":{"tags":["admin"],"summary":"updateOrganization admin","description":"Updates admin-managed fields on an organization. At least one of account_type or whitelisted must be supplied.","operationId":"adminUpdateOrganization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganization"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/admin/organizations.list":{"get":{"description":"Lists organizations for admin operations with optional search and filters.","operationId":"adminListOrganizations","parameters":[{"allowEmptyValue":true,"description":"Search term applied to name and slug (case-insensitive substring).","in":"query","name":"q","schema":{"description":"Search term applied to name and slug (case-insensitive substring).","type":"string"}},{"allowEmptyValue":true,"description":"Filter by gram_account_type (e.g. free, pro, enterprise).","in":"query","name":"account_type","schema":{"description":"Filter by gram_account_type (e.g. free, pro, enterprise).","type":"string"}},{"allowEmptyValue":true,"description":"Include organizations with disabled_at set. Defaults to false.","in":"query","name":"include_disabled","schema":{"description":"Include organizations with disabled_at set. Defaults to false.","type":"boolean"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListOrganizationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"admin_auth_header_Authorization":[]}],"summary":"listOrganizations admin","tags":["admin"],"x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"}}},"/admin/project.get":{"get":{"tags":["admin"],"summary":"getProject admin","description":"Returns full admin details for a project by id or slug, including aggregated counts of child resources.","operationId":"adminGetProject","parameters":[{"name":"id_or_slug","in":"query","description":"Project ID or slug.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Project ID or slug."}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProjectDetail"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"admin_auth_header_Authorization":[]}]}},"/rpc/access.createRole":{"post":{"description":"Create a new custom role.","operationId":"createRole","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createRole access","tags":["access"],"x-speakeasy-name-override":"createRole","x-speakeasy-react-hook":{"name":"CreateRole"}}},"/rpc/access.deleteRole":{"delete":{"description":"Delete a custom role (system roles cannot be deleted).","operationId":"deleteRole","parameters":[{"allowEmptyValue":true,"description":"The ID of the role to delete.","in":"query","name":"id","required":true,"schema":{"description":"The ID of the role to delete.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteRole access","tags":["access"],"x-speakeasy-name-override":"deleteRole","x-speakeasy-react-hook":{"name":"DeleteRole"}}},"/rpc/access.disableRBAC":{"post":{"description":"Disable RBAC enforcement for the current organization.","operationId":"disableRBAC","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"disableRBAC access","tags":["access"],"x-speakeasy-name-override":"disableRBAC","x-speakeasy-react-hook":{"name":"DisableRBAC"}}},"/rpc/access.enableRBAC":{"post":{"description":"Enable RBAC for the current organization. Seeds default grants for system roles.","operationId":"enableRBAC","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"enableRBAC access","tags":["access"],"x-speakeasy-name-override":"enableRBAC","x-speakeasy-react-hook":{"name":"EnableRBAC"}}},"/rpc/access.getRBACStatus":{"get":{"description":"Returns whether RBAC is currently enabled for the current organization.","operationId":"getRBACStatus","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RBACStatus"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getRBACStatus access","tags":["access"],"x-speakeasy-name-override":"getRBACStatus","x-speakeasy-react-hook":{"name":"RBACStatus"}}},"/rpc/access.getRole":{"get":{"description":"Get a role by ID.","operationId":"getRole","parameters":[{"allowEmptyValue":true,"description":"The ID of the role.","in":"query","name":"id","required":true,"schema":{"description":"The ID of the role.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getRole access","tags":["access"],"x-speakeasy-name-override":"getRole","x-speakeasy-react-hook":{"name":"Role"}}},"/rpc/access.listChallengeBuckets":{"get":{"description":"List authz challenges grouped into time-based burst buckets. Consecutive challenges with the same dimensions within a 10-minute window are collapsed into a single bucket.","operationId":"listChallengeBuckets","parameters":[{"allowEmptyValue":true,"description":"Filter by outcome.","in":"query","name":"outcome","schema":{"description":"Filter by outcome.","enum":["allow","deny"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter by principal URN.","in":"query","name":"principal_urn","schema":{"description":"Filter by principal URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by scope.","in":"query","name":"scope","schema":{"description":"Filter by scope.","type":"string"}},{"allowEmptyValue":true,"description":"Filter to a specific project.","in":"query","name":"project_id","schema":{"description":"Filter to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution state. True = only resolved, false = only unresolved.","in":"query","name":"resolved","schema":{"description":"Filter by resolution state. True = only resolved, false = only unresolved.","type":"boolean"}},{"allowEmptyValue":true,"description":"Maximum number of buckets to return.","in":"query","name":"limit","schema":{"default":50,"description":"Maximum number of buckets to return.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Number of buckets to skip.","in":"query","name":"offset","schema":{"default":0,"description":"Number of buckets to skip.","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChallengeBucketsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listChallengeBuckets access","tags":["access"],"x-speakeasy-name-override":"listChallengeBuckets","x-speakeasy-react-hook":{"name":"ChallengeBuckets"}}},"/rpc/access.listChallenges":{"get":{"description":"List authz challenge events from ClickHouse, enriched with resolution state from PostgreSQL.","operationId":"listChallenges","parameters":[{"allowEmptyValue":true,"description":"Filter by outcome.","in":"query","name":"outcome","schema":{"description":"Filter by outcome.","enum":["allow","deny"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter by principal URN.","in":"query","name":"principal_urn","schema":{"description":"Filter by principal URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by scope.","in":"query","name":"scope","schema":{"description":"Filter by scope.","type":"string"}},{"allowEmptyValue":true,"description":"Filter to a specific project.","in":"query","name":"project_id","schema":{"description":"Filter to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution state. True = only resolved, false = only unresolved.","in":"query","name":"resolved","schema":{"description":"Filter by resolution state. True = only resolved, false = only unresolved.","type":"boolean"}},{"allowEmptyValue":true,"description":"Fetch specific challenges by ID. When set, other filters and pagination are ignored.","in":"query","name":"ids","schema":{"description":"Fetch specific challenges by ID. When set, other filters and pagination are ignored.","items":{"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Maximum number of results to return.","in":"query","name":"limit","schema":{"default":50,"description":"Maximum number of results to return.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Number of results to skip.","in":"query","name":"offset","schema":{"default":0,"description":"Number of results to skip.","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChallengesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listChallenges access","tags":["access"],"x-speakeasy-name-override":"listChallenges","x-speakeasy-react-hook":{"name":"Challenges"}}},"/rpc/access.listGrants":{"get":{"description":"List the current user's effective grants, including inherited role grants.","operationId":"listGrants","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserGrantsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listGrants access","tags":["access"],"x-speakeasy-name-override":"listGrants","x-speakeasy-react-hook":{"name":"Grants"}}},"/rpc/access.listMembers":{"get":{"description":"List all team members with their role assignments.","operationId":"listMembers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listMembers access","tags":["access"],"x-speakeasy-name-override":"listMembers","x-speakeasy-react-hook":{"name":"Members"}}},"/rpc/access.listRoles":{"get":{"description":"List all roles for the current organization.","operationId":"listRoles","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRolesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listRoles access","tags":["access"],"x-speakeasy-name-override":"listRoles","x-speakeasy-react-hook":{"name":"Roles"}}},"/rpc/access.listScopes":{"get":{"description":"List all available scopes and their resource types.","operationId":"listScopes","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScopesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listScopes access","tags":["access"],"x-speakeasy-name-override":"listScopes","x-speakeasy-react-hook":{"name":"ListScopes"}}},"/rpc/access.resolveChallenge":{"post":{"description":"Record resolutions for one or more denied authz challenges. The caller is responsible for assigning the role first.","operationId":"resolveChallenge","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveChallengeForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveChallengesResult"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"resolveChallenge access","tags":["access"],"x-speakeasy-name-override":"resolveChallenge","x-speakeasy-react-hook":{"name":"ResolveChallenge"}}},"/rpc/access.updateMemberRoles":{"put":{"description":"Update a team member's role assignments.","operationId":"updateMemberRoles","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRolesForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessMember"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"updateMemberRoles access","tags":["access"],"x-speakeasy-name-override":"updateMemberRoles","x-speakeasy-react-hook":{"name":"UpdateMemberRoles"}}},"/rpc/access.updateRole":{"put":{"description":"Update an existing custom role.","operationId":"updateRole","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"updateRole access","tags":["access"],"x-speakeasy-name-override":"updateRole","x-speakeasy-react-hook":{"name":"UpdateRole"}}},"/rpc/assets.createSignedChatAttachmentURL":{"post":{"description":"Create a time-limited signed URL to access a chat attachment without authentication.","operationId":"createSignedChatAttachmentURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"createSignedChatAttachmentURL assets","tags":["assets"],"x-speakeasy-name-override":"createSignedChatAttachmentURL","x-speakeasy-react-hook":{"name":"CreateSignedChatAttachmentURL"}}},"/rpc/assets.fetchOpenAPIv3FromURL":{"post":{"description":"Fetch an OpenAPI v3 document from a URL and upload it to Gram.","operationId":"fetchOpenAPIv3FromURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchOpenAPIv3FromURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"fetchOpenAPIv3FromURL assets","tags":["assets"],"x-speakeasy-name-override":"fetchOpenAPIv3FromURL","x-speakeasy-react-hook":{"name":"FetchOpenAPIv3FromURL"}}},"/rpc/assets.list":{"get":{"description":"List all assets for a project.","operationId":"listAssets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssets assets","tags":["assets"],"x-speakeasy-name-override":"listAssets","x-speakeasy-react-hook":{"name":"ListAssets"}}},"/rpc/assets.serveChatAttachment":{"get":{"description":"Serve a chat attachment from Gram.","operationId":"serveChatAttachment","parameters":[{"allowEmptyValue":true,"description":"The ID of the attachment to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the attachment to serve","type":"string"}},{"allowEmptyValue":true,"description":"The project ID that the attachment belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The project ID that the attachment belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"serveChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachment","x-speakeasy-react-hook":{"name":"serveChatAttachment"}}},"/rpc/assets.serveChatAttachmentSigned":{"get":{"description":"Serve a chat attachment using a signed URL token.","operationId":"serveChatAttachmentSigned","parameters":[{"allowEmptyValue":true,"description":"The signed JWT token","in":"query","name":"token","required":true,"schema":{"description":"The signed JWT token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveChatAttachmentSigned assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachmentSigned","x-speakeasy-react-hook":{"name":"serveChatAttachmentSigned"}}},"/rpc/assets.serveFunction":{"get":{"description":"Serve a Gram Functions asset from Gram.","operationId":"serveFunction","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveFunction assets","tags":["assets"],"x-speakeasy-name-override":"serveFunction","x-speakeasy-react-hook":{"name":"serveFunction"}}},"/rpc/assets.serveImage":{"get":{"description":"Serve an image from Gram.","operationId":"serveImage","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveImage assets","tags":["assets"],"x-speakeasy-name-override":"serveImage","x-speakeasy-react-hook":{"name":"serveImage"}}},"/rpc/assets.serveOpenAPIv3":{"get":{"description":"Serve an OpenAPIv3 asset from Gram.","operationId":"serveOpenAPIv3","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"serveOpenAPIv3","x-speakeasy-react-hook":{"name":"serveOpenAPIv3"}}},"/rpc/assets.uploadChatAttachment":{"post":{"description":"Upload a chat attachment to Gram.","operationId":"uploadChatAttachment","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"uploadChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"uploadChatAttachment","x-speakeasy-react-hook":{"name":"UploadChatAttachment"}}},"/rpc/assets.uploadFunctions":{"post":{"description":"Upload functions to Gram.","operationId":"uploadFunctions","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFunctionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadFunctions assets","tags":["assets"],"x-speakeasy-name-override":"uploadFunctions","x-speakeasy-react-hook":{"name":"UploadFunctions"}}},"/rpc/assets.uploadImage":{"post":{"description":"Upload an image to Gram.","operationId":"uploadImage","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadImage assets","tags":["assets"],"x-speakeasy-name-override":"uploadImage","x-speakeasy-react-hook":{"name":"UploadImage"}}},"/rpc/assets.uploadOpenAPIv3":{"post":{"description":"Upload an OpenAPI v3 document to Gram.","operationId":"uploadOpenAPIv3Asset","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"uploadOpenAPIv3","x-speakeasy-react-hook":{"name":"UploadOpenAPIv3"}}},"/rpc/assistantMemories.delete":{"delete":{"description":"Delete an assistant memory by ID.","operationId":"deleteAssistantMemory","parameters":[{"allowEmptyValue":true,"description":"The assistant memory ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant memory ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteAssistantMemory assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"delete"}},"/rpc/assistantMemories.get":{"get":{"description":"Get an assistant memory by ID.","operationId":"getAssistantMemory","parameters":[{"allowEmptyValue":true,"description":"The assistant memory ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant memory ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantMemory"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getAssistantMemory assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetAssistantMemory"}}},"/rpc/assistantMemories.list":{"get":{"description":"List assistant memories for an assistant.","operationId":"listAssistantMemories","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"assistant_id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional tags to filter memories by.","in":"query","name":"tags","schema":{"description":"Optional tags to filter memories by.","items":{"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Whether to include soft-deleted memories.","in":"query","name":"include_deleted","schema":{"default":false,"description":"Whether to include soft-deleted memories.","type":"boolean"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from.","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from.","type":"string"}},{"allowEmptyValue":true,"description":"The number of memories to return per page.","in":"query","name":"limit","schema":{"default":50,"description":"The number of memories to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssistantMemoriesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssistantMemories assistantMemories","tags":["assistantMemories"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"ListAssistantMemories"}}},"/rpc/assistants.create":{"post":{"description":"Create an assistant.","operationId":"createAssistant","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssistantForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"create"}},"/rpc/assistants.delete":{"delete":{"description":"Delete an assistant.","operationId":"deleteAssistant","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"delete"}},"/rpc/assistants.get":{"get":{"description":"Get an assistant by ID.","operationId":"getAssistant","parameters":[{"allowEmptyValue":true,"description":"The assistant ID.","in":"query","name":"id","required":true,"schema":{"description":"The assistant ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"get"}},"/rpc/assistants.list":{"get":{"description":"List assistants for the current project.","operationId":"listAssistants","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssistantsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssistants assistants","tags":["assistants"],"x-speakeasy-name-override":"list"}},"/rpc/assistants.update":{"post":{"description":"Update an assistant.","operationId":"updateAssistant","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateAssistant assistants","tags":["assistants"],"x-speakeasy-name-override":"update"}},"/rpc/auditlogs.list":{"get":{"description":"List audit logs across organization and projects.","operationId":"listAuditLogs","parameters":[{"allowEmptyValue":true,"description":"The cursor for paginating through audit logs.","in":"query","name":"cursor","schema":{"description":"The cursor for paginating through audit logs.","type":"string"}},{"allowEmptyValue":true,"description":"Project slug to filter audit logs to a specific project.","in":"query","name":"project_slug","schema":{"description":"Project slug to filter audit logs to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"Actor ID to filter audit logs to a specific actor.","in":"query","name":"actor_id","schema":{"description":"Actor ID to filter audit logs to a specific actor.","type":"string"}},{"allowEmptyValue":true,"description":"Action to filter audit logs to a specific action.","in":"query","name":"action","schema":{"description":"Action to filter audit logs to a specific action.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"list auditlogs","tags":["auditlogs"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"AuditLogs"}}},"/rpc/auditlogs.listFacets":{"get":{"description":"List available audit log facet values across organization and projects.","operationId":"listAuditLogFacets","parameters":[{"allowEmptyValue":true,"description":"Project slug to filter facet values to a specific project.","in":"query","name":"project_slug","schema":{"description":"Project slug to filter facet values to a specific project.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogFacetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listFacets auditlogs","tags":["auditlogs"],"x-speakeasy-name-override":"listFacets","x-speakeasy-react-hook":{"name":"AuditLogFacets"}}},"/rpc/auth.callback":{"get":{"description":"Handles the authentication callback.","operationId":"authCallback","parameters":[{"allowEmptyValue":true,"description":"The auth code for authentication from the speakeasy system","in":"query","name":"code","required":true,"schema":{"description":"The auth code for authentication from the speakeasy system","type":"string"}},{"allowEmptyValue":true,"description":"The opaque state string optionally provided during initialization.","in":"query","name":"state","schema":{"description":"The opaque state string optionally provided during initialization.","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback auth","tags":["auth"],"x-speakeasy-name-override":"callback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.info":{"get":{"description":"Provides information about the current authentication status.","operationId":"sessionInfo","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponseBody"}}},"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"info auth","tags":["auth"],"x-speakeasy-name-override":"info","x-speakeasy-react-hook":{"name":"SessionInfo"}}},"/rpc/auth.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"authLogin","parameters":[{"allowEmptyValue":true,"description":"Optional URL to redirect to after successful authentication","in":"query","name":"redirect","schema":{"description":"Optional URL to redirect to after successful authentication","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"login auth","tags":["auth"],"x-speakeasy-name-override":"login","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.logout":{"post":{"description":"Logs out the current user by clearing their session.","operationId":"logout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Empty string to clear the session","schema":{"description":"Empty string to clear the session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"logout auth","tags":["auth"],"x-speakeasy-name-override":"logout","x-speakeasy-react-hook":{"name":"Logout"}}},"/rpc/auth.register":{"post":{"description":"Register a new org for a user with their session information.","operationId":"register","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"register auth","tags":["auth"],"x-speakeasy-name-override":"register","x-speakeasy-react-hook":{"name":"Register"}}},"/rpc/auth.switchScopes":{"post":{"description":"Switches the authentication scope to a different organization.","operationId":"switchAuthScopes","parameters":[{"allowEmptyValue":true,"description":"The organization slug to switch scopes","in":"query","name":"organization_id","schema":{"description":"The organization slug to switch scopes","type":"string"}},{"allowEmptyValue":true,"description":"The project id to switch scopes too","in":"query","name":"project_id","schema":{"description":"The project id to switch scopes too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"switchScopes auth","tags":["auth"],"x-speakeasy-name-override":"switchScopes","x-speakeasy-react-hook":{"name":"SwitchScopes"}}},"/rpc/chat.creditUsage":{"get":{"description":"Get the total number of chat credits and usage for the current billing period","operationId":"creditUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditUsageResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"creditUsage chat","tags":["chat"],"x-speakeasy-name-override":"creditUsage","x-speakeasy-react-hook":{"name":"GetCreditUsage"}}},"/rpc/chat.delete":{"delete":{"description":"Soft-delete a chat by its ID","operationId":"deleteChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteChat chat","tags":["chat"],"x-speakeasy-name-override":"delete"}},"/rpc/chat.generateTitle":{"post":{"description":"Generate a title for a chat based on its messages","operationId":"generateTitle","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServeImageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"generateTitle chat","tags":["chat"],"x-speakeasy-name-override":"generateTitle"}},"/rpc/chat.list":{"get":{"description":"List all chats for a project","operationId":"listChats","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChats chat","tags":["chat"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListChats"}}},"/rpc/chat.listChatsWithResolutions":{"get":{"description":"List all chats for a project with their resolutions","operationId":"listChatsWithResolutions","parameters":[{"allowEmptyValue":true,"description":"Search query (searches chat ID, user ID, and title)","in":"query","name":"search","schema":{"description":"Search query (searches chat ID, user ID, and title)","type":"string"}},{"allowEmptyValue":true,"description":"Filter by external user ID","in":"query","name":"external_user_id","schema":{"description":"Filter by external user ID","type":"string"}},{"allowEmptyValue":true,"description":"Filter to chats produced by this assistant","in":"query","name":"assistant_id","schema":{"description":"Filter to chats produced by this assistant","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution status","in":"query","name":"resolution_status","schema":{"description":"Filter by resolution status","type":"string"}},{"allowEmptyValue":true,"description":"Filter by whether chat has risk findings: 'true', 'false', or empty for no filter.","in":"query","name":"has_risk","schema":{"description":"Filter by whether chat has risk findings: 'true', 'false', or empty for no filter.","enum":["","true","false"],"type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created after this timestamp (ISO 8601)","in":"query","name":"from","schema":{"description":"Filter chats created after this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created before this timestamp (ISO 8601)","in":"query","name":"to","schema":{"description":"Filter chats created before this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Number of results per page","in":"query","name":"limit","schema":{"default":50,"description":"Number of results per page","format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"description":"Pagination offset","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"created_at","description":"Field to sort by","enum":["created_at","num_messages","score"],"type":"string"}},{"allowEmptyValue":true,"description":"Sort order","in":"query","name":"sort_order","schema":{"default":"desc","description":"Sort order","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsWithResolutionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChatsWithResolutions chat","tags":["chat"],"x-speakeasy-name-override":"listChatsWithResolutions","x-speakeasy-react-hook":{"name":"ListChatsWithResolutions","type":"query"}}},"/rpc/chat.load":{"get":{"description":"Load a chat by its ID","operationId":"loadChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"loadChat chat","tags":["chat"],"x-speakeasy-name-override":"load","x-speakeasy-react-hook":{"name":"LoadChat"}}},"/rpc/chat.submitFeedback":{"post":{"description":"Submit user feedback for a chat (success/failure)","operationId":"submitFeedback","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"submitFeedback chat","tags":["chat"],"x-speakeasy-name-override":"submitFeedback"}},"/rpc/chatSessions.create":{"post":{"description":"Creates a new chat session token","operationId":"createChatSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"create chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"create"}},"/rpc/chatSessions.revoke":{"delete":{"description":"Revokes an existing chat session token","operationId":"revokeChatSession","parameters":[{"allowEmptyValue":true,"description":"The chat session token to revoke","in":"query","name":"token","required":true,"schema":{"description":"The chat session token to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revoke chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"revoke"}},"/rpc/collections.attachServer":{"post":{"description":"Attach a server (toolset) to a collection","operationId":"attachServerToCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"attachServer collections","tags":["collections"],"x-speakeasy-name-override":"attachServer"}},"/rpc/collections.create":{"post":{"description":"Create an MCP collection within the organization","operationId":"createCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody2"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"create collections","tags":["collections"],"x-speakeasy-name-override":"create"}},"/rpc/collections.delete":{"delete":{"description":"Delete an MCP collection","operationId":"deleteCollection","parameters":[{"allowEmptyValue":true,"description":"ID of the collection to delete","in":"query","name":"collection_id","required":true,"schema":{"description":"ID of the collection to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"delete collections","tags":["collections"],"x-speakeasy-name-override":"delete"}},"/rpc/collections.detachServer":{"post":{"description":"Detach a server (toolset) from a collection","operationId":"detachServerFromCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachServerRequestBody"}}},"required":true},"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"detachServer collections","tags":["collections"],"x-speakeasy-name-override":"detachServer"}},"/rpc/collections.list":{"get":{"description":"List MCP collections in the organization","operationId":"listCollections","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"list collections","tags":["collections"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListCollections"}}},"/rpc/collections.listServers":{"get":{"description":"List published MCP servers from a collection","operationId":"listCollectionServers","parameters":[{"allowEmptyValue":true,"description":"Slug of the collection to serve","in":"query","name":"collection_slug","required":true,"schema":{"description":"Slug of the collection to serve","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListServersResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"listServers collections","tags":["collections"],"x-speakeasy-name-override":"listServers"}},"/rpc/collections.update":{"post":{"description":"Update an MCP collection","operationId":"updateCollection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCollection"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"update collections","tags":["collections"],"x-speakeasy-name-override":"update"}},"/rpc/deployments.active":{"get":{"description":"Get the active deployment for a project.","operationId":"getActiveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetActiveDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getActiveDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"active","x-speakeasy-react-hook":{"name":"ActiveDeployment"}}},"/rpc/deployments.create":{"post":{"description":"Create a deployment to load tool definitions.","operationId":"createDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","in":"header","name":"Idempotency-Key","required":true,"schema":{"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateDeployment"}}},"/rpc/deployments.evolve":{"post":{"description":"Create a new deployment with additional or updated tool sources.","operationId":"evolveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"evolve deployments","tags":["deployments"],"x-speakeasy-name-override":"evolveDeployment","x-speakeasy-react-hook":{"name":"EvolveDeployment"}}},"/rpc/deployments.get":{"get":{"description":"Get a deployment by its ID.","operationId":"getDeployment","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"getById","x-speakeasy-react-hook":{"name":"Deployment"}}},"/rpc/deployments.latest":{"get":{"description":"Get the latest deployment for a project.","operationId":"getLatestDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getLatestDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"latest","x-speakeasy-react-hook":{"name":"LatestDeployment"}}},"/rpc/deployments.list":{"get":{"description":"List all deployments in descending order of creation.","operationId":"listDeployments","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listDeployments deployments","tags":["deployments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListDeployments"}}},"/rpc/deployments.logs":{"get":{"description":"Get logs for a deployment.","operationId":"getDeploymentLogs","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"deployment_id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeploymentLogs deployments","tags":["deployments"],"x-speakeasy-name-override":"logs","x-speakeasy-react-hook":{"name":"DeploymentLogs"}}},"/rpc/deployments.redeploy":{"post":{"description":"Redeploys an existing deployment.","operationId":"redeployDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"redeploy deployments","tags":["deployments"],"x-speakeasy-name-override":"redeployDeployment","x-speakeasy-react-hook":{"name":"RedeployDeployment"}}},"/rpc/domain.delete":{"delete":{"description":"Delete a custom domain","operationId":"deleteDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"deleteDomain domains","tags":["domains"],"x-speakeasy-name-override":"deleteDomain","x-speakeasy-react-hook":{"name":"deleteDomain"}}},"/rpc/domain.get":{"get":{"description":"Get the custom domain for an organization","operationId":"getDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getDomain domains","tags":["domains"],"x-speakeasy-name-override":"getDomain","x-speakeasy-react-hook":{"name":"getDomain"}}},"/rpc/domain.listMcpEndpoints":{"get":{"description":"List the MCP endpoints registered under the organization's custom domain across every project. Returns enriched rows that include the parent MCP server and project so callers can preview what a custom-domain deletion would cascade through.","operationId":"listCustomDomainMcpEndpoints","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCustomDomainMcpEndpointsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listMcpEndpoints domains","tags":["domains"],"x-speakeasy-name-override":"listMcpEndpoints","x-speakeasy-react-hook":{"name":"CustomDomainMcpEndpoints"}}},"/rpc/domain.register":{"post":{"description":"Create a custom domain for an organization","operationId":"registerDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createDomain domains","tags":["domains"],"x-speakeasy-name-override":"registerDomain","x-speakeasy-react-hook":{"name":"registerDomain"}}},"/rpc/environments.clone":{"post":{"description":"Clone an environment into a new one. Either copies only the variable names with empty placeholder values, or copies the encrypted values verbatim. Encrypted secret values are never decrypted by the application during the clone operation.","operationId":"cloneEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the source environment to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"cloneEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"clone","x-speakeasy-react-hook":{"name":"CloneEnvironment"}}},"/rpc/environments.create":{"post":{"description":"Create a new environment","operationId":"createEnvironment","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateEnvironment"}}},"/rpc/environments.delete":{"delete":{"description":"Delete an environment","operationId":"deleteEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to delete","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteEnvironment"}}},"/rpc/environments.deleteSourceLink":{"delete":{"description":"Delete a link between a source and an environment","operationId":"deleteSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteSourceLink","x-speakeasy-react-hook":{"name":"DeleteSourceEnvironmentLink"}}},"/rpc/environments.deleteToolsetLink":{"delete":{"description":"Delete a link between a toolset and an environment","operationId":"deleteToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteToolsetLink","x-speakeasy-react-hook":{"name":"DeleteToolsetEnvironmentLink"}}},"/rpc/environments.getSourceEnvironment":{"get":{"description":"Get the environment linked to a source","operationId":"getSourceEnvironment","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSourceEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getBySource","x-speakeasy-react-hook":{"name":"GetSourceEnvironment"}}},"/rpc/environments.getToolsetEnvironment":{"get":{"description":"Get the environment linked to a toolset","operationId":"getToolsetEnvironment","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getToolsetEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getByToolset","x-speakeasy-react-hook":{"name":"GetToolsetEnvironment"}}},"/rpc/environments.list":{"get":{"description":"List all environments for an organization","operationId":"listEnvironments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvironmentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listEnvironments environments","tags":["environments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListEnvironments"}}},"/rpc/environments.setSourceLink":{"put":{"description":"Set (upsert) a link between a source and an environment","operationId":"setSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSourceEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setSourceLink","x-speakeasy-react-hook":{"name":"SetSourceEnvironmentLink"}}},"/rpc/environments.setToolsetLink":{"put":{"description":"Set (upsert) a link between a toolset and an environment","operationId":"setToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetToolsetEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsetEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setToolsetLink","x-speakeasy-react-hook":{"name":"SetToolsetEnvironmentLink"}}},"/rpc/environments.update":{"post":{"description":"Update an environment","operationId":"updateEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateEnvironment"}}},"/rpc/external.receiveWorkOSWebhook":{"post":{"description":"Receive and enqueue a WorkOS webhook event.","operationId":"receiveWorkOSWebhook","parameters":[{"allowEmptyValue":true,"description":"WorkOS webhook signature header","in":"header","name":"WorkOS-Signature","schema":{"description":"WorkOS webhook signature header","type":"string"}}],"responses":{"204":{"description":"No Content response."}},"summary":"receiveWorkOSWebhook external","tags":["external"],"x-speakeasy-name-override":"receiveWorkOSWebhook","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/hooks.claude":{"post":{"tags":["hooks"],"summary":"claude hooks","description":"Unified endpoint for all Claude Code hook events. Handles SessionStart, PreToolUse, PostToolUse, and PostToolUseFailure.","operationId":"hooks#claude","parameters":[{"name":"Gram-Key","in":"header","description":"Optional API key for plugin-driven attribution.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional API key for plugin-driven attribution."}},{"name":"Gram-Project","in":"header","description":"Optional project slug for plugin-driven attribution.","allowEmptyValue":true,"schema":{"type":"string","description":"Optional project slug for plugin-driven attribution."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rpc/hooks.codex":{"post":{"tags":["hooks"],"summary":"codex hooks","description":"Endpoint for Codex hook events. Handles SessionStart, PreToolUse, PermissionRequest, PostToolUse, UserPromptSubmit, and Stop.","operationId":"hooks#codex","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.cursor":{"post":{"tags":["hooks"],"summary":"cursor hooks","description":"Endpoint for Cursor hook events. Handles beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, and afterMCPExecution.","operationId":"hooks#cursor","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorHookPayload"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorHookResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.deleteServerNameOverride":{"post":{"tags":["hooksServerNames"],"summary":"delete hooksServerNames","description":"Delete a server name display override","operationId":"deleteServerNameOverride","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRequestBody"}}}},"responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.listServerNameOverrides":{"get":{"tags":["hooksServerNames"],"summary":"list hooksServerNames","description":"List all server name display overrides for a project","operationId":"listServerNameOverrides","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServerNameOverride"}}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.otel/v1/logs":{"post":{"tags":["hooks"],"summary":"logs hooks","description":"Endpoint to receive OTEL logs data from Claude Code. Requires API key authentication.","operationId":"hooks#logs","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTELLogsPayload"}}}},"responses":{"202":{"description":"Accepted response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.otel/v1/metrics":{"post":{"tags":["hooks"],"summary":"metrics hooks","description":"Endpoint to receive OTEL metrics data from Claude Code. Requires API key authentication.","operationId":"hooks#metrics","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTELMetricsPayload"}}}},"responses":{"202":{"description":"Accepted response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/hooks.upsertServerNameOverride":{"post":{"tags":["hooksServerNames"],"summary":"upsert hooksServerNames","description":"Create or update a server name display override","operationId":"upsertServerNameOverride","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerNameOverride"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/instances.get":{"get":{"description":"Load all relevant data for an instance of a toolset and environment","operationId":"getInstance","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to load","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInstanceResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"getInstance instances","tags":["instances"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Instance"}}},"/rpc/integrations.get":{"get":{"tags":["integrations"],"summary":"get integrations","description":"Get a third-party integration by ID or name.","operationId":"integrations#get","parameters":[{"name":"id","in":"query","description":"The ID of the integration to get (refers to a package id).","allowEmptyValue":true,"schema":{"type":"string","description":"The ID of the integration to get (refers to a package id)."}},{"name":"name","in":"query","description":"The name of the integration to get (refers to a package name).","allowEmptyValue":true,"schema":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}]}},"/rpc/integrations.list":{"get":{"description":"List available third-party integrations.","operationId":"listIntegrations","parameters":[{"allowEmptyValue":true,"description":"Keywords to filter integrations by","in":"query","name":"keywords","schema":{"description":"Keywords to filter integrations by","items":{"maxLength":20,"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"list integrations","tags":["integrations"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListIntegrations"}}},"/rpc/keys.create":{"post":{"description":"Create a new api key","operationId":"createAPIKey","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createKey keys","tags":["keys"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateAPIKey"}}},"/rpc/keys.list":{"get":{"description":"List all api keys for an organization","operationId":"listAPIKeys","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listKeys keys","tags":["keys"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListAPIKeys"}}},"/rpc/keys.revoke":{"delete":{"description":"Revoke a api key","operationId":"revokeAPIKey","parameters":[{"allowEmptyValue":true,"description":"The ID of the key to revoke","in":"query","name":"id","required":true,"schema":{"description":"The ID of the key to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeKey keys","tags":["keys"],"x-speakeasy-name-override":"revokeById","x-speakeasy-react-hook":{"name":"RevokeAPIKey"}}},"/rpc/keys.verify":{"get":{"description":"Verify an api key","operationId":"validateAPIKey","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"verifyKey keys","tags":["keys"],"x-speakeasy-name-override":"validate","x-speakeasy-react-hook":{"name":"ValidateAPIKey"}}},"/rpc/mcpEndpoints.checkSlugAvailability":{"get":{"description":"Check whether an MCP endpoint slug is available. The uniqueness scope depends on whether a custom_domain_id is provided: platform-domain slugs are checked across all platform-domain endpoints (custom_domain_id IS NULL); custom-domain slugs are checked within the (custom_domain_id, slug) pair. Returns true when the slug is free.","operationId":"checkMcpEndpointSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","maxLength":128,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Optional custom domain ID. Omit to check platform-domain slug availability.","in":"query","name":"custom_domain_id","schema":{"description":"Optional custom domain ID. Omit to check platform-domain slug availability.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMcpEndpointSlugAvailability mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"checkSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMcpEndpointSlugAvailability"}}},"/rpc/mcpEndpoints.create":{"post":{"description":"Create a new MCP endpoint for an MCP server","operationId":"createMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpEndpointForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateMcpEndpoint"}}},"/rpc/mcpEndpoints.delete":{"delete":{"description":"Delete an MCP endpoint","operationId":"deleteMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP endpoint to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the MCP endpoint to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteMcpEndpoint"}}},"/rpc/mcpEndpoints.get":{"get":{"description":"Get an MCP endpoint by id or by (custom_domain_id, slug). Provide either id, or slug with an optional custom_domain_id — not both.","operationId":"getMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP endpoint","in":"query","name":"id","schema":{"description":"The ID of the MCP endpoint","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.","in":"query","name":"custom_domain_id","schema":{"description":"The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug to look up","in":"query","name":"slug","schema":{"description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","maxLength":128,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpEndpoint"}}},"/rpc/mcpEndpoints.list":{"get":{"description":"List MCP endpoints for a project. Optionally filter to only those associated with a specific MCP server.","operationId":"listMcpEndpoints","parameters":[{"allowEmptyValue":true,"description":"Optional filter: only return endpoints associated with this MCP server.","in":"query","name":"mcp_server_id","schema":{"description":"Optional filter: only return endpoints associated with this MCP server.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpEndpointsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listMcpEndpoints mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"McpEndpoints"}}},"/rpc/mcpEndpoints.update":{"post":{"description":"Update an MCP endpoint. This is a full-record replace: fields omitted from the request become null on the stored record. The id, mcp_server_id, and slug fields are required.","operationId":"updateMcpEndpoint","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpEndpointForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateMcpEndpoint mcpEndpoints","tags":["mcpEndpoints"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateMcpEndpoint"}}},"/rpc/mcpMetadata.export":{"post":{"description":"Export MCP server details as JSON for documentation and integration purposes.","operationId":"exportMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpExport"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"exportMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"export","x-speakeasy-react-hook":{"name":"ExportMcpMetadata"}}},"/rpc/mcpMetadata.get":{"get":{"description":"Fetch the metadata that powers the MCP install page.","operationId":"getMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset associated with this install page metadata","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMcpMetadataResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpMetadata"}}},"/rpc/mcpMetadata.set":{"post":{"description":"Create or update the metadata that powers the MCP install page.","operationId":"setMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpMetadata"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"set"}},"/rpc/mcpRegistries.clearCache":{"delete":{"description":"Clear the registry cache for a specific registry (admin only)","operationId":"clearMCPRegistryCache","parameters":[{"allowEmptyValue":true,"description":"The registry to clear cache for","in":"query","name":"registry_id","required":true,"schema":{"description":"The registry to clear cache for","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"clearCache mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"clearCache"}},"/rpc/mcpRegistries.getServerDetails":{"get":{"description":"Get detailed information about an MCP server including remotes","operationId":"getMCPServerDetails","parameters":[{"allowEmptyValue":true,"description":"ID of the registry","in":"query","name":"registry_id","required":true,"schema":{"description":"ID of the registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Server specifier (e.g., 'io.github.user/server')","in":"query","name":"server_specifier","required":true,"schema":{"description":"Server specifier (e.g., 'io.github.user/server')","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMCPServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getServerDetails mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"getServerDetails"}},"/rpc/mcpRegistries.listCatalog":{"get":{"description":"List available MCP servers from configured registries","operationId":"listMCPCatalog","parameters":[{"allowEmptyValue":true,"description":"Filter to a specific registry","in":"query","name":"registry_id","schema":{"description":"Filter to a specific registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Search query to filter servers by name","in":"query","name":"search","schema":{"description":"Search query to filter servers by name","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor","in":"query","name":"cursor","schema":{"description":"Pagination cursor","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCatalogResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listCatalog mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listCatalog","x-speakeasy-react-hook":{"name":"ListMCPCatalog"}}},"/rpc/mcpRegistries.listRegistries":{"get":{"description":"List all MCP registries (admin only)","operationId":"listMCPRegistries","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRegistriesResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRegistries mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listRegistries","x-speakeasy-react-hook":{"name":"ListMCPRegistries"}}},"/rpc/mcpServers.create":{"post":{"description":"Create a new MCP server","operationId":"createMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateMcpServer"}}},"/rpc/mcpServers.delete":{"delete":{"description":"Delete an MCP server","operationId":"deleteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP server to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the MCP server to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteMcpServer"}}},"/rpc/mcpServers.get":{"get":{"description":"Get an MCP server by ID or slug. Exactly one of id or slug must be provided.","operationId":"getMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the MCP server. Mutually exclusive with slug.","in":"query","name":"id","schema":{"description":"The ID of the MCP server. Mutually exclusive with slug.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug of the MCP server. Mutually exclusive with id.","in":"query","name":"slug","schema":{"description":"The slug of the MCP server. Mutually exclusive with id.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpServer"}}},"/rpc/mcpServers.list":{"get":{"description":"List MCP servers for a project. Accepts optional remote_mcp_server_id or toolset_id filters to scope the result to a single backend; at most one filter may be supplied since the two backends are mutually exclusive.","operationId":"listMcpServers","parameters":[{"allowEmptyValue":true,"description":"Filter to MCP servers backed by this remote MCP server","in":"query","name":"remote_mcp_server_id","schema":{"description":"Filter to MCP servers backed by this remote MCP server","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter to MCP servers backed by this toolset","in":"query","name":"toolset_id","schema":{"description":"Filter to MCP servers backed by this toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpServersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listMcpServers mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"McpServers"}}},"/rpc/mcpServers.update":{"post":{"description":"Update an MCP server. This is a full-record replace for the optional UUID references: fields omitted from the request become null on the stored record. name is an exception — omitting it leaves the existing display name unchanged, while providing it requires a non-empty value and recomputes the server-side slug. The id and visibility fields are required; exactly one of remote_mcp_server_id or toolset_id must be provided.","operationId":"updateMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateMcpServer mcpServers","tags":["mcpServers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateMcpServer"}}},"/rpc/organizations.createPortalSession":{"post":{"description":"Create a webhook portal session.","operationId":"createPortalSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalSessionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createPortalSession organizations","tags":["organizations"],"x-speakeasy-name-override":"createPortalSession","x-speakeasy-react-hook":{"name":"CreatePortalSession"}}},"/rpc/organizations.disableWebhooks":{"post":{"description":"Disable webhooks for the active organization.","operationId":"disableWebhooks","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"disableWebhooks organizations","tags":["organizations"],"x-speakeasy-name-override":"disableWebhooks","x-speakeasy-react-hook":{"name":"DisableWebhooks"}}},"/rpc/organizations.enableWebhooks":{"post":{"description":"Enable webhooks for the active organization.","operationId":"enableWebhooks","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"enableWebhooks organizations","tags":["organizations"],"x-speakeasy-name-override":"enableWebhooks","x-speakeasy-react-hook":{"name":"EnableWebhooks"}}},"/rpc/organizations.get":{"get":{"description":"Get the active organization from the session.","operationId":"getOrganization","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"get organizations","tags":["organizations"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Organization"}}},"/rpc/organizations.listInvites":{"get":{"description":"List pending WorkOS invitations for the active organization.","operationId":"listInvites","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInvitesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listInvites organizations","tags":["organizations"],"x-speakeasy-name-override":"listInvites","x-speakeasy-react-hook":{"name":"ListInvites"}}},"/rpc/organizations.listUsers":{"get":{"description":"List users in the active organization from Gram organization_user_relationships.","operationId":"listOrganizationUsers","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listUsers organizations","tags":["organizations"],"x-speakeasy-name-override":"listUsers","x-speakeasy-react-hook":{"name":"ListOrganizationUsers"}}},"/rpc/organizations.removeUser":{"delete":{"description":"Remove a user from the active organization in Gram and delete their WorkOS organization membership.","operationId":"removeOrganizationUser","parameters":[{"allowEmptyValue":true,"description":"Gram user ID to remove.","in":"query","name":"user_id","required":true,"schema":{"description":"Gram user ID to remove.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"removeUser organizations","tags":["organizations"],"x-speakeasy-name-override":"removeUser","x-speakeasy-react-hook":{"name":"RemoveOrganizationUser"}}},"/rpc/organizations.revokeInvite":{"delete":{"description":"Revoke a pending WorkOS invitation.","operationId":"revokeInvite","parameters":[{"allowEmptyValue":true,"description":"WorkOS invitation ID.","in":"query","name":"invitation_id","required":true,"schema":{"description":"WorkOS invitation ID.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeInvite organizations","tags":["organizations"],"x-speakeasy-name-override":"revokeInvite","x-speakeasy-react-hook":{"name":"RevokeInvite"}}},"/rpc/organizations.sendInvite":{"post":{"description":"Send a WorkOS invitation for the active organization.","operationId":"sendInvite","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInviteRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"sendInvite organizations","tags":["organizations"],"x-speakeasy-name-override":"sendInvite","x-speakeasy-react-hook":{"name":"SendInvite"}}},"/rpc/organizations.updateInviteRole":{"put":{"description":"Change the role assigned to a pending WorkOS invitation.","operationId":"updateInviteRole","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInviteRoleRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"updateInviteRole organizations","tags":["organizations"],"x-speakeasy-name-override":"updateInviteRole","x-speakeasy-react-hook":{"name":"UpdateInviteRole"}}},"/rpc/otelForwarding.deleteConfig":{"post":{"description":"Delete the org-wide OTEL forwarding config.","operationId":"deleteOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"deleteConfig","x-speakeasy-react-hook":{"name":"DeleteOtelForwardingConfig"}}},"/rpc/otelForwarding.getConfig":{"get":{"description":"Get the org-wide OTEL forwarding config. Returns an empty config (enabled=false, no URL) when none is set.","operationId":"getOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtelForwardingConfig"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"getConfig","x-speakeasy-react-hook":{"name":"OtelForwardingConfig"}}},"/rpc/otelForwarding.upsertConfig":{"post":{"description":"Create or update the org-wide OTEL forwarding config. Replaces the full header set on each call.","operationId":"upsertOtelForwardingConfig","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertConfigRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtelForwardingConfig"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"upsertConfig otelForwarding","tags":["otelForwarding"],"x-speakeasy-name-override":"upsertConfig","x-speakeasy-react-hook":{"name":"UpsertOtelForwardingConfig"}}},"/rpc/packages.create":{"post":{"description":"Create a new package for a project.","operationId":"createPackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPackage packages","tags":["packages"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreatePackage"}}},"/rpc/packages.list":{"get":{"description":"List all packages for a project.","operationId":"listPackages","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPackagesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPackages packages","tags":["packages"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListPackages"}}},"/rpc/packages.listVersions":{"get":{"description":"List published versions of a package.","operationId":"listVersions","parameters":[{"allowEmptyValue":true,"description":"The name of the package","in":"query","name":"name","required":true,"schema":{"description":"The name of the package","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVersionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listVersions packages","tags":["packages"],"x-speakeasy-name-override":"listVersions","x-speakeasy-react-hook":{"name":"ListVersions"}}},"/rpc/packages.publish":{"post":{"description":"Publish a new version of a package.","operationId":"publish","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publish packages","tags":["packages"],"x-speakeasy-name-override":"publish","x-speakeasy-react-hook":{"name":"PublishPackage"}}},"/rpc/packages.update":{"put":{"description":"Update package details.","operationId":"updatePackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageResult"}}},"description":"OK response."},"304":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotModified"}}},"description":"not_modified: Not Modified response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePackage packages","tags":["packages"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdatePackage"}}},"/rpc/plugins.addPluginServer":{"post":{"description":"Add an MCP server to a plugin.","operationId":"addPluginServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPluginServerForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginServer"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"addPluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"addPluginServer","x-speakeasy-react-hook":{"name":"AddPluginServer"}}},"/rpc/plugins.createPlugin":{"post":{"description":"Create a new plugin.","operationId":"createPlugin","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePluginForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"Created response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"createPlugin","x-speakeasy-react-hook":{"name":"CreatePlugin"}}},"/rpc/plugins.deletePlugin":{"delete":{"description":"Delete a plugin.","operationId":"deletePlugin","parameters":[{"allowEmptyValue":true,"in":"query","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deletePlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"deletePlugin","x-speakeasy-react-hook":{"name":"DeletePlugin"}}},"/rpc/plugins.downloadCodexInstallScript":{"get":{"description":"Download a bash install script that registers the Codex observability marketplace and pre-approves all hook events. Requires a published marketplace.","operationId":"downloadCodexInstallScript","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"text/x-shellscript":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadCodexInstallScript plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadCodexInstallScript"}},"/rpc/plugins.downloadObservabilityPlugin":{"get":{"description":"Download a ZIP of the per-org observability plugin (Gram hooks). Mints a fresh hooks-scoped API key on each download and embeds it in the plugin's hook script.","operationId":"downloadObservabilityPlugin","parameters":[{"allowEmptyValue":true,"description":"Target platform.","in":"query","name":"platform","required":true,"schema":{"description":"Target platform.","enum":["claude","cursor","codex"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadObservabilityPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadObservabilityPlugin"}},"/rpc/plugins.downloadPluginPackage":{"get":{"description":"Download a ZIP of a single plugin package for direct installation.","operationId":"downloadPluginPackage","parameters":[{"allowEmptyValue":true,"description":"The plugin to download.","in":"query","name":"plugin_id","required":true,"schema":{"description":"The plugin to download.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Target platform to download plugins for.","in":"query","name":"platform","required":true,"schema":{"description":"Target platform to download plugins for.","enum":["claude","cursor","codex"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Disposition":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"downloadPluginPackage plugins","tags":["plugins"],"x-speakeasy-name-override":"downloadPluginPackage"}},"/rpc/plugins.getPlugin":{"get":{"description":"Get a plugin with its servers and assignments.","operationId":"getPlugin","parameters":[{"allowEmptyValue":true,"in":"query","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"getPlugin","x-speakeasy-react-hook":{"name":"Plugin"}}},"/rpc/plugins.getPublishStatus":{"get":{"description":"Check whether GitHub publishing is configured and connected for this project.","operationId":"getPublishStatus","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishStatusResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPublishStatus plugins","tags":["plugins"],"x-speakeasy-name-override":"getPublishStatus","x-speakeasy-react-hook":{"name":"PublishStatus"}}},"/rpc/plugins.listPlugins":{"get":{"description":"List all plugins for the current project.","operationId":"listPlugins","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPluginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPlugins plugins","tags":["plugins"],"x-speakeasy-name-override":"listPlugins","x-speakeasy-react-hook":{"name":"Plugins"}}},"/rpc/plugins.publishPlugins":{"post":{"description":"Generate and publish all plugin packages to a GitHub repository.","operationId":"publishPlugins","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPluginsRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPluginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publishPlugins plugins","tags":["plugins"],"x-speakeasy-name-override":"publishPlugins","x-speakeasy-react-hook":{"name":"PublishPlugins"}}},"/rpc/plugins.removePluginServer":{"delete":{"description":"Remove a server from a plugin.","operationId":"removePluginServer","parameters":[{"allowEmptyValue":true,"description":"The plugin server ID to remove.","in":"query","name":"id","required":true,"schema":{"description":"The plugin server ID to remove.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"in":"query","name":"plugin_id","required":true,"schema":{"format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"removePluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"removePluginServer","x-speakeasy-react-hook":{"name":"RemovePluginServer"}}},"/rpc/plugins.setPluginAssignments":{"put":{"description":"Replace all assignments for a plugin with the given list of principal URNs.","operationId":"setPluginAssignments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPluginAssignmentsForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPluginAssignmentsResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setPluginAssignments plugins","tags":["plugins"],"x-speakeasy-name-override":"setPluginAssignments","x-speakeasy-react-hook":{"name":"SetPluginAssignments"}}},"/rpc/plugins.updatePlugin":{"put":{"description":"Update plugin metadata.","operationId":"updatePlugin","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePluginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plugin"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePlugin plugins","tags":["plugins"],"x-speakeasy-name-override":"updatePlugin","x-speakeasy-react-hook":{"name":"UpdatePlugin"}}},"/rpc/plugins.updatePluginServer":{"put":{"description":"Update a server's configuration within a plugin.","operationId":"updatePluginServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePluginServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePluginServer plugins","tags":["plugins"],"x-speakeasy-name-override":"updatePluginServer","x-speakeasy-react-hook":{"name":"UpdatePluginServer"}}},"/rpc/productFeatures.get":{"get":{"description":"Get the current state of all product feature flags.","operationId":"getProductFeatures","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductFeaturesResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getProductFeatures features","tags":["features"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"ProductFeatures"}}},"/rpc/productFeatures.set":{"post":{"description":"Enable or disable an organization feature flag.","operationId":"setProductFeature","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductFeatureRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"setProductFeature features","tags":["features"],"x-speakeasy-name-override":"set"}},"/rpc/projects.create":{"post":{"description":"Create a new project.","operationId":"createProject","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createProject projects","tags":["projects"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateProject"}}},"/rpc/projects.delete":{"delete":{"description":"Delete a project by its ID","operationId":"deleteProject","parameters":[{"allowEmptyValue":true,"description":"The id of the project to delete","in":"query","name":"id","required":true,"schema":{"description":"The id of the project to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteProject projects","tags":["projects"],"x-speakeasy-name-override":"deleteById","x-speakeasy-react-hook":{"name":"DeleteProject"}}},"/rpc/projects.get":{"get":{"description":"Get project details by slug.","operationId":"getProject","parameters":[{"allowEmptyValue":true,"description":"The slug of the project to get","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getProject projects","tags":["projects"],"x-speakeasy-name-override":"read","x-speakeasy-react-hook":{"name":"Project"}}},"/rpc/projects.list":{"get":{"description":"List all projects for an organization.","operationId":"listProjects","parameters":[{"allowEmptyValue":true,"description":"The ID of the organization to list projects for","in":"query","name":"organization_id","required":true,"schema":{"description":"The ID of the organization to list projects for","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listProjects projects","tags":["projects"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListProjects"}}},"/rpc/projects.listAllowedOrigins":{"get":{"description":"List allowed origins for a project.","operationId":"listAllowedOrigins","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAllowedOriginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAllowedOrigins projects","tags":["projects"],"x-speakeasy-name-override":"listAllowedOrigins","x-speakeasy-react-hook":{"name":"ListAllowedOrigins"}}},"/rpc/projects.setLogo":{"post":{"description":"Uploads a logo for a project.","operationId":"setProjectLogo","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSignedAssetURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectLogoResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setLogo projects","tags":["projects"],"x-speakeasy-name-override":"setLogo","x-speakeasy-react-hook":{"name":"setProjectLogo"}}},"/rpc/projects.setOrganizationWhitelist":{"post":{"description":"Set organization whitelist status (admin only - requires speakeasy-team API key)","operationId":"setOrganizationWhitelist","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrganizationWhitelistRequestBody"}}},"required":true},"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"setOrganizationWhitelist projects","tags":["projects"],"x-speakeasy-name-override":"setOrganizationWhitelist"}},"/rpc/projects.upsertAllowedOrigin":{"post":{"description":"Upsert an allowed origin for a project.","operationId":"upsertAllowedOrigin","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"upsertAllowedOrigin projects","tags":["projects"],"x-speakeasy-name-override":"upsertAllowedOrigin","x-speakeasy-react-hook":{"name":"UpsertAllowedOrigin"}}},"/rpc/remoteMcp.createServer":{"post":{"description":"Create a new remote MCP server","operationId":"createRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"createServer","x-speakeasy-react-hook":{"name":"CreateRemoteMcpServer"}}},"/rpc/remoteMcp.deleteServer":{"delete":{"description":"Delete a remote MCP server","operationId":"deleteRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the remote MCP server to delete","in":"query","name":"id","required":true,"schema":{"description":"The ID of the remote MCP server to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"deleteServer","x-speakeasy-react-hook":{"name":"DeleteRemoteMcpServer"}}},"/rpc/remoteMcp.getServer":{"get":{"description":"Get a remote MCP server by ID or slug. Exactly one of id or slug must be provided.","operationId":"getRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"The ID of the remote MCP server. Mutually exclusive with slug.","in":"query","name":"id","schema":{"description":"The ID of the remote MCP server. Mutually exclusive with slug.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The slug of the remote MCP server. Mutually exclusive with id.","in":"query","name":"slug","schema":{"description":"The slug of the remote MCP server. Mutually exclusive with id.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"getServer","x-speakeasy-react-hook":{"name":"GetRemoteMcpServer"}}},"/rpc/remoteMcp.listServers":{"get":{"description":"List all remote MCP servers for a project","operationId":"listRemoteMcpServers","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListServersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listServers remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"listServers","x-speakeasy-react-hook":{"name":"RemoteMcpServers"}}},"/rpc/remoteMcp.updateServer":{"post":{"description":"Update a remote MCP server","operationId":"updateRemoteMcpServer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateServer remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"updateServer","x-speakeasy-react-hook":{"name":"UpdateRemoteMcpServer"}}},"/rpc/remoteMcp.verifyURL":{"post":{"description":"Probe a candidate remote MCP server URL by issuing an MCP initialize request and reporting the outcome. Used to give users a reachability signal before they save a new or updated remote MCP server. Treats reachable-but-401/403 responses as verified — auth verification is intentionally out of scope.","operationId":"verifyRemoteMcpURL","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"verifyURL remoteMcp","tags":["remoteMcp"],"x-speakeasy-name-override":"verifyURL","x-speakeasy-react-hook":{"name":"VerifyRemoteMcpURL"}}},"/rpc/remoteSessionClients.cloneClientFromOAuthProxyProvider":{"post":{"description":"Platform-admin-only. Clone the client_id / client_secret from an existing oauth_proxy_provider into a new remote_session_client paired with the supplied issuers. The upstream secret stays server-side: it is read from the proxy provider's stored secrets, re-encrypted, and persisted on the remote_session_client row without ever crossing the wire.","operationId":"cloneClientFromOAuthProxyProvider","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneClientFromOAuthProxyProviderForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneClientFromOAuthProxyProvider remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"cloneClientFromOAuthProxyProvider","x-speakeasy-react-hook":{"name":"CloneClientFromOAuthProxyProvider"}}},"/rpc/remoteSessionClients.create":{"post":{"description":"Register a remote_session_client by supplying a client_id and optional client_secret obtained out-of-band from the upstream issuer.","operationId":"createRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRemoteSessionClientForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateRemoteSessionClient"}}},"/rpc/remoteSessionClients.delete":{"delete":{"description":"Soft-delete a remote_session_client. Cascades to remote_sessions rows pointing at this client; affected principals are forced to re-authenticate.","operationId":"deleteRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"The remote_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteRemoteSessionClient"}}},"/rpc/remoteSessionClients.get":{"get":{"description":"Get a remote_session_client by id.","operationId":"getRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"The remote_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RemoteSessionClient"}}},"/rpc/remoteSessionClients.list":{"get":{"description":"List remote_session_clients in the caller's project.","operationId":"listRemoteSessionClients","parameters":[{"allowEmptyValue":true,"description":"Filter to clients registered with this issuer.","in":"query","name":"remote_session_issuer_id","schema":{"description":"Filter to clients registered with this issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter to clients paired with this user_session_issuer.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter to clients paired with this user_session_issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionClientsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessionClients remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessionClients"}}},"/rpc/remoteSessionClients.update":{"post":{"description":"Rotate the client_secret or change the user_session_issuer_id linkage on an existing remote_session_client.","operationId":"updateRemoteSessionClient","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRemoteSessionClientForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateRemoteSessionClient remoteSessionClients","tags":["remoteSessionClients"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateRemoteSessionClient"}}},"/rpc/remoteSessionIssuers.create":{"post":{"description":"Create a new remote_session_issuer.","operationId":"createRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRemoteSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.delete":{"delete":{"description":"Soft-delete a remote_session_issuer. Blocked if any remote_session_clients still reference it.","operationId":"deleteRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The remote_session_issuer id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.discover":{"post":{"description":"Hit an upstream issuer's RFC 8414 .well-known/oauth-authorization-server document and return a draft suitable for createRemoteSessionIssuer. No persistence.","operationId":"discoverRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRemoteSessionIssuerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuerDraft"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"discoverRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"discover","x-speakeasy-react-hook":{"name":"DiscoverRemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.get":{"get":{"description":"Get a remote_session_issuer by id or by slug. Provide exactly one.","operationId":"getRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The remote_session_issuer id.","in":"query","name":"id","schema":{"description":"The remote_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The remote_session_issuer slug.","in":"query","name":"slug","schema":{"description":"The remote_session_issuer slug.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RemoteSessionIssuer"}}},"/rpc/remoteSessionIssuers.list":{"get":{"description":"List remote_session_issuers in the caller's project.","operationId":"listRemoteSessionIssuers","parameters":[{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionIssuersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessionIssuers remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessionIssuers"}}},"/rpc/remoteSessionIssuers.update":{"post":{"description":"Update fields on an existing remote_session_issuer.","operationId":"updateRemoteSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRemoteSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateRemoteSessionIssuer remoteSessionIssuers","tags":["remoteSessionIssuers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateRemoteSessionIssuer"}}},"/rpc/remoteSessions.list":{"get":{"description":"List remote_sessions in the caller's project. access_token_encrypted and refresh_token_encrypted are never returned — only metadata (access_expires_at, refresh_expires_at, scopes).","operationId":"listRemoteSessions","parameters":[{"allowEmptyValue":true,"description":"Exact-match filter on subject URN.","in":"query","name":"subject_urn","schema":{"description":"Exact-match filter on subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by remote_session_client id.","in":"query","name":"remote_session_client_id","schema":{"description":"Filter by remote_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor.","in":"query","name":"cursor","schema":{"description":"Pagination cursor.","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRemoteSessionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listRemoteSessions remoteSessions","tags":["remoteSessions"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"RemoteSessions"}}},"/rpc/remoteSessions.revoke":{"post":{"description":"Drop a remote_session row. The next /mcp call by that principal triggers a fresh authn challenge.","operationId":"revokeRemoteSession","parameters":[{"allowEmptyValue":true,"description":"The remote_session id.","in":"query","name":"id","required":true,"schema":{"description":"The remote_session id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeRemoteSession remoteSessions","tags":["remoteSessions"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeRemoteSession"}}},"/rpc/resources.list":{"get":{"description":"List all resources for a project","operationId":"listResources","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of resources to return per page","in":"query","name":"limit","schema":{"description":"The number of resources to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResourcesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listResources resources","tags":["resources"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListResources"}}},"/rpc/risk.approvals.create":{"post":{"description":"Approve a shadow-MCP server so the named policy stops blocking calls to it. `match` is the same opaque server identifier surfaced in `RiskResult.match` — typically a server URL, stdio command, or `mcp__\u003cserver\u003e__` prefix.","operationId":"approveShadowMCP","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveShadowMCPRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShadowMCPApproval"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"approveShadowMCP risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"RiskApproveShadowMCP","type":"mutation"}}},"/rpc/risk.approvals.delete":{"delete":{"description":"Remove a previously-approved shadow-MCP server for a policy.","operationId":"revokeShadowMCPApproval","parameters":[{"allowEmptyValue":true,"description":"The risk policy ID.","in":"query","name":"policy_id","required":true,"schema":{"description":"The risk policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The MCP server identifier to revoke — exactly the value used to approve.","in":"query","name":"match","required":true,"schema":{"description":"The MCP server identifier to revoke — exactly the value used to approve.","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"revokeShadowMCPApproval risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"delete"}},"/rpc/risk.approvals.list":{"get":{"description":"List shadow-MCP approvals (URL- or command-keyed) for a policy. Temporary Redis-backed storage; will move to a dedicated table once the feature graduates.","operationId":"listShadowMCPApprovals","parameters":[{"allowEmptyValue":true,"description":"The risk policy ID.","in":"query","name":"policy_id","required":true,"schema":{"description":"The risk policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShadowMCPApprovalsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listShadowMCPApprovals risk","tags":["risk"],"x-speakeasy-group":"risk.approvals","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListShadowMCPApprovals"}}},"/rpc/risk.capabilities.get":{"get":{"description":"Get server-side risk analysis capabilities for the current project.","operationId":"getRiskCapabilities","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCapabilitiesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskCapabilities risk","tags":["risk"],"x-speakeasy-group":"risk.capabilities","x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RiskCapabilities"}}},"/rpc/risk.categories":{"get":{"description":"Return the canonical risk category definitions: metadata (label/description/icon) plus the classification (source / rule_id list / rule_id prefix) used to bucket findings. Dashboards and CLIs should call this instead of maintaining their own copy of the mapping.","operationId":"listRiskCategories","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCategoriesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskCategories risk","tags":["risk"],"x-speakeasy-group":"risk.categories","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskCategories"}}},"/rpc/risk.overview.get":{"get":{"description":"Get risk overview metrics and trend data for the current project.","operationId":"getRiskOverview","parameters":[{"allowEmptyValue":true,"description":"Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.","in":"query","name":"from","schema":{"description":"Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the overview window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the overview window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskOverview risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"RiskOverview"}}},"/rpc/risk.overview.rules":{"get":{"description":"Get per-rule_id finding counts for a category within a time window. Powers the per-category drill-down chart on /risk-overview.","operationId":"getRiskRuleBreakdown","parameters":[{"allowEmptyValue":true,"description":"Required category key to break down by rule_id (e.g. secrets, pii).","in":"query","name":"category","required":true,"schema":{"description":"Required category key to break down by rule_id (e.g. secrets, pii).","type":"string"}},{"allowEmptyValue":true,"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","in":"query","name":"from","schema":{"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRuleBreakdownResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskRuleBreakdown risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"rules","x-speakeasy-react-hook":{"name":"RiskRuleBreakdown"}}},"/rpc/risk.overview.userBreakdown":{"get":{"description":"Per-user breakdowns of findings by category and by rule_id within a time window. Powers the user drill-down on /risk-overview.","operationId":"getRiskUserBreakdown","parameters":[{"allowEmptyValue":true,"description":"External user identifier to scope the breakdown to.","in":"query","name":"external_user_id","required":true,"schema":{"description":"External user identifier to scope the breakdown to.","type":"string"}},{"allowEmptyValue":true,"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","in":"query","name":"from","schema":{"description":"Inclusive start of the window. Defaults to the same 7-day window as the overview.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Exclusive end of the window. Defaults to now.","in":"query","name":"to","schema":{"description":"Exclusive end of the window. Defaults to now.","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskUserBreakdownResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskUserBreakdown risk","tags":["risk"],"x-speakeasy-group":"risk.overview","x-speakeasy-name-override":"userBreakdown","x-speakeasy-react-hook":{"name":"RiskUserBreakdown"}}},"/rpc/risk.policies.create":{"post":{"description":"Create a new risk analysis policy for the current project.","operationId":"createRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskPolicyRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"RiskCreatePolicy","type":"mutation"}}},"/rpc/risk.policies.delete":{"delete":{"description":"Delete a risk analysis policy.","operationId":"deleteRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"delete"}},"/rpc/risk.policies.get":{"get":{"description":"Get a risk analysis policy by ID.","operationId":"getRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"get"}},"/rpc/risk.policies.list":{"get":{"description":"List all risk analysis policies for the current project.","operationId":"listRiskPolicies","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskPoliciesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskPolicies risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListPolicies"}}},"/rpc/risk.policies.status":{"get":{"description":"Get the analysis status of a risk policy including progress and workflow state.","operationId":"getRiskPolicyStatus","parameters":[{"allowEmptyValue":true,"description":"The policy ID.","in":"query","name":"id","required":true,"schema":{"description":"The policy ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicyStatus"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getRiskPolicyStatus risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"status"}},"/rpc/risk.policies.trigger":{"post":{"description":"Manually trigger risk analysis for a policy, starting or signaling the drain workflow. Defaults to the most recent 100 unanalyzed messages; pass `limit=0` to backfill every unanalyzed message.","operationId":"triggerRiskAnalysis","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRiskAnalysisRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"triggerRiskAnalysis risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"trigger"}},"/rpc/risk.policies.update":{"put":{"description":"Update a risk analysis policy.","operationId":"updateRiskPolicy","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskPolicyRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPolicy"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateRiskPolicy risk","tags":["risk"],"x-speakeasy-group":"risk.policies","x-speakeasy-name-override":"update"}},"/rpc/risk.results.byChat":{"get":{"description":"List risk results grouped by chat session for the current project.","operationId":"listRiskResultsByChat","parameters":[{"allowEmptyValue":true,"description":"Cursor to fetch the next page of results.","in":"query","name":"cursor","schema":{"description":"Cursor to fetch the next page of results.","type":"string"}},{"allowEmptyValue":true,"description":"Maximum number of results to return per page.","in":"query","name":"limit","schema":{"description":"Maximum number of results to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskResultsByChatResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskResultsByChat risk","tags":["risk"],"x-speakeasy-group":"risk.results","x-speakeasy-name-override":"byChat","x-speakeasy-react-hook":{"name":"RiskListResultsByChat"}}},"/rpc/risk.results.list":{"get":{"description":"List risk analysis results for the current project.","operationId":"listRiskResults","parameters":[{"allowEmptyValue":true,"description":"Optional policy ID to filter by.","in":"query","name":"policy_id","schema":{"description":"Optional policy ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional chat ID to filter by.","in":"query","name":"chat_id","schema":{"description":"Optional chat ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","in":"query","name":"category","schema":{"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","in":"query","name":"rule_id","schema":{"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","type":"string"}},{"allowEmptyValue":true,"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","in":"query","name":"unique_match","schema":{"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","type":"boolean"}},{"allowEmptyValue":true,"description":"Filter results to messages created at or after this timestamp (ISO 8601).","in":"query","name":"from","schema":{"description":"Filter results to messages created at or after this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","in":"query","name":"to","schema":{"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Cursor to fetch the next page of results.","in":"query","name":"cursor","schema":{"description":"Cursor to fetch the next page of results.","type":"string"}},{"allowEmptyValue":true,"description":"Maximum number of results to return per page.","in":"query","name":"limit","schema":{"description":"Maximum number of results to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskResultsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskResults risk","tags":["risk"],"x-speakeasy-group":"risk.results","x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"RiskListResults"}}},"/rpc/risk.results.listForAgent":{"get":{"description":"List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim.","operationId":"listRiskResultsForAgent","parameters":[{"allowEmptyValue":true,"description":"Optional policy ID to filter by.","in":"query","name":"policy_id","schema":{"description":"Optional policy ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional chat ID to filter by.","in":"query","name":"chat_id","schema":{"description":"Optional chat ID to filter by.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","in":"query","name":"category","schema":{"description":"Optional rule category key to filter by (e.g. secrets, pii, financial).","type":"string"}},{"allowEmptyValue":true,"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","in":"query","name":"rule_id","schema":{"description":"Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).","type":"string"}},{"allowEmptyValue":true,"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","in":"query","name":"unique_match","schema":{"description":"If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.","type":"boolean"}},{"allowEmptyValue":true,"description":"Filter results to messages created at or after this timestamp (ISO 8601).","in":"query","name":"from","schema":{"description":"Filter results to messages created at or after this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","in":"query","name":"to","schema":{"description":"Filter results to messages created strictly before this timestamp (ISO 8601).","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Cursor to fetch the next page of results.","in":"query","name":"cursor","schema":{"description":"Cursor to fetch the next page of results.","type":"string"}},{"allowEmptyValue":true,"description":"Maximum number of results to return per page.","in":"query","name":"limit","schema":{"description":"Maximum number of results to return per page.","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRiskResultsForAgentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listRiskResultsForAgent risk","tags":["risk"],"x-speakeasy-group":"risk.results","x-speakeasy-name-override":"listForAgent","x-speakeasy-react-hook":{"name":"RiskListResultsForAgent"}}},"/rpc/slack-apps.configure":{"post":{"description":"Store Slack credentials (client ID, client secret, signing secret) for an app.","operationId":"configureSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"configureSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"configureSlackApp","x-speakeasy-react-hook":{"name":"configureSlackApp"}}},"/rpc/slack-apps.create":{"post":{"description":"Create a new Slack app and generate its manifest.","operationId":"createSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"createSlackApp","x-speakeasy-react-hook":{"name":"createSlackApp"}}},"/rpc/slack-apps.delete":{"delete":{"description":"Soft-delete a Slack app.","operationId":"deleteSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackApp","x-speakeasy-react-hook":{"name":"deleteSlackApp"}}},"/rpc/slack-apps.get":{"get":{"description":"Get details of a specific Slack app.","operationId":"getSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"getSlackApp","x-speakeasy-react-hook":{"name":"getSlackApp"}}},"/rpc/slack-apps.list":{"get":{"description":"List Slack apps for a project.","operationId":"listSlackApps","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSlackAppsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listSlackApps slack","tags":["slack"],"x-speakeasy-name-override":"listSlackApps","x-speakeasy-react-hook":{"name":"listSlackApps"}}},"/rpc/slack-apps.update":{"put":{"description":"Update a Slack app's settings.","operationId":"updateSlackApp","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackApp","x-speakeasy-react-hook":{"name":"updateSlackApp"}}},"/rpc/telemetry.captureEvent":{"post":{"description":"Capture a telemetry event and forward it to PostHog","operationId":"captureEvent","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"captureEvent telemetry","tags":["telemetry"],"x-speakeasy-name-override":"captureEvent"}},"/rpc/telemetry.getHooksSummary":{"post":{"description":"Get aggregated hooks metrics grouped by server","operationId":"getHooksSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHooksSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHooksSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getHooksSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getHooksSummary","x-speakeasy-react-hook":{"name":"GetHooksSummary","type":"query"}}},"/rpc/telemetry.getObservabilityOverview":{"post":{"description":"Get observability overview metrics including time series, tool breakdowns, and summary stats","operationId":"getObservabilityOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getObservabilityOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getObservabilityOverview","x-speakeasy-react-hook":{"name":"GetObservabilityOverview","type":"query"}}},"/rpc/telemetry.getProjectMetricsSummary":{"post":{"description":"Get aggregated metrics summary for an entire project","operationId":"getProjectMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectMetricsSummary","x-speakeasy-react-hook":{"name":"GetProjectMetricsSummary","type":"query"}}},"/rpc/telemetry.getProjectOverview":{"post":{"description":"Get project-level overview including total chats, tool calls, active servers/users, and top lists","operationId":"getProjectOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectOverview","x-speakeasy-react-hook":{"name":"GetProjectOverview","type":"query"}}},"/rpc/telemetry.getUserMetricsSummary":{"post":{"description":"Get aggregated metrics summary grouped by user","operationId":"getUserMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getUserMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getUserMetricsSummary","x-speakeasy-react-hook":{"name":"GetUserMetricsSummary","type":"query"}}},"/rpc/telemetry.listAttributeKeys":{"post":{"description":"List distinct attribute keys available for filtering","operationId":"listAttributeKeys","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttributeKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAttributeKeys telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listAttributeKeys","x-speakeasy-react-hook":{"name":"ListAttributeKeys","type":"query"}}},"/rpc/telemetry.listFilterOptions":{"post":{"description":"List available filter options (API keys or users) for the observability overview","operationId":"listFilterOptions","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listFilterOptions telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listFilterOptions","x-speakeasy-react-hook":{"name":"ListFilterOptions","type":"query"}}},"/rpc/telemetry.listHooksTraces":{"post":{"description":"List hook traces aggregated by trace_id with user information","operationId":"listHooksTraces","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHooksTracesPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHooksTracesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listHooksTraces telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listHooksTraces","x-speakeasy-react-hook":{"name":"ListHooksTraces","type":"query"}}},"/rpc/telemetry.searchChats":{"post":{"description":"Search and list chat session summaries that match a search filter","operationId":"searchChats","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchChats telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchChats","x-speakeasy-react-hook":{"name":"SearchChats","type":"query"}}},"/rpc/telemetry.searchLogs":{"post":{"description":"Search and list telemetry logs that match a search filter","operationId":"searchLogs","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchLogs telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchLogs","x-speakeasy-react-hook":{"name":"SearchLogs"}}},"/rpc/telemetry.searchToolCalls":{"post":{"description":"Search and list tool calls that match a search filter","operationId":"searchToolCalls","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchToolCalls telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchToolCalls","x-speakeasy-react-hook":{"name":"SearchToolCalls"}}},"/rpc/telemetry.searchUsers":{"post":{"description":"Search and list user usage summaries grouped by user_id or external_user_id","operationId":"searchUsers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchUsers telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchUsers","x-speakeasy-react-hook":{"name":"SearchUsers","type":"query"}}},"/rpc/templates.create":{"post":{"description":"Create a new prompt template.","operationId":"createTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createTemplate templates","tags":["templates"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTemplate"}}},"/rpc/templates.delete":{"delete":{"description":"Delete prompt template by its ID or name.","operationId":"deleteTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteTemplate templates","tags":["templates"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTemplate"}}},"/rpc/templates.get":{"get":{"description":"Get prompt template by its ID or name.","operationId":"getTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getTemplate templates","tags":["templates"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Template"}}},"/rpc/templates.list":{"get":{"description":"List available prompt template.","operationId":"listTemplates","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPromptTemplatesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listTemplates templates","tags":["templates"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Templates"}}},"/rpc/templates.render":{"post":{"description":"Render a prompt template by ID with provided input data.","operationId":"renderTemplateByID","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template to render","in":"query","name":"id","required":true,"schema":{"description":"The ID of the prompt template to render","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateByIDRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplateByID templates","tags":["templates"],"x-speakeasy-name-override":"renderByID","x-speakeasy-react-hook":{"name":"RenderTemplateByID","type":"query"}}},"/rpc/templates.renderDirect":{"post":{"description":"Render a prompt template directly with all template fields provided.","operationId":"renderTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplate templates","tags":["templates"],"x-speakeasy-name-override":"render","x-speakeasy-react-hook":{"name":"RenderTemplate","type":"query"}}},"/rpc/templates.update":{"post":{"description":"Update a prompt template.","operationId":"updateTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateTemplate templates","tags":["templates"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTemplate"}}},"/rpc/tools.list":{"get":{"description":"List all tools for a project","operationId":"listTools","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of tools to return per page","in":"query","name":"limit","schema":{"description":"The number of tools to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","in":"query","name":"urn_prefix","schema":{"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","type":"string"}},{"allowEmptyValue":true,"in":"query","name":"tool_types","schema":{"default":["http","function","prompt","platform"],"items":{"description":"The type of tool","enum":["http","prompt","function","platform","externalmcp"],"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTools tools","tags":["tools"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListTools"}}},"/rpc/toolsets.addExternalOAuthServer":{"post":{"description":"Associate an external OAuth server with a toolset","operationId":"addExternalOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExternalOAuthServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addExternalOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addExternalOAuthServer","x-speakeasy-react-hook":{"name":"AddExternalOAuthServer"}}},"/rpc/toolsets.addOAuthProxyServer":{"post":{"description":"Associate an OAuth proxy server with a toolset (admin only)","operationId":"addOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addOAuthProxyServer","x-speakeasy-react-hook":{"name":"AddOAuthProxyServer"}}},"/rpc/toolsets.checkMCPSlugAvailability":{"get":{"description":"Check if a MCP slug is available","operationId":"checkMCPSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMCPSlugAvailability toolsets","tags":["toolsets"],"x-speakeasy-name-override":"checkMCPSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMCPSlugAvailability"}}},"/rpc/toolsets.clone":{"post":{"description":"Clone an existing toolset with a new name","operationId":"cloneToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Authorization":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"cloneBySlug","x-speakeasy-react-hook":{"name":"CloneToolset"}}},"/rpc/toolsets.create":{"post":{"description":"Create a new toolset with associated tools","operationId":"createToolset","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateToolset"}}},"/rpc/toolsets.delete":{"delete":{"description":"Delete a toolset by its ID","operationId":"deleteToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteToolset"}}},"/rpc/toolsets.get":{"get":{"description":"Get detailed information about a toolset including full HTTP tool definitions","operationId":"getToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Toolset"}}},"/rpc/toolsets.list":{"get":{"description":"List all toolsets for a project","operationId":"listToolsets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listToolsets toolsets","tags":["toolsets"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListToolsets"}}},"/rpc/toolsets.listForOrg":{"get":{"description":"List all toolsets across the organization (summary view)","operationId":"listToolsetsForOrg","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetSummariesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[]}],"summary":"listToolsetsForOrg toolsets","tags":["toolsets"],"x-speakeasy-name-override":"listForOrg","x-speakeasy-react-hook":{"name":"ListToolsetsForOrg"}}},"/rpc/toolsets.removeOAuthServer":{"post":{"description":"Remove OAuth server association from a toolset","operationId":"removeOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"removeOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"removeOAuthServer","x-speakeasy-react-hook":{"name":"RemoveOAuthServer"}}},"/rpc/toolsets.setUserSessionIssuer":{"post":{"description":"Link a toolset to a user_session_issuer (or pass null to unlink). The user_session_issuer must already exist in the caller's project.","operationId":"setToolsetUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to link","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserSessionIssuerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"setUserSessionIssuer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"setUserSessionIssuer","x-speakeasy-react-hook":{"name":"SetToolsetUserSessionIssuer"}}},"/rpc/toolsets.update":{"post":{"description":"Update a toolset's properties including name, description, and HTTP tools","operationId":"updateToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateToolset"}}},"/rpc/toolsets.updateOAuthProxyServer":{"post":{"description":"Update an existing OAuth proxy server associated with a toolset","operationId":"updateOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset whose OAuth proxy server to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateOAuthProxyServer","x-speakeasy-react-hook":{"name":"UpdateOAuthProxyServer"}}},"/rpc/triggers.create":{"post":{"description":"Create a trigger instance.","operationId":"createTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTriggerInstanceForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTrigger"}}},"/rpc/triggers.definitions.list":{"get":{"description":"List static trigger definitions available to a project.","operationId":"listTriggerDefinitions","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTriggerDefinitionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTriggerDefinitions triggers","tags":["triggers"],"x-speakeasy-name-override":"listDefinitions","x-speakeasy-react-hook":{"name":"TriggerDefinitions"}}},"/rpc/triggers.delete":{"delete":{"description":"Delete a trigger instance.","operationId":"deleteTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTrigger"}}},"/rpc/triggers.get":{"get":{"description":"Get a trigger instance by ID.","operationId":"getTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Trigger"}}},"/rpc/triggers.list":{"get":{"description":"List trigger instances for the current project.","operationId":"listTriggerInstances","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTriggerInstancesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTriggerInstances triggers","tags":["triggers"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Triggers"}}},"/rpc/triggers.pause":{"post":{"description":"Pause a trigger instance.","operationId":"pauseTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"pauseTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"pause","x-speakeasy-react-hook":{"name":"PauseTrigger"}}},"/rpc/triggers.resume":{"post":{"description":"Resume a trigger instance.","operationId":"resumeTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"The trigger instance ID.","in":"query","name":"id","required":true,"schema":{"description":"The trigger instance ID.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"resumeTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"resume","x-speakeasy-react-hook":{"name":"ResumeTrigger"}}},"/rpc/triggers.update":{"post":{"description":"Update a trigger instance.","operationId":"updateTriggerInstance","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTriggerInstanceForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateTriggerInstance triggers","tags":["triggers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTrigger"}}},"/rpc/usage.createCheckout":{"post":{"description":"Create a checkout link for upgrading to the business plan","operationId":"createCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createCheckout","x-speakeasy-react-hook":{"name":"createCheckout"}}},"/rpc/usage.createCustomerSession":{"post":{"description":"Create a customer session for the user","operationId":"createCustomerSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createCustomerSession usage","tags":["usage"],"x-speakeasy-name-override":"createCustomerSession","x-speakeasy-react-hook":{"name":"createCustomerSession"}}},"/rpc/usage.createTopUpCheckout":{"post":{"description":"Create a checkout link for a one-time credit top-up purchase","operationId":"createTopUpCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createTopUpCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createTopUpCheckout","x-speakeasy-react-hook":{"name":"createTopUpCheckout"}}},"/rpc/usage.getPeriodUsage":{"get":{"description":"Get the usage for an organization for a given period","operationId":"getPeriodUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodUsage"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"getPeriodUsage usage","tags":["usage"],"x-speakeasy-name-override":"getPeriodUsage","x-speakeasy-react-hook":{"name":"getPeriodUsage"}}},"/rpc/usage.getUsageTiers":{"get":{"description":"Get the usage tiers","operationId":"getUsageTiers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTiers"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"getUsageTiers usage","tags":["usage"],"x-speakeasy-name-override":"getUsageTiers","x-speakeasy-react-hook":{"name":"getUsageTiers"}}},"/rpc/userSessionClients.get":{"get":{"description":"Get a user_session_client by id.","operationId":"getUserSessionClient","parameters":[{"allowEmptyValue":true,"description":"The user_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionClient"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getUserSessionClient userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"UserSessionClient"}}},"/rpc/userSessionClients.list":{"get":{"description":"List user_session_clients in the caller's project.","operationId":"listUserSessionClients","parameters":[{"allowEmptyValue":true,"description":"Filter to clients registered with this issuer.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter to clients registered with this issuer.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionClientsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionClients userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionClients"}}},"/rpc/userSessionClients.revoke":{"post":{"description":"Soft-delete a user_session_client. Future tokens minted for this client_id are rejected; existing live user_sessions keep working until they hit expires_at.","operationId":"revokeUserSessionClient","parameters":[{"allowEmptyValue":true,"description":"The user_session_client id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSessionClient userSessionClients","tags":["userSessionClients"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSessionClient"}}},"/rpc/userSessionConsents.list":{"get":{"description":"List consent records for the caller's project.","operationId":"listUserSessionConsents","parameters":[{"allowEmptyValue":true,"description":"Filter by subject URN.","in":"query","name":"subject_urn","schema":{"description":"Filter by subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_client id.","in":"query","name":"user_session_client_id","schema":{"description":"Filter by user_session_client id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_issuer id (joins through user_session_clients).","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter by user_session_issuer id (joins through user_session_clients).","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionConsentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionConsents userSessionConsents","tags":["userSessionConsents"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionConsents"}}},"/rpc/userSessionConsents.revoke":{"post":{"description":"Withdraw consent. Subsequent authorization requests for matching (subject, user_session_client) pairs re-prompt.","operationId":"revokeUserSessionConsent","parameters":[{"allowEmptyValue":true,"description":"The user_session_consent id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_consent id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSessionConsent userSessionConsents","tags":["userSessionConsents"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSessionConsent"}}},"/rpc/userSessionIssuers.create":{"post":{"description":"Create a new user_session_issuer.","operationId":"createUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateUserSessionIssuer"}}},"/rpc/userSessionIssuers.delete":{"delete":{"description":"Soft-delete a user_session_issuer. Cascades to dependent user_sessions, user_session_consents, and remote_session_clients.","operationId":"deleteUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The user_session_issuer id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteUserSessionIssuer"}}},"/rpc/userSessionIssuers.get":{"get":{"description":"Get a user_session_issuer by id or by slug. Provide exactly one.","operationId":"getUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"The user_session_issuer id.","in":"query","name":"id","schema":{"description":"The user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"The user_session_issuer slug.","in":"query","name":"slug","schema":{"description":"The user_session_issuer slug.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"UserSessionIssuer"}}},"/rpc/userSessionIssuers.list":{"get":{"description":"List user_session_issuers in the caller's project.","operationId":"listUserSessionIssuers","parameters":[{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionIssuersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessionIssuers userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessionIssuers"}}},"/rpc/userSessionIssuers.update":{"post":{"description":"Update fields on an existing user_session_issuer.","operationId":"updateUserSessionIssuer","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSessionIssuerForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSessionIssuer"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateUserSessionIssuer userSessionIssuers","tags":["userSessionIssuers"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateUserSessionIssuer"}}},"/rpc/userSessions.list":{"get":{"description":"List issued user_sessions in the caller's project. refresh_token_hash is never returned.","operationId":"listUserSessions","parameters":[{"allowEmptyValue":true,"description":"Exact-match filter on subject URN.","in":"query","name":"subject_urn","schema":{"description":"Exact-match filter on subject URN.","type":"string"}},{"allowEmptyValue":true,"description":"Filter by user_session_issuer id.","in":"query","name":"user_session_issuer_id","schema":{"description":"Filter by user_session_issuer id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor: id of the last item from the previous page.","in":"query","name":"cursor","schema":{"description":"Pagination cursor: id of the last item from the previous page.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Page size (default 50, max 100).","in":"query","name":"limit","schema":{"description":"Page size (default 50, max 100).","format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserSessionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listUserSessions userSessions","tags":["userSessions"],"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"inputs":[{"in":"parameters","name":"cursor","type":"cursor"}],"outputs":{"nextCursor":"$.next_cursor"},"type":"cursor"},"x-speakeasy-react-hook":{"name":"UserSessions"}}},"/rpc/userSessions.revoke":{"post":{"description":"Push the session's jti into the revocation cache and soft-delete the row.","operationId":"revokeUserSession","parameters":[{"allowEmptyValue":true,"description":"The user_session id.","in":"query","name":"id","required":true,"schema":{"description":"The user_session id.","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revokeUserSession userSessions","tags":["userSessions"],"x-speakeasy-name-override":"revoke","x-speakeasy-react-hook":{"name":"RevokeUserSession"}}},"/rpc/variations.deleteGlobal":{"delete":{"description":"Create or update a globally defined tool variation.","operationId":"deleteGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"The ID of the variation to delete","in":"query","name":"variation_id","required":true,"schema":{"description":"The ID of the variation to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteGlobal variations","tags":["variations"],"x-speakeasy-name-override":"deleteGlobal","x-speakeasy-react-hook":{"name":"deleteGlobalVariation"}}},"/rpc/variations.listGlobal":{"get":{"description":"List globally defined tool variations.","operationId":"listGlobalVariations","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVariationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listGlobal variations","tags":["variations"],"x-speakeasy-name-override":"listGlobal","x-speakeasy-react-hook":{"name":"GlobalVariations"}}},"/rpc/variations.upsertGlobal":{"post":{"description":"Create or update a globally defined tool variation.","operationId":"upsertGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"upsertGlobal variations","tags":["variations"],"x-speakeasy-name-override":"upsertGlobal","x-speakeasy-react-hook":{"name":"UpsertGlobalVariation"}}}},"components":{"schemas":{"AccessMember":{"type":"object","properties":{"email":{"type":"string","description":"Email address."},"id":{"type":"string","description":"User ID."},"joined_at":{"type":"string","description":"When the member joined the organization.","format":"date-time"},"name":{"type":"string","description":"Display name."},"photo_url":{"type":"string","description":"Avatar URL."},"role_ids":{"type":"array","items":{"type":"string"},"description":"All role IDs assigned to this member."}},"required":["id","name","email","role_ids","joined_at"]},"AddDeploymentPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["name"]},"AddExternalMCPForm":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the external MCP server.","example":"My Slack Integration"},"organization_mcp_collection_registry_id":{"type":"string","description":"The ID of the internal collection registry the server is from.","format":"uuid"},"registry_id":{"type":"string","description":"The ID of the external MCP registry the server is from.","format":"uuid"},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry (e.g., 'slack', 'ai.exa/exa').","example":"slack"},"selected_remotes":{"type":"array","items":{"type":"string"},"description":"URLs of the remotes to use for this MCP server. If not provided, the backend will auto-select based on transport type preference.","example":["https://mcp.example.com/sse"]},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["name","slug","registry_server_specifier"]},"AddExternalOAuthServerForm":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","external_oauth_server"]},"AddExternalOAuthServerRequestBody":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"}},"required":["external_oauth_server"]},"AddFunctionsForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the functions file from the assets service."},"memory_mib":{"type":"integer","description":"The amount of memory in MiB to allocate for the function (1 MiB = 1024 * 1024 bytes).","format":"int64","minimum":0,"maximum":4096},"name":{"type":"string","description":"The functions file display name."},"runtime":{"type":"string","description":"The runtime to use when executing functions. Allowed values are: nodejs:22, nodejs:24, python:3.12."},"scale":{"type":"integer","description":"The number of instances to scale the function to.","format":"int64","minimum":0,"maximum":5},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug","runtime"]},"AddOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"AddOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"}},"required":["oauth_proxy_server"]},"AddOpenAPIv3DeploymentAssetForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"AddPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package to add."},"version":{"type":"string","description":"The version of the package to add. If omitted, the latest version will be used."}},"required":["name"]},"AddPluginServerForm":{"type":"object","properties":{"display_name":{"type":"string","description":"Display name for the server."},"plugin_id":{"type":"string","format":"uuid"},"policy":{"type":"string","default":"required","enum":["required","optional"]},"sort_order":{"type":"integer","default":0,"format":"int32"},"toolset_id":{"type":"string","description":"Gram toolset ID for the MCP server.","format":"uuid"}},"required":["plugin_id","toolset_id","display_name"]},"AdminListOrganizationMembersResult":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationMember"},"description":"The members of the organization."}},"required":["members"]},"AdminListOrganizationProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/AdminProject"},"description":"The projects belonging to the organization."}},"required":["projects"]},"AdminListOrganizationsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganization"},"description":"The page of organizations."}},"required":["organizations"]},"AdminOrganization":{"type":"object","properties":{"account_type":{"type":"string","description":"Gram account type (e.g. free, pro, enterprise)."},"created_at":{"type":"string","description":"The creation date of the organization.","format":"date-time"},"disabled_at":{"type":"string","description":"The time at which the organization was disabled, if any.","format":"date-time"},"free_trial_ends_at":{"type":"string","description":"The time at which the free trial ends.","format":"date-time"},"free_trial_started_at":{"type":"string","description":"The time at which the free trial started.","format":"date-time"},"id":{"type":"string","description":"The ID of the organization"},"member_count":{"type":"integer","description":"Number of active members in the organization.","format":"int64"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"},"updated_at":{"type":"string","description":"The last update date of the organization.","format":"date-time"},"whitelisted":{"type":"boolean","description":"Whether the organization is whitelisted for full access."},"workos_id":{"type":"string","description":"WorkOS organization ID, if linked."}},"description":"Organization details surfaced to admin operators.","required":["id","name","slug","account_type","whitelisted","member_count","created_at","updated_at"]},"AdminOrganizationMember":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"display_name":{"type":"string","description":"User display name."},"email":{"type":"string","description":"User email address."},"id":{"type":"string","description":"User ID."},"last_login":{"type":"string","description":"The time the user last logged in, if any.","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"description":"Organization member surfaced to admin operators.","required":["id","email","display_name","created_at","updated_at"]},"AdminProject":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"description":"Project summary surfaced to admin operators.","required":["id","name","slug","created_at","updated_at"]},"AdminProjectDetail":{"type":"object","properties":{"api_key_count":{"type":"integer","description":"Number of active API keys in the project.","format":"int64"},"assistant_count":{"type":"integer","description":"Number of active assistants in the project.","format":"int64"},"created_at":{"type":"string","format":"date-time"},"deployment_count":{"type":"integer","description":"Total number of deployments in the project.","format":"int64"},"environment_count":{"type":"integer","description":"Number of active environments in the project.","format":"int64"},"functions_runner_version":{"type":"string","description":"Functions runner version pin, if set."},"http_tool_count":{"type":"integer","description":"Number of active HTTP tool definitions in the project.","format":"int64"},"id":{"type":"string","description":"Project ID."},"logo_asset_id":{"type":"string","description":"Project logo asset ID, if set."},"name":{"type":"string","description":"Project name."},"organization_id":{"type":"string","description":"Owning organization ID."},"slug":{"type":"string","description":"Project slug."},"toolset_count":{"type":"integer","description":"Number of active toolsets in the project.","format":"int64"},"updated_at":{"type":"string","format":"date-time"}},"description":"Full project detail surfaced to admin operators, including aggregated counts of child resources.","required":["id","name","slug","organization_id","toolset_count","deployment_count","http_tool_count","environment_count","api_key_count","assistant_count","created_at","updated_at"]},"AllowedOrigin":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the allowed origin.","format":"date-time"},"id":{"type":"string","description":"The ID of the allowed origin"},"origin":{"type":"string","description":"The origin URL"},"project_id":{"type":"string","description":"The ID of the project"},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]},"updated_at":{"type":"string","description":"The last update date of the allowed origin.","format":"date-time"}},"required":["id","project_id","origin","status","created_at","updated_at"]},"ApproveShadowMCPRequestBody":{"type":"object","properties":{"match":{"type":"string","description":"The MCP server identifier to approve."},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"server_name":{"type":"string","description":"Display name of the MCP server (optional, for UI)."}},"required":["policy_id","match"]},"Asset":{"type":"object","properties":{"content_length":{"type":"integer","description":"The content length of the asset","format":"int64"},"content_type":{"type":"string","description":"The content type of the asset"},"created_at":{"type":"string","description":"The creation date of the asset.","format":"date-time"},"id":{"type":"string","description":"The ID of the asset"},"kind":{"type":"string","enum":["openapiv3","image","functions","chat_attachment","unknown"]},"sha256":{"type":"string","description":"The SHA256 hash of the asset"},"updated_at":{"type":"string","description":"The last update date of the asset.","format":"date-time"}},"required":["id","kind","sha256","content_type","content_length","created_at","updated_at"]},"Assistant":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"id":{"type":"string","description":"The assistant ID.","format":"uuid"},"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Maximum active warm runtimes for the assistant.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"project_id":{"type":"string","description":"The project ID owning the assistant.","format":"uuid"},"status":{"type":"string","description":"The assistant status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"warm_ttl_seconds":{"type":"integer","description":"Warm runtime TTL in seconds.","format":"int64"}},"required":["id","project_id","name","model","instructions","toolsets","warm_ttl_seconds","max_concurrency","status","created_at","updated_at"]},"AssistantMemory":{"type":"object","properties":{"assistant_id":{"type":"string","description":"The assistant ID owning the memory.","format":"uuid"},"content":{"type":"string","description":"The memory content."},"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"deleted_at":{"type":"string","description":"Timestamp at which the memory was soft-deleted.","format":"date-time"},"id":{"type":"string","description":"The assistant memory ID.","format":"uuid"},"last_access":{"type":"string","description":"Timestamp of the most recent access.","format":"date-time"},"superseded_at":{"type":"string","description":"Timestamp at which the memory was superseded by another memory.","format":"date-time"},"supersedes_id":{"type":"string","description":"The ID of the memory this one supersedes, if any.","format":"uuid"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags associated with the memory."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"valid_at":{"type":"string","description":"Timestamp at which the memory becomes valid.","format":"date-time"}},"required":["id","assistant_id","content","tags","created_at","updated_at","last_access","valid_at"]},"AssistantToolsetRef":{"type":"object","properties":{"environment_slug":{"type":"string","description":"Optional environment slug used when invoking the toolset."},"toolset_slug":{"type":"string","description":"The toolset slug exposed to the assistant."}},"required":["toolset_slug"]},"AttachServerRequestBody":{"type":"object","properties":{"collection_id":{"type":"string","description":"ID of the collection","format":"uuid"},"toolset_id":{"type":"string","description":"ID of the toolset to attach","format":"uuid"}},"required":["collection_id","toolset_id"]},"AuditLog":{"type":"object","properties":{"action":{"type":"string"},"actor_display_name":{"type":"string"},"actor_id":{"type":"string"},"actor_slug":{"type":"string"},"actor_type":{"type":"string"},"after_snapshot":{},"before_snapshot":{},"created_at":{"type":"string","description":"The creation date of the audit log.","format":"date-time"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"project_id":{"type":"string"},"project_slug":{"type":"string"},"subject_display_name":{"type":"string"},"subject_id":{"type":"string"},"subject_slug":{"type":"string"},"subject_type":{"type":"string"}},"required":["id","actor_id","actor_type","action","subject_id","subject_type","created_at"]},"AuditLogFacetOption":{"type":"object","properties":{"count":{"type":"integer","description":"The number of audit logs for this facet value","format":"int64"},"display_name":{"type":"string","description":"The display label shown for the facet value"},"value":{"type":"string","description":"The facet value used for filtering"}},"required":["value","display_name","count"]},"AuthzChallenge":{"type":"object","properties":{"evaluated_grant_count":{"type":"integer","description":"Total grants evaluated.","format":"int64"},"id":{"type":"string","description":"Unique challenge identifier."},"matched_grant_count":{"type":"integer","description":"Number of grants that matched.","format":"int64"},"operation":{"type":"string","enum":["require","require_any","filter"]},"organization_id":{"type":"string","description":"Organization the principal was acting in."},"outcome":{"type":"string","enum":["allow","deny","error"]},"photo_url":{"type":"string","description":"User avatar URL when available."},"principal_type":{"type":"string","description":"Kind of principal.","enum":["user","api_key","assistant"]},"principal_urn":{"type":"string","description":"Principal URN e.g. user:\u003cuuid\u003e or api_key:\u003cid\u003e."},"project_id":{"type":"string","description":"Project scope (empty for org-level checks)."},"reason":{"type":"string","enum":["grant_matched","no_grants","scope_unsatisfied","deny_grant","invalid_check","rbac_skipped_apikey","dev_override"]},"resolution_role_slug":{"type":"string","description":"Role slug assigned (when resolution_type=role_assigned)."},"resolution_type":{"type":"string","description":"How the challenge was resolved.","enum":["role_assigned","dismissed"]},"resolved_at":{"type":"string","description":"When the challenge was resolved by an admin.","format":"date-time"},"resolved_by":{"type":"string","description":"URN of the admin who resolved."},"resource_id":{"type":"string","description":"Resource ID of the check."},"resource_kind":{"type":"string","description":"Resource kind of the check."},"role_slugs":{"type":"array","items":{"type":"string"},"description":"Roles the principal had loaded."},"scope":{"type":"string","description":"Scope that was checked."},"timestamp":{"type":"string","description":"When the authz decision was made.","format":"date-time"},"user_email":{"type":"string","description":"Email when available."}},"required":["id","timestamp","organization_id","principal_urn","principal_type","operation","outcome","reason","scope","role_slugs","evaluated_grant_count","matched_grant_count"]},"BaseResourceAttributes":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"description":{"type":"string","description":"Description of the resource"},"id":{"type":"string","description":"The ID of the resource"},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"}},"description":"Common attributes shared by all resource types","required":["id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"BaseToolAttributes":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"Common attributes shared by all tool types","required":["id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"CanonicalToolAttributes":{"type":"object","properties":{"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"description":{"type":"string","description":"Description of the tool"},"name":{"type":"string","description":"The name of the tool"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"variation_id":{"type":"string","description":"The ID of the variation that was applied to the tool"}},"description":"The original details of a tool","required":["variation_id","name","description"]},"CaptureEventPayload":{"type":"object","properties":{"distinct_id":{"type":"string","description":"Distinct ID for the user or entity (defaults to organization ID if not provided)"},"event":{"type":"string","description":"Event name","example":"button_clicked","minLength":1,"maxLength":255},"properties":{"type":"object","description":"Event properties as key-value pairs","example":{"button_name":"submit","page":"checkout","value":100},"additionalProperties":true}},"description":"Payload for capturing a telemetry event","required":["event"]},"CaptureEventResult":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the event was successfully captured"}},"description":"Result of capturing a telemetry event","required":["success"]},"ChallengeBucket":{"type":"object","properties":{"challenge_count":{"type":"integer","description":"Number of individual challenges in this bucket.","format":"int64"},"challenge_ids":{"type":"array","items":{"type":"string"},"description":"IDs of all challenges in this bucket."},"evaluated_grant_count":{"type":"integer","description":"Total grants evaluated.","format":"int64"},"first_seen":{"type":"string","description":"Timestamp of the earliest challenge in the bucket.","format":"date-time"},"id":{"type":"string","description":"ID of the most recent challenge in the bucket."},"last_seen":{"type":"string","description":"Timestamp of the most recent challenge in the bucket.","format":"date-time"},"matched_grant_count":{"type":"integer","description":"Number of grants that matched.","format":"int64"},"operation":{"type":"string","enum":["require","require_any","filter"]},"organization_id":{"type":"string","description":"Organization the principal was acting in."},"outcome":{"type":"string","enum":["allow","deny","error"]},"photo_url":{"type":"string","description":"User avatar URL when available."},"principal_type":{"type":"string","description":"Kind of principal.","enum":["user","api_key","assistant"]},"principal_urn":{"type":"string","description":"Principal URN e.g. user:\u003cuuid\u003e or api_key:\u003cid\u003e."},"project_id":{"type":"string","description":"Project scope (empty for org-level checks)."},"reason":{"type":"string","enum":["grant_matched","no_grants","scope_unsatisfied","deny_grant","invalid_check","rbac_skipped_apikey","dev_override"]},"resolution_role_slug":{"type":"string","description":"Role slug assigned (when resolution_type=role_assigned)."},"resolution_type":{"type":"string","description":"How the bucket was resolved.","enum":["role_assigned","dismissed"]},"resolved_at":{"type":"string","description":"When the bucket was resolved by an admin.","format":"date-time"},"resolved_by":{"type":"string","description":"URN of the admin who resolved."},"resource_id":{"type":"string","description":"Resource ID of the check."},"resource_kind":{"type":"string","description":"Resource kind of the check."},"role_slugs":{"type":"array","items":{"type":"string"},"description":"Roles the principal had loaded."},"scope":{"type":"string","description":"Scope that was checked."},"user_email":{"type":"string","description":"Email when available."}},"description":"A group of consecutive challenges with the same dimensions that occurred within a 10-minute window.","required":["id","last_seen","first_seen","organization_id","principal_urn","principal_type","operation","outcome","reason","scope","role_slugs","evaluated_grant_count","matched_grant_count","challenge_count","challenge_ids"]},"ChallengeResolution":{"type":"object","properties":{"challenge_id":{"type":"string","description":"ClickHouse challenge ID."},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"Resolution record ID."},"organization_id":{"type":"string","description":"Organization ID."},"principal_urn":{"type":"string","description":"Denied principal."},"resolution_type":{"type":"string","enum":["role_assigned","dismissed"]},"resolved_by":{"type":"string","description":"Admin who resolved."},"resource_id":{"type":"string","description":"Resource ID."},"resource_kind":{"type":"string","description":"Resource kind."},"role_slug":{"type":"string","description":"Assigned role slug."},"scope":{"type":"string","description":"Denied scope."}},"required":["id","organization_id","challenge_id","principal_urn","scope","resolution_type","resolved_by","created_at"]},"Chat":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The list of messages in the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["messages","id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatMessage":{"type":"object","properties":{"content":{"description":"The content of the message — string for plain text, array for multimodal/tool-call content parts, null for assistant messages that only carry tool_calls"},"created_at":{"type":"string","description":"When the message was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the message"},"finish_reason":{"type":"string","description":"The finish reason of the message"},"generation":{"type":"integer","description":"Conversation generation — bumps on compaction or edit divergence","format":"int64"},"id":{"type":"string","description":"The ID of the message"},"model":{"type":"string","description":"The model that generated the message"},"role":{"type":"string","description":"The role of the message"},"tool_call_id":{"type":"string","description":"The tool call ID of the message"},"tool_calls":{"type":"string","description":"The tool calls in the message as a JSON blob"},"user_id":{"type":"string","description":"The ID of the user who created the message"}},"required":["id","role","model","created_at","generation"]},"ChatOverview":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatOverviewWithResolutions":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"last_message_timestamp":{"type":"string","description":"When the last message in the chat was created.","format":"date-time"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChatResolution"},"description":"List of resolutions for this chat"},"risk_findings_count":{"type":"integer","description":"Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.","format":"int64"},"source":{"type":"string","description":"The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)"},"title":{"type":"string","description":"The title of the chat"},"total_cost":{"type":"number","description":"Total cost in USD for this chat","format":"double"},"total_input_tokens":{"type":"integer","description":"Total input tokens used in this chat","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used in this chat","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens (input + output) used in this chat","format":"int64"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"description":"Chat overview with embedded resolution data","required":["resolutions","id","title","num_messages","created_at","updated_at","last_message_timestamp"]},"ChatResolution":{"type":"object","properties":{"created_at":{"type":"string","description":"When resolution was created","format":"date-time"},"id":{"type":"string","description":"Resolution ID","format":"uuid"},"message_ids":{"type":"array","items":{"type":"string"},"description":"Message IDs associated with this resolution","example":["abc-123","def-456"]},"resolution":{"type":"string","description":"Resolution status"},"resolution_notes":{"type":"string","description":"Notes about the resolution"},"score":{"type":"integer","description":"Score 0-100","format":"int64"},"user_goal":{"type":"string","description":"User's intended goal"}},"description":"Resolution information for a chat","required":["id","user_goal","resolution","resolution_notes","score","created_at","message_ids"]},"ChatSummary":{"type":"object","properties":{"duration_seconds":{"type":"number","description":"Chat session duration in seconds","format":"double"},"end_time_unix_nano":{"type":"string","description":"Latest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"gram_chat_id":{"type":"string","description":"Chat session ID"},"log_count":{"type":"integer","description":"Total number of logs in this chat session","format":"int64"},"message_count":{"type":"integer","description":"Number of LLM completion messages in this chat session","format":"int64"},"model":{"type":"string","description":"LLM model used in this chat session"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"status":{"type":"string","description":"Chat session status","enum":["success","error"]},"tool_call_count":{"type":"integer","description":"Number of tool calls in this chat session","format":"int64"},"total_input_tokens":{"type":"integer","description":"Total input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens used (input + output)","format":"int64"},"user_id":{"type":"string","description":"User ID associated with this chat session"}},"description":"Summary information for a chat session","required":["gram_chat_id","start_time_unix_nano","end_time_unix_nano","log_count","tool_call_count","message_count","duration_seconds","status","total_input_tokens","total_output_tokens","total_tokens"]},"ClaudeHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"cwd":{"type":"string","description":"The working directory when the event fired"},"error":{"description":"The error from the tool (PostToolUseFailure only)"},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PostToolUse","PostToolUseFailure","UserPromptSubmit","Stop","SessionEnd","Notification"]},"is_interrupt":{"type":"boolean","description":"Whether the failure was caused by user interruption (PostToolUseFailure only)"},"last_assistant_message":{"type":"string","description":"Claude's final response text (Stop only)"},"message":{"type":"string","description":"Notification message text (Notification only)"},"model":{"type":"string","description":"The model identifier (SessionStart, Stop)"},"notification_type":{"type":"string","description":"Type of notification: permission_prompt, idle_prompt, auth_success, elicitation_dialog (Notification only)"},"prompt":{"type":"string","description":"The user's prompt text (UserPromptSubmit only)"},"reason":{"type":"string","description":"Why the session ended (SessionEnd only)"},"session_id":{"type":"string","description":"The Claude Code session ID"},"source":{"type":"string","description":"How the session started: startup, resume, clear, compact (SessionStart only)"},"stop_hook_active":{"type":"boolean","description":"Whether a stop hook continuation is active (Stop only)"},"title":{"type":"string","description":"Notification title (Notification only)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool (for tool-related events)"},"tool_response":{"description":"The response from the tool (PostToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"},"transcript_path":{"type":"string","description":"Path to the conversation transcript file"}},"description":"Unified payload for all Claude Code hook events","required":["hook_event_name"]},"ClaudeHookResult":{"type":"object","properties":{"continue":{"type":"boolean","description":"Whether to continue (SessionStart only)"},"decision":{"type":"string","description":"Top-level block decision for UserPromptSubmit / PostToolUse / Stop / SubagentStop. Use 'block' to halt processing."},"hookSpecificOutput":{"description":"Hook-specific output as JSON object"},"reason":{"type":"string","description":"Reason accompanying decision; shown to the user (UserPromptSubmit) or Claude (PostToolUse/Stop)."},"stopReason":{"type":"string","description":"Reason if blocked (SessionStart only)"},"suppressOutput":{"type":"boolean","description":"Whether to suppress the hook's output"},"systemMessage":{"type":"string","description":"Warning message shown to the user in the terminal"}},"description":"Unified result for all Claude Code hook events with proper response structure"},"CloneClientFromOAuthProxyProviderForm":{"type":"object","properties":{"audience":{"type":"string","description":"Optional upstream OAuth audience to send on the authorize redirect and token exchange for the cloned client.","pattern":"^[!-~]+$","maxLength":512},"oauth_proxy_provider_id":{"type":"string","description":"The oauth_proxy_provider to read client_id / client_secret from. Must live in the caller's project.","format":"uuid"},"remote_session_issuer_id":{"type":"string","description":"The remote_session_issuer the new client is registered with.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Explicit upstream OAuth scopes the dance should request for the cloned client. Omit to fall back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the cloned client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer the new client is paired with.","format":"uuid"}},"description":"Form for cloning an oauth_proxy_provider's client credentials into a new remote_session_client. The caller supplies the existing oauth_proxy_provider, plus the remote_session_issuer and user_session_issuer to pair the new client with.","required":["oauth_proxy_provider_id","remote_session_issuer_id","user_session_issuer_id"]},"CloneEnvironmentForm":{"type":"object","properties":{"copy_values":{"type":"boolean","description":"If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values."},"new_name":{"type":"string","description":"The name for the new cloned environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for cloning an existing environment into a new one","required":["slug","new_name"]},"CloneEnvironmentRequestBody":{"type":"object","properties":{"copy_values":{"type":"boolean","description":"If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values."},"new_name":{"type":"string","description":"The name for the new cloned environment"}},"required":["new_name"]},"CodexHookPayload":{"type":"object","properties":{"cwd":{"type":"string","description":"The working directory when the event fired"},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PermissionRequest","PostToolUse","UserPromptSubmit","Stop"]},"model":{"type":"string","description":"The model identifier"},"permission_type":{"type":"string","description":"The type of permission being requested (PermissionRequest only)"},"prompt":{"type":"string","description":"The user's prompt text (UserPromptSubmit only)"},"session_id":{"type":"string","description":"The Codex session ID"},"tool_input":{"description":"The input to the tool (PreToolUse only)"},"tool_name":{"type":"string","description":"The name of the tool"},"tool_output":{"description":"The output from the tool (PostToolUse only)"},"transcript_path":{"type":"string","description":"Path to the conversation transcript file"}},"description":"Payload for Codex hook events","required":["hook_event_name"]},"CodexHookResult":{"type":"object","properties":{"decision":{"type":"string","description":"Permission decision for blocking events: allow or deny"},"reason":{"type":"string","description":"Reason for the decision, shown to the user"}},"description":"Result for Codex hook events"},"ConfigureSlackAppRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"slack_client_id":{"type":"string","description":"Slack app Client ID"},"slack_client_secret":{"type":"string","description":"Slack app Client Secret"},"slack_signing_secret":{"type":"string","description":"Slack app Signing Secret"}},"required":["id","slack_client_id","slack_client_secret","slack_signing_secret"]},"CreateAssistantForm":{"type":"object","properties":{"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Optional maximum active warm runtimes.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"status":{"type":"string","description":"Optional initial status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"warm_ttl_seconds":{"type":"integer","description":"Optional warm runtime TTL in seconds.","format":"int64"}},"required":["name","model","instructions","toolsets"]},"CreateDeploymentForm":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}},"required":["idempotency_key"]},"CreateDeploymentRequestBody":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}}},"CreateDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"CreateDomainRequestBody":{"type":"object","properties":{"domain":{"type":"string","description":"The custom domain"}},"required":["domain"]},"CreateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment variable entries"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"}},"description":"Form for creating a new environment","required":["organization_id","name","entries"]},"CreateKeyForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes of the key that determines its permissions.","minItems":1}},"required":["name","scopes"]},"CreateMcpEndpointForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to register the endpoint slug under. Omit for a platform-domain endpoint.","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128}},"description":"Form for creating a new MCP endpoint. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.","required":["mcp_server_id","slug"]},"CreateMcpServerForm":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to associate with the server","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server"},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server to use as the backend","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset to use as the backend","format":"uuid"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication. When set, MCP clients are required to authenticate against this issuer before connecting.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"Form for creating a new MCP server. Exactly one of remote_mcp_server_id or toolset_id must be provided.","required":["name","visibility"]},"CreatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"name":{"type":"string","description":"The name of the package","pattern":"^[a-z0-9_-]{1,128}$","maxLength":100},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["name","title","summary"]},"CreatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"CreatePluginForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description."},"name":{"type":"string","description":"Display name for the plugin."},"slug":{"type":"string","description":"Optional URL-safe identifier. Auto-generated from name if omitted."}},"required":["name"]},"CreatePortalSessionResult":{"type":"object","properties":{"token":{"type":"string","description":"Front-end token for the webhook portal session."},"url":{"type":"string","description":"URL for the webhook portal session."}},"required":["url","token"]},"CreateProjectForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"},"session_token":{"type":"string"}},"required":["organization_id","name"]},"CreateProjectRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"}},"required":["organization_id","name"]},"CreateProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"CreatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["name","prompt","engine","kind"]},"CreatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"CreateRemoteSessionClientForm":{"type":"object","properties":{"audience":{"type":"string","description":"Optional upstream OAuth audience to send on the authorize redirect and token exchange.","pattern":"^[!-~]+$","maxLength":512},"client_id":{"type":"string","description":"client_id supplied by the caller."},"client_secret":{"type":"string","description":"client_secret supplied by the caller. Gram encrypts before persisting."},"remote_session_issuer_id":{"type":"string","description":"The owning remote_session_issuer id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this client is paired with.","format":"uuid"}},"description":"Form for creating a remote_session_client. Caller supplies client_id (and optional client_secret) obtained out-of-band from the upstream issuer.","required":["remote_session_issuer_id","user_session_issuer_id","client_id"]},"CreateRemoteSessionIssuerForm":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"Grant types advertised by the issuer."},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour. Default false."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer. Default false."},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; absent for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"},"description":"Response types advertised by the issuer."},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"Scopes advertised by the issuer."},"slug":{"type":"string","description":"Project-unique slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Token endpoint auth methods advertised by the issuer."}},"description":"Form for creating a remote_session_issuer.","required":["slug","issuer"]},"CreateRequestBody":{"type":"object","properties":{"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds (max / default 3600)","default":3600,"format":"int64","minimum":1,"maximum":3600},"user_identifier":{"type":"string","description":"Optional free-form user identifier"}},"required":["embed_origin"]},"CreateRequestBody2":{"type":"object","properties":{"description":{"type":"string","description":"Description of the collection","maxLength":500},"mcp_registry_namespace":{"type":"string","description":"Registry namespace (e.g., 'com.speakeasy.acme.my-tools')","minLength":1,"maxLength":200},"name":{"type":"string","description":"Display name for the collection","minLength":1,"maxLength":100},"slug":{"type":"string","description":"URL-friendly identifier for the collection","minLength":1,"maxLength":60},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to the collection"},"visibility":{"type":"string","description":"Visibility of the collection","default":"private","enum":["public","private"]}},"required":["name","slug","mcp_registry_namespace"]},"CreateResponseBody":{"type":"object","properties":{"client_token":{"type":"string","description":"JWT token for chat session"},"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds","format":"int64"},"status":{"type":"string","description":"Session status"},"user_identifier":{"type":"string","description":"User identifier if provided"}},"required":["embed_origin","client_token","expires_after","status"]},"CreateRiskPolicyRequestBody":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag or block.","default":"flag","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name should be auto-generated."},"enabled":{"type":"boolean","description":"Whether the policy is active."},"name":{"type":"string","description":"The policy name. If omitted, a name will be auto-generated."},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to detect."},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids to enable in addition to the heuristic baseline (e.g. 'deberta-v3-classifier')."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources to enable."},"user_message":{"type":"string","description":"Optional message shown to end users when this policy blocks an action or surfaces a flagged finding."}}},"CreateRoleForm":{"type":"object","properties":{"description":{"type":"string","description":"Description of what this role can do."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Scope grants to assign."},"member_ids":{"type":"array","items":{"type":"string"},"description":"Optional member IDs to additionally assign to this role on creation."},"name":{"type":"string","description":"Display name for the role."}},"required":["name","description","grants"]},"CreateServerForm":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/HeaderInput"},"description":"Headers to send when proxying requests to the remote server"},"name":{"type":"string","description":"Optional human-readable name for the remote MCP server. Empty values are stored as null."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server (e.g. streamable-http)"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"Form for creating a new remote MCP server","required":["url","transport_type","headers"]},"CreateSignedChatAttachmentURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLForm2":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLResult":{"type":"object","properties":{"expires_at":{"type":"string","description":"When the signed URL expires","format":"date-time"},"url":{"type":"string","description":"The signed URL to access the chat attachment"}},"required":["url","expires_at"]},"CreateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"name":{"type":"string","description":"Display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to this app"}},"required":["name","toolset_ids"]},"CreateSlackAppResult":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/SlackAppResult"}},"required":["app"]},"CreateToolsetForm":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_slug_input":{"type":"string"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateToolsetRequestBody":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateTriggerInstanceForm":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"definition_slug":{"type":"string","description":"The trigger definition slug."},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"status":{"type":"string","description":"Optional initial status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The trigger target kind.","enum":["assistant","noop"]},"target_ref":{"type":"string","description":"The opaque target reference."}},"required":["definition_slug","name","target_kind","target_ref","target_display","config"]},"CreateUserSessionIssuerForm":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"How multi-remote authn challenges are presented: chain | interactive.","enum":["chain","interactive"]},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Project-unique slug."}},"description":"Form for creating a user_session_issuer.","required":["slug","authn_challenge_mode","session_duration_hours"]},"CreditUsageResponseBody":{"type":"object","properties":{"credits_used":{"type":"number","description":"The number of credits remaining","format":"double"},"monthly_credits":{"type":"integer","description":"The number of monthly credits","format":"int64"}},"required":["credits_used","monthly_credits"]},"CursorHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"cache_read_tokens":{"type":"integer","description":"Tokens read from cache (stop, afterAgentResponse)","format":"int64"},"cache_write_tokens":{"type":"integer","description":"Tokens written to cache (stop, afterAgentResponse)","format":"int64"},"command":{"type":"string","description":"Command string for command-based MCP servers (beforeMCPExecution / afterMCPExecution only)"},"composer_mode":{"type":"string","description":"The composer mode, e.g. agent (beforeSubmitPrompt only)"},"conversation_id":{"type":"string","description":"The Cursor conversation ID"},"cursor_version":{"type":"string","description":"The Cursor IDE version"},"duration":{"type":"number","description":"Execution duration in milliseconds, excluding approval wait time (afterMCPExecution only)","format":"double"},"duration_ms":{"type":"integer","description":"Duration in milliseconds for the thinking block (afterAgentThought only)","format":"int64"},"error":{"description":"The error from the tool (postToolUseFailure only)"},"generation_id":{"type":"string","description":"The Cursor generation ID"},"hook_event_name":{"type":"string","description":"The type of hook event (e.g. beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, afterMCPExecution)"},"input_tokens":{"type":"integer","description":"Total input tokens used (stop, afterAgentResponse)","format":"int64"},"is_interrupt":{"type":"boolean","description":"Whether the failure was caused by user interruption"},"loop_count":{"type":"integer","description":"Number of agentic loops executed (stop only)","format":"int64"},"model":{"type":"string","description":"The model being used"},"output_tokens":{"type":"integer","description":"Total output tokens used (stop, afterAgentResponse)","format":"int64"},"prompt":{"type":"string","description":"The user's prompt text (beforeSubmitPrompt only)"},"result_json":{"type":"string","description":"JSON-encoded string of the MCP tool response (afterMCPExecution only)"},"session_id":{"type":"string","description":"The session ID from Cursor"},"status":{"type":"string","description":"Completion status, e.g. completed (stop only)"},"text":{"type":"string","description":"The assistant's response text (afterAgentResponse) or thinking text (afterAgentThought)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool"},"tool_response":{"description":"The response from the tool (postToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"},"transcript_path":{"type":"string","description":"Path to the conversation transcript JSONL file"},"url":{"type":"string","description":"URL of the MCP server (beforeMCPExecution / afterMCPExecution, URL-based servers only)"},"user_email":{"type":"string","description":"Email of the authenticated Cursor user, if available"}},"description":"Payload for Cursor hook events","required":["hook_event_name"]},"CursorHookResult":{"type":"object","properties":{"additional_context":{"type":"string","description":"Additional context to inject into the conversation"},"agent_message":{"type":"string","description":"Message sent back to the agent (beforeMCPExecution only)"},"permission":{"type":"string","description":"Permission decision for preToolUse / beforeMCPExecution: allow, deny, or ask"},"user_message":{"type":"string","description":"Message to display to the user"}},"description":"Result for Cursor hook events"},"CustomDomain":{"type":"object","properties":{"activated":{"type":"boolean","description":"Whether the domain is activated in ingress"},"created_at":{"type":"string","description":"When the custom domain was created.","format":"date-time"},"domain":{"type":"string","description":"The custom domain name"},"id":{"type":"string","description":"The ID of the custom domain"},"is_updating":{"type":"boolean","description":"The custom domain is actively being registered"},"organization_id":{"type":"string","description":"The ID of the organization this domain belongs to"},"updated_at":{"type":"string","description":"When the custom domain was last updated.","format":"date-time"},"verified":{"type":"boolean","description":"Whether the domain is verified"}},"required":["id","organization_id","domain","verified","activated","created_at","updated_at","is_updating"]},"CustomDomainMcpEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the MCP endpoint","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the parent MCP server","format":"uuid"},"mcp_server_name":{"type":"string","description":"The display name of the parent MCP server. May be empty if the parent has no configured name."},"mcp_server_slug":{"type":"string","description":"The url-friendly slug of the parent MCP server. May be empty if the parent has no configured slug."},"project_id":{"type":"string","description":"The ID of the project the endpoint belongs to","format":"uuid"},"project_name":{"type":"string","description":"The display name of the project the endpoint belongs to"},"project_slug":{"type":"string","description":"The url-friendly slug of the project the endpoint belongs to"},"slug":{"type":"string","description":"The endpoint slug"}},"description":"An MCP endpoint registered under a custom domain, with its parent MCP server and project denormalised for display in the dashboard's delete-impact preview.","required":["id","slug","project_id","project_name","project_slug","mcp_server_id"]},"DeleteGlobalToolVariationForm":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation to delete"}},"required":["variation_id"]},"DeleteGlobalToolVariationResult":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation that was deleted"}},"required":["variation_id"]},"DeleteRequestBody":{"type":"object","properties":{"override_id":{"type":"string","description":"Override ID to delete"}},"required":["override_id"]},"Deployment":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"DeploymentExternalMCP":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment external MCP record."},"name":{"type":"string","description":"The display name for the external MCP server."},"organization_mcp_collection_registry_id":{"type":"string","description":"The ID of the internal collection registry the server is from."},"registry_id":{"type":"string","description":"The ID of the external MCP registry the server is from."},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug","registry_server_specifier"]},"DeploymentFunctions":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"memory_mib":{"type":"integer","description":"The memory limit in MiB of function runner machines.","format":"int32"},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"runtime":{"type":"string","description":"The runtime to use when executing functions."},"scale":{"type":"integer","description":"The number of instances to run for the function.","format":"int32"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug","runtime"]},"DeploymentLogEvent":{"type":"object","properties":{"attachment_id":{"type":"string","description":"The ID of the asset tied to the log event"},"attachment_type":{"type":"string","description":"The type of the asset tied to the log event"},"created_at":{"type":"string","description":"The creation date of the log event"},"event":{"type":"string","description":"The type of event that occurred"},"id":{"type":"string","description":"The ID of the log event"},"message":{"type":"string","description":"The message of the log event"}},"required":["id","created_at","event","message"]},"DeploymentPackage":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment package."},"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["id","name","version"]},"DeploymentSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_mcp_asset_count":{"type":"integer","description":"The number of external MCP server assets.","format":"int64"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"functions_asset_count":{"type":"integer","description":"The number of Functions assets.","format":"int64"},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"openapiv3_asset_count":{"type":"integer","description":"The number of upstream OpenAPI assets.","format":"int64"},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","user_id","status","openapiv3_asset_count","openapiv3_tool_count","functions_asset_count","functions_tool_count","external_mcp_asset_count","external_mcp_tool_count"]},"DiscoverRemoteSessionIssuerRequestBody":{"type":"object","properties":{"issuer":{"type":"string","description":"Issuer URL to discover (e.g. https://login.linear.com)."}},"required":["issuer"]},"Environment":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment","format":"date-time"},"description":{"type":"string","description":"The description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntry"},"description":"List of environment entries"},"id":{"type":"string","description":"The ID of the environment"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"},"project_id":{"type":"string","description":"The project ID this environment belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the environment was last updated","format":"date-time"}},"description":"Model representing an environment","required":["id","organization_id","project_id","name","slug","entries","created_at","updated_at"]},"EnvironmentEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment entry","format":"date-time"},"name":{"type":"string","description":"The name of the environment variable"},"updated_at":{"type":"string","description":"When the environment entry was last updated","format":"date-time"},"value":{"type":"string","description":"Redacted values of the environment variable"},"value_hash":{"type":"string","description":"Hash of the value to identify matching values across environments without exposing the actual value"}},"description":"A single environment entry","required":["name","value","value_hash","created_at","updated_at"]},"EnvironmentEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment variable"},"value":{"type":"string","description":"The value of the environment variable"}},"description":"A single environment entry","required":["name","value"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"description":"unauthorized access","required":["name","id","message","temporary","timeout","fault"]},"EvolveForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to evolve. If omitted, the latest deployment will be used."},"exclude_external_mcps":{"type":"array","items":{"type":"string"},"description":"The external MCP servers, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_functions":{"type":"array","items":{"type":"string"},"description":"The functions, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_openapiv3_assets":{"type":"array","items":{"type":"string"},"description":"The OpenAPI 3.x documents, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_packages":{"type":"array","items":{"type":"string"},"description":"The packages to exclude from the new deployment when cloning a previous deployment."},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"upsert_external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"},"description":"The external MCP servers to upsert in the new deployment."},"upsert_functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"},"description":"The tool functions to upsert in the new deployment."},"upsert_openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"},"description":"The OpenAPI 3.x documents to upsert in the new deployment."},"upsert_packages":{"type":"array","items":{"$ref":"#/components/schemas/AddPackageForm"},"description":"The packages to upsert in the new deployment."}}},"EvolveResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"ExportMcpMetadataRequestBody":{"type":"object","properties":{"mcp_slug":{"type":"string","description":"The MCP server slug (from the install URL)","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["mcp_slug"]},"ExternalMCPHeaderDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"header_name":{"type":"string","description":"The actual HTTP header name to send (e.g., X-Api-Key)"},"name":{"type":"string","description":"The prefixed environment variable name (e.g., SLACK_X_API_KEY)"},"placeholder":{"type":"string","description":"Placeholder value for the header"},"required":{"type":"boolean","description":"Whether the header is required"},"secret":{"type":"boolean","description":"Whether the header value is secret"}},"required":["name","header_name","required","secret"]},"ExternalMCPRemote":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemoteHeader"},"description":"HTTP headers the MCP client should collect and send when connecting to this remote"},"transport_type":{"type":"string","description":"Transport type (sse or streamable-http)","enum":["sse","streamable-http"]},"url":{"type":"string","description":"URL of the remote endpoint","format":"uri"},"variables":{"type":"object","description":"URL template variables for this remote endpoint","additionalProperties":{"$ref":"#/components/schemas/ExternalMCPRemoteVariable"}}},"description":"A remote endpoint for an MCP server","required":["url","transport_type"]},"ExternalMCPRemoteHeader":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"is_required":{"type":"boolean","description":"Whether this header is required"},"is_secret":{"type":"boolean","description":"Whether this header value should be treated as secret"},"name":{"type":"string","description":"Header name"},"placeholder":{"type":"string","description":"Placeholder value to show when collecting this header"}},"description":"A header requirement for a remote MCP server","required":["name"]},"ExternalMCPRemoteVariable":{"type":"object","properties":{"choices":{"type":"array","items":{"type":"string"},"description":"Allowed values for the variable"},"default":{"type":"string","description":"Default value for the variable"},"description":{"type":"string","description":"Description of the variable"},"is_required":{"type":"boolean","description":"Whether this variable is required"},"is_secret":{"type":"boolean","description":"Whether this variable value should be treated as secret"}},"description":"A URL template variable for a remote MCP server"},"ExternalMCPServer":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the server does"},"icon_url":{"type":"string","description":"URL to the server's icon","format":"uri"},"meta":{"description":"Opaque metadata from the registry"},"organization_mcp_collection_registry_id":{"type":"string","description":"ID of the internal collection registry this server came from","format":"uuid"},"registry_id":{"type":"string","description":"ID of the external MCP registry this server came from","format":"uuid"},"registry_specifier":{"type":"string","description":"Server specifier used to look up in the registry (e.g., 'io.github.user/server')","example":"io.modelcontextprotocol.anonymous/exa"},"remotes":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemote"},"description":"Available remote endpoints for the server"},"title":{"type":"string","description":"Display name for the server"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPTool"},"description":"Tools available on the server"},"toolset_id":{"type":"string","description":"ID of the attached toolset when this server is listed from a Collection","format":"uuid"},"version":{"type":"string","description":"Semantic version of the server","example":"1.0.0"}},"description":"An MCP server from an external registry","required":["registry_specifier","version","description"]},"ExternalMCPTool":{"type":"object","properties":{"annotations":{"description":"Annotations for the tool"},"description":{"type":"string","description":"Description of the tool"},"input_schema":{"description":"Input schema for the tool"},"name":{"type":"string","description":"Name of the tool"}}},"ExternalMCPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_external_mcp_id":{"type":"string","description":"The ID of the deployments_external_mcps record"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"oauth_authorization_endpoint":{"type":"string","description":"The OAuth authorization endpoint URL"},"oauth_registration_endpoint":{"type":"string","description":"The OAuth dynamic client registration endpoint URL"},"oauth_scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by the server"},"oauth_token_endpoint":{"type":"string","description":"The OAuth token endpoint URL"},"oauth_version":{"type":"string","description":"OAuth version: '2.1' (MCP OAuth), '2.0' (legacy), or 'none'"},"project_id":{"type":"string","description":"The ID of the project"},"registry_id":{"type":"string","description":"The ID of the MCP registry"},"registry_server_name":{"type":"string","description":"The name of the external MCP server (e.g., exa)"},"registry_specifier":{"type":"string","description":"The specifier of the external MCP server (e.g., 'io.modelcontextprotocol.anonymous/exa')"},"remote_url":{"type":"string","description":"The URL to connect to the MCP server"},"requires_oauth":{"type":"boolean","description":"Whether the external MCP server requires OAuth authentication"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"slug":{"type":"string","description":"The slug used for tool prefixing (e.g., github)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"transport_type":{"type":"string","description":"The transport type used to connect to the MCP server","enum":["streamable-http","sse"]},"type":{"type":"string","description":"Whether or not the tool is a proxy tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A proxy tool that references an external MCP server","required":["deployment_external_mcp_id","deployment_id","registry_specifier","registry_server_name","registry_id","slug","remote_url","transport_type","requires_oauth","oauth_version","created_at","updated_at","id","project_id","name","canonical_name","description","schema","tool_urn"]},"ExternalOAuthServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the external OAuth server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the external OAuth server"},"metadata":{"description":"The metadata for the external OAuth server"},"project_id":{"type":"string","description":"The project ID this external OAuth server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the external OAuth server was last updated.","format":"date-time"}},"required":["id","project_id","slug","metadata","created_at","updated_at"]},"ExternalOAuthServerForm":{"type":"object","properties":{"metadata":{"description":"The metadata for the external OAuth server"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","metadata"]},"FetchOpenAPIv3FromURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FetchOpenAPIv3FromURLForm2":{"type":"object","properties":{"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FilterOption":{"type":"object","properties":{"count":{"type":"integer","description":"Number of events for this option","format":"int64"},"id":{"type":"string","description":"Unique identifier for the option"},"label":{"type":"string","description":"Display label for the option"}},"description":"A single filter option (API key or user)","required":["id","label","count"]},"FunctionEnvironmentVariable":{"type":"object","properties":{"auth_input_type":{"type":"string","description":"Optional value of the function variable comes from a specific auth input"},"description":{"type":"string","description":"Description of the function environment variable"},"name":{"type":"string","description":"The environment variables"}},"required":["name"]},"FunctionResourceDefinition":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the resource"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the resource"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"},"variables":{"description":"Variables configuration for the resource"}},"description":"A function resource","required":["deployment_id","function_id","runtime","id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"FunctionToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the tool"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variables":{"description":"Variables configuration for the function"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A function tool","required":["deployment_id","asset_id","function_id","runtime","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"GenerateTitleResponseBody":{"type":"object","properties":{"title":{"type":"string","description":"The generated title"}},"required":["title"]},"GetActiveDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetDeploymentForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment"}},"required":["id"]},"GetDeploymentLogsForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"},"deployment_id":{"type":"string","description":"The ID of the deployment"}},"required":["deployment_id"]},"GetDeploymentLogsResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLogEvent"},"description":"The logs for the deployment"},"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"status":{"type":"string","description":"The status of the deployment"}},"required":["events","status"]},"GetDeploymentResult":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"GetHooksSummaryPayload":{"type":"object","properties":{"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions (same as listHooksTraces)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"types_to_include":{"type":"array","items":{"type":"string","enum":["mcp","local","skill"]},"description":"Hook types to include (mcp, local, skill). If empty, includes all types.","example":["mcp","skill"]}},"description":"Payload for getting aggregated hooks metrics","required":["from","to"]},"GetHooksSummaryResult":{"type":"object","properties":{"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/HooksBreakdownRow"},"description":"Cross-dimensional pivot: (user, server, source, tool) x counts"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/HooksServerSummary"},"description":"Aggregated metrics grouped by server"},"skill_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/SkillBreakdownRow"},"description":"Per-user skill breakdown"},"skill_time_series":{"type":"array","items":{"$ref":"#/components/schemas/SkillTimeSeriesPoint"},"description":"Time-bucketed event counts by skill"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillSummary"},"description":"Aggregated metrics grouped by skill"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/HooksTimeSeriesPoint"},"description":"Time-bucketed event counts by server and user"},"total_events":{"type":"integer","description":"Total number of hook events","format":"int64"},"total_sessions":{"type":"integer","description":"Total number of unique sessions","format":"int64"},"users":{"type":"array","items":{"$ref":"#/components/schemas/HooksUserSummary"},"description":"Aggregated metrics grouped by user"}},"description":"Result of hooks summary query","required":["servers","users","skills","total_events","total_sessions","breakdown","time_series","skill_time_series","skill_breakdown"]},"GetInstanceForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"GetInstanceResult":{"type":"object","properties":{"description":{"type":"string","description":"The description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/InstanceMcpServer"},"description":"The MCP servers that are relevant to the toolset"},"name":{"type":"string","description":"The name of the toolset"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The list of prompt templates"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools"}},"required":["name","tools","mcp_servers"]},"GetIntegrationForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration to get (refers to a package id)."},"name":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},"description":"Get a third-party integration by ID or name."},"GetIntegrationResult":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Integration"}}},"GetLatestDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetMcpMetadataResponseBody":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/McpMetadata"}}},"GetMetricsSummaryResult":{"type":"object","properties":{"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of metrics summary query","required":["metrics"]},"GetObservabilityOverviewPayload":{"type":"object","properties":{"api_key_id":{"type":"string","description":"Optional API key ID filter"},"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook')"},"external_user_id":{"type":"string","description":"Optional external user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')"},"include_time_series":{"type":"boolean","description":"Whether to include time series data (default: true)","default":true},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"toolset_slug":{"type":"string","description":"Optional toolset/MCP server slug filter"},"user_id":{"type":"string","description":"Optional internal user ID filter"}},"description":"Payload for getting observability overview metrics","required":["from","to"]},"GetObservabilityOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ObservabilitySummary"},"interval_seconds":{"type":"integer","description":"The time bucket interval in seconds used for the time series data","format":"int64"},"summary":{"$ref":"#/components/schemas/ObservabilitySummary"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesBucket"},"description":"Time series data points"},"top_tools_by_count":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by call count"},"top_tools_by_failure_rate":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by failure rate"}},"description":"Result of observability overview query","required":["summary","comparison","time_series","top_tools_by_count","top_tools_by_failure_rate","interval_seconds"]},"GetProductFeaturesResponseBody":{"type":"object","properties":{"authz_challenge_logging_enabled":{"type":"boolean","description":"Whether authz challenge logging to ClickHouse is enabled"},"logs_enabled":{"type":"boolean","description":"Whether logging is enabled"},"session_capture_enabled":{"type":"boolean","description":"Whether Claude Code session capture is enabled"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool I/O logging is enabled"},"webhooks":{"type":"boolean","description":"Whether webhooks are enabled"}},"required":["logs_enabled","tool_io_logs_enabled","session_capture_enabled","authz_challenge_logging_enabled","webhooks"]},"GetProjectForm":{"type":"object","properties":{"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug"]},"GetProjectMetricsSummaryPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level metrics summary","required":["from","to"]},"GetProjectOverviewPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level overview","required":["from","to"]},"GetProjectOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ProjectOverviewSummary"},"metrics_mode":{"type":"string","description":"Indicates whether metrics are session-based or tool-call-based","enum":["session","tool_call"]},"summary":{"$ref":"#/components/schemas/ProjectOverviewSummary"}},"description":"Result of project overview query","required":["summary","comparison","metrics_mode"]},"GetProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"GetPromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"GetSignedAssetURLForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the function asset"}},"required":["asset_id"]},"GetSignedAssetURLResult":{"type":"object","properties":{"url":{"type":"string","description":"The signed URL to access the asset"}},"required":["url"]},"GetUserMetricsSummaryPayload":{"type":"object","properties":{"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook')"},"external_user_id":{"type":"string","description":"External user ID to get metrics for (mutually exclusive with user_id)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID to get metrics for (mutually exclusive with external_user_id)"}},"description":"Payload for getting user-level metrics summary","required":["from","to"]},"GetUserMetricsSummaryResult":{"type":"object","properties":{"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of user metrics summary query","required":["metrics"]},"HTTPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"default_server_url":{"type":"string","description":"The default server URL for the tool"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"http_method":{"type":"string","description":"HTTP method for the request"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"openapiv3_document_id":{"type":"string","description":"The ID of the OpenAPI v3 document"},"openapiv3_operation":{"type":"string","description":"OpenAPI v3 operation"},"package_name":{"type":"string","description":"The name of the source package"},"path":{"type":"string","description":"Path for the request"},"project_id":{"type":"string","description":"The ID of the project"},"response_filter":{"$ref":"#/components/schemas/ResponseFilter"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"security":{"type":"string","description":"Security requirements for the underlying HTTP endpoint"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"summary":{"type":"string","description":"Summary of the tool"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags list for this http tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"An HTTP tool","required":["summary","tags","http_method","path","schema","deployment_id","asset_id","id","project_id","name","canonical_name","description","tool_urn","created_at","updated_at"]},"HeaderInput":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"is_required":{"type":"boolean","description":"Whether the header is required"},"is_secret":{"type":"boolean","description":"Whether the header value is a secret"},"name":{"type":"string","description":"The header name"},"value":{"type":"string","description":"Static header value (mutually exclusive with value_from_request_header)"},"value_from_request_header":{"type":"string","description":"Name of the inbound request header to pass through (mutually exclusive with value)"}},"description":"Input for a remote MCP server header","required":["name"]},"HookSourceUsage":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total hook events for this source","format":"int64"},"source":{"type":"string","description":"Hook source (from attributes.gram.hook.source)"}},"description":"Hook source usage statistics","required":["source","event_count"]},"HookTraceSummary":{"type":"object","properties":{"block_reason":{"type":"string","description":"Reason set when hook_status is 'blocked' (e.g. shadow-MCP guard rejection)"},"event_source":{"type":"string","description":"Event source (from materialized column)"},"gram_urn":{"type":"string","description":"Gram URN associated with this hook trace"},"hook_source":{"type":"string","description":"Hook source (from attributes.gram.hook.source)"},"hook_status":{"type":"string","description":"Hook execution status","enum":["success","failure","pending","blocked"]},"log_count":{"type":"integer","description":"Total number of logs in this trace","format":"int64"},"skill_name":{"type":"string","description":"Skill name (from materialized column, only for Skill tool)"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"tool_name":{"type":"string","description":"Tool name (from materialized column)"},"tool_source":{"type":"string","description":"Tool call source (from materialized column)"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_email":{"type":"string","description":"User email (from attributes.user.email)"}},"description":"Summary information for a hook trace","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"HooksBreakdownRow":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total events for this combination","format":"int64"},"failure_count":{"type":"integer","description":"Number of failures for this combination","format":"int64"},"hook_source":{"type":"string","description":"Hook source (e.g. claude-desktop, cursor)"},"server_name":{"type":"string","description":"Server name ('local' for non-MCP tools)"},"tool_name":{"type":"string","description":"Tool name"},"user_email":{"type":"string","description":"User email address"}},"description":"Cross-dimensional aggregation row: one entry per unique (user, server, hook_source, tool) combination","required":["user_email","server_name","hook_source","tool_name","event_count","failure_count"]},"HooksServerSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this server","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"server_name":{"type":"string","description":"Server name (extracted from tool name, or 'local' for non-MCP tools)"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used for this server","format":"int64"}},"description":"Aggregated hooks metrics for a single server","required":["server_name","event_count","unique_tools","success_count","failure_count","failure_rate"]},"HooksTimeSeriesPoint":{"type":"object","properties":{"bucket_start_ns":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS int64 precision)"},"event_count":{"type":"integer","description":"Number of events in this bucket","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed hook events in this bucket","format":"int64"},"server_name":{"type":"string","description":"Server name"},"user_email":{"type":"string","description":"User email address"}},"description":"A single time-series bucket for hooks activity","required":["bucket_start_ns","server_name","user_email","event_count","failure_count"]},"HooksUserSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this user","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used by this user","format":"int64"},"user_email":{"type":"string","description":"User email address"}},"description":"Aggregated hooks metrics for a single user","required":["user_email","event_count","unique_tools","success_count","failure_count","failure_rate"]},"InfoResponseBody":{"type":"object","properties":{"active_organization_id":{"type":"string"},"gram_account_type":{"type":"string"},"has_active_subscription":{"type":"boolean","description":"Whether the organization has an active billing subscription"},"is_admin":{"type":"boolean"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntry"}},"user_display_name":{"type":"string"},"user_email":{"type":"string"},"user_id":{"type":"string"},"user_photo_url":{"type":"string"},"user_signature":{"type":"string"},"whitelisted":{"type":"boolean","description":"Whether the organization is whitelisted to access the platform"}},"required":["user_id","user_email","is_admin","active_organization_id","organizations","gram_account_type","has_active_subscription","whitelisted"]},"InstanceMcpServer":{"type":"object","properties":{"url":{"type":"string","description":"The address of the MCP server"}},"required":["url"]},"Integration":{"type":"object","properties":{"package_description":{"type":"string"},"package_description_raw":{"type":"string"},"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string","description":"The latest version of the integration"},"version_created_at":{"type":"string","format":"date-time"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationVersion"}}},"required":["package_id","package_name","package_title","package_summary","version","version_created_at","tool_names"]},"IntegrationEntry":{"type":"object","properties":{"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string"},"version_created_at":{"type":"string","format":"date-time"}},"required":["package_id","package_name","version","version_created_at","tool_names"]},"IntegrationVersion":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"version":{"type":"string"}},"required":["version","created_at"]},"Key":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the key.","format":"date-time"},"created_by_user_id":{"type":"string","description":"The ID of the user who created this key"},"id":{"type":"string","description":"The ID of the key"},"key":{"type":"string","description":"The token of the api key (only returned on key creation)"},"key_prefix":{"type":"string","description":"The store prefix of the api key for recognition"},"last_accessed_at":{"type":"string","description":"When the key was last accessed.","format":"date-time"},"name":{"type":"string","description":"The name of the key"},"organization_id":{"type":"string","description":"The organization ID this key belongs to"},"project_id":{"type":"string","description":"The optional project ID this key is scoped to"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"},"updated_at":{"type":"string","description":"When the key was last updated.","format":"date-time"}},"required":["id","organization_id","created_by_user_id","name","key_prefix","scopes","created_at","updated_at"]},"LLMClientUsage":{"type":"object","properties":{"activity_count":{"type":"integer","description":"Number of messages (session mode) or tool calls (tool_call mode)","format":"int64"},"client_name":{"type":"string","description":"Client/agent name (e.g., 'cursor', 'claude-code', 'cowork')"}},"description":"Usage breakdown by LLM client/agent","required":["client_name","activity_count"]},"ListAllowedOriginsResult":{"type":"object","properties":{"allowed_origins":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"},"description":"The list of allowed origins"}},"required":["allowed_origins"]},"ListAssetsResult":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"description":"The list of assets"}},"required":["assets"]},"ListAssistantMemoriesResult":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/AssistantMemory"},"description":"Assistant memories matching the query."},"next_cursor":{"type":"string","description":"The cursor to be used for the next page of results."}},"required":["memories"]},"ListAssistantsResult":{"type":"object","properties":{"assistants":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"},"description":"Assistants for the current project."}},"required":["assistants"]},"ListAttributeKeysPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing distinct attribute keys available for filtering","required":["from","to"]},"ListAttributeKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"description":"Distinct attribute keys. User attributes are prefixed with @"}},"description":"Result of listing distinct attribute keys","required":["keys"]},"ListAuditLogFacetsForm":{"type":"object","properties":{"project_slug":{"type":"string","description":"Project slug to filter facet values to a specific project."}}},"ListAuditLogFacetsResult":{"type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogFacetOption"},"description":"Available action facets"},"actors":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogFacetOption"},"description":"Available actor facets"}},"required":["actors","actions"]},"ListAuditLogsForm":{"type":"object","properties":{"action":{"type":"string","description":"Action to filter audit logs to a specific action."},"actor_id":{"type":"string","description":"Actor ID to filter audit logs to a specific actor."},"cursor":{"type":"string","description":"The cursor for paginating through audit logs."},"project_slug":{"type":"string","description":"Project slug to filter audit logs to a specific project."}}},"ListAuditLogsResult":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"},"description":"List of audit logs"},"next_cursor":{"type":"string","description":"The cursor to be used for the next page of results."}},"required":["logs"]},"ListCatalogResponseBody":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Pagination cursor for the next page"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListChallengeBucketsResult":{"type":"object","properties":{"buckets":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeBucket"},"description":"The challenge buckets."},"total":{"type":"integer","description":"Total number of matching buckets for pagination.","format":"int64"}},"required":["buckets","total"]},"ListChallengesResult":{"type":"object","properties":{"challenges":{"type":"array","items":{"$ref":"#/components/schemas/AuthzChallenge"},"description":"The challenge events."},"total":{"type":"integer","description":"Total number of matching challenges for pagination.","format":"int64"}},"required":["challenges","total"]},"ListChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverview"},"description":"The list of chats"}},"required":["chats"]},"ListChatsWithResolutionsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverviewWithResolutions"},"description":"List of chats with resolutions"},"total":{"type":"integer","description":"Total number of chats (before pagination)","format":"int64"}},"description":"Result of listing chats with resolutions","required":["chats","total"]},"ListCustomDomainMcpEndpointsResult":{"type":"object","properties":{"mcp_endpoints":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomainMcpEndpoint"}}},"description":"Result of listing the MCP endpoints registered under an organization's custom domain.","required":["mcp_endpoints"]},"ListDeploymentForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"}}},"ListDeploymentResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentSummary"},"description":"A list of deployments"},"next_cursor":{"type":"string","description":"The cursor to fetch results from","example":"01jp3f054qc02gbcmpp0qmyzed"}},"required":["items"]},"ListEnvironmentsResult":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}},"description":"Result type for listing environments","required":["environments"]},"ListFilterOptionsPayload":{"type":"object","properties":{"event_source":{"type":"string","description":"Optional event source filter for the option list"},"filter_type":{"type":"string","description":"Type of filter to list options for","enum":["api_key","user","internal_user","agent"]},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing filter options","required":["from","to","filter_type"]},"ListFilterOptionsResult":{"type":"object","properties":{"options":{"type":"array","items":{"$ref":"#/components/schemas/FilterOption"},"description":"List of filter options"}},"description":"Result of listing filter options","required":["options"]},"ListHooksTracesPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (trace_id)"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions for the search query"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"types_to_include":{"type":"array","items":{"type":"string","enum":["mcp","local","skill"]},"description":"Hook types to include (mcp, local, skill). If empty or not provided, includes all types.","example":["mcp","skill"]}},"description":"Payload for listing hook traces","required":["from","to"]},"ListHooksTracesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"traces":{"type":"array","items":{"$ref":"#/components/schemas/HookTraceSummary"},"description":"List of hook trace summaries"}},"description":"Result of listing hook traces","required":["traces"]},"ListIntegrationsForm":{"type":"object","properties":{"keywords":{"type":"array","items":{"type":"string","maxLength":20},"description":"Keywords to filter integrations by"}}},"ListIntegrationsResult":{"type":"object","properties":{"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEntry"},"description":"List of available third-party integrations"}}},"ListInvitesResult":{"type":"object","properties":{"invitations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"},"description":"Pending invitations for the organization only; accepted, expired, and revoked invitations are omitted."}},"required":["invitations"]},"ListKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"]},"ListMcpEndpointsResult":{"type":"object","properties":{"mcp_endpoints":{"type":"array","items":{"$ref":"#/components/schemas/McpEndpoint"}}},"description":"Result type for listing MCP endpoints","required":["mcp_endpoints"]},"ListMcpServersResult":{"type":"object","properties":{"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/McpServer"}}},"description":"Result type for listing MCP servers","required":["mcp_servers"]},"ListMembersResult":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AccessMember"},"description":"The members in your organization."}},"required":["members"]},"ListPackagesResult":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"},"description":"The list of packages"}},"required":["packages"]},"ListPluginsResult":{"type":"object","properties":{"plugins":{"type":"array","items":{"$ref":"#/components/schemas/Plugin"},"description":"The plugins in the organization."}},"required":["plugins"]},"ListProjectsPayload":{"type":"object","properties":{"apikey_token":{"type":"string"},"organization_id":{"type":"string","description":"The ID of the organization to list projects for"},"session_token":{"type":"string"}},"required":["organization_id"]},"ListProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"},"description":"The list of projects"}},"required":["projects"]},"ListPromptTemplatesResult":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The created prompt template"}},"required":["templates"]},"ListRegistriesResponseBody":{"type":"object","properties":{"registries":{"type":"array","items":{"$ref":"#/components/schemas/MCPRegistry"},"description":"List of MCP registries"}},"required":["registries"]},"ListRemoteSessionClientsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSessionClient"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_session_clients.","required":["items"]},"ListRemoteSessionIssuersResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSessionIssuer"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_session_issuers.","required":["items"]},"ListRemoteSessionsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RemoteSession"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing remote_sessions.","required":["items"]},"ListResourcesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The list of resources"}},"required":["resources"]},"ListResponseBody":{"type":"object","properties":{"collections":{"type":"array","items":{"$ref":"#/components/schemas/MCPCollection"},"description":"List of collections"}},"required":["collections"]},"ListRiskPoliciesResult":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/RiskPolicy"},"description":"The list of risk policies."}},"required":["policies"]},"ListRiskResultsByChatResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/RiskChatSummary"},"description":"Risk results grouped by chat."},"next_cursor":{"type":"string","description":"Cursor for the next page of results."}},"required":["chats"]},"ListRiskResultsForAgentResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for the next page of results."},"results":{"type":"array","items":{"$ref":"#/components/schemas/RiskResultRedacted"},"description":"The list of risk results with match content redacted to opaque fingerprints."},"total_count":{"type":"integer","description":"Total number of findings across all enabled policies.","format":"int64"}},"required":["results","total_count"]},"ListRiskResultsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for the next page of results."},"results":{"type":"array","items":{"$ref":"#/components/schemas/RiskResult"},"description":"The list of risk results."},"total_count":{"type":"integer","description":"Total number of findings across all enabled policies.","format":"int64"}},"required":["results","total_count"]},"ListRoleGrant":{"type":"object","properties":{"effect":{"type":"string","description":"Whether this grant allows or denies the scope. Defaults to 'allow' when omitted.","default":"allow","enum":["allow","deny"]},"scope":{"type":"string","description":"The scope slug this grant applies to.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"selectors":{"type":"array","items":{"$ref":"#/components/schemas/Selector"},"description":"Selector constraints. Null means unrestricted."},"sub_scopes":{"type":"array","items":{"type":"string","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"description":"The inherited scopes the primary scope grants."}},"required":["scope"]},"ListRolesResult":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"The roles in your organization."}},"required":["roles"]},"ListScopesResult":{"type":"object","properties":{"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ScopeDefinition"},"description":"The scopes available in access control."}},"required":["scopes"]},"ListServersResponseBody":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListServersResult":{"type":"object","properties":{"remote_mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/RemoteMcpServer"}}},"description":"Result type for listing remote MCP servers","required":["remote_mcp_servers"]},"ListShadowMCPApprovalsResult":{"type":"object","properties":{"approvals":{"type":"array","items":{"$ref":"#/components/schemas/ShadowMCPApproval"},"description":"The approved shadow-MCP servers for the policy (URL- or command-keyed)."}},"required":["approvals"]},"ListSlackAppsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppResult"},"description":"List of Slack apps"}},"required":["items"]},"ListToolsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools (polymorphic union of HTTP tools and prompt templates)"}},"required":["tools"]},"ListToolsetSummariesResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetSummary"},"description":"The list of toolset summaries"}},"required":["toolsets"]},"ListToolsetsResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetEntry"},"description":"The list of toolsets"}},"required":["toolsets"]},"ListTriggerDefinitionsResult":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/components/schemas/TriggerDefinition"},"description":"The available trigger definitions."}},"required":["definitions"]},"ListTriggerInstancesResult":{"type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/TriggerInstance"},"description":"The trigger instances for the current project."}},"required":["triggers"]},"ListUserGrantsResult":{"type":"object","properties":{"grants":{"type":"array","items":{"$ref":"#/components/schemas/ListRoleGrant"},"description":"The user's effective grants in this organization."}},"required":["grants"]},"ListUserSessionClientsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionClient"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_clients.","required":["items"]},"ListUserSessionConsentsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionConsent"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_consents.","required":["items"]},"ListUserSessionIssuersResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSessionIssuer"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_session_issuers.","required":["items"]},"ListUserSessionsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserSession"}},"next_cursor":{"type":"string","description":"Cursor for the next page; empty when exhausted."}},"description":"Result type for listing user_sessions.","required":["items"]},"ListUsersResult":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationUser"},"description":"Users linked to the organization in Gram."}},"required":["users"]},"ListVariationsResult":{"type":"object","properties":{"variations":{"type":"array","items":{"$ref":"#/components/schemas/ToolVariation"}}},"required":["variations"]},"ListVersionsForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package"}},"required":["name"]},"ListVersionsResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PackageVersion"}}},"required":["package","versions"]},"LogFilter":{"type":"object","properties":{"operator":{"type":"string","description":"Comparison operator","default":"eq","enum":["eq","not_eq","contains","exists","not_exists","in"]},"path":{"type":"string","description":"Attribute path. Use @ prefix for custom attributes (e.g. '@user.region'), or bare path for system attributes (e.g. 'http.route').","example":"@user.region","pattern":"^@?[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$","minLength":1,"maxLength":256},"values":{"type":"array","items":{"type":"string"},"description":"Values to compare against. Pass one value for single-value operators (eq, not_eq, contains) and multiple for 'in'. Ignored for 'exists' and 'not_exists'.","maxItems":256}},"description":"A single filter condition for a log search query.","required":["path"]},"MCPCollection":{"type":"object","properties":{"description":{"type":"string","description":"Description of the collection"},"id":{"type":"string","description":"Collection ID","format":"uuid"},"mcp_registry_namespace":{"type":"string","description":"Registry namespace"},"name":{"type":"string","description":"Display name for the collection"},"slug":{"type":"string","description":"URL-friendly identifier"},"visibility":{"type":"string","description":"Visibility of the collection","enum":["public","private"]}},"description":"An MCP collection within an organization","required":["id","name","slug","visibility"]},"MCPRegistry":{"type":"object","properties":{"id":{"type":"string","description":"Registry ID","format":"uuid"},"name":{"type":"string","description":"Display name for the registry"},"url":{"type":"string","description":"URL of the registry"}},"description":"An MCP registry","required":["id","name","url"]},"McpEndpoint":{"type":"object","properties":{"created_at":{"type":"string","description":"When the MCP endpoint was created","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain this endpoint slug is registered under. Null for platform-domain endpoints.","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP endpoint","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"project_id":{"type":"string","description":"The project ID this MCP endpoint belongs to","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128},"updated_at":{"type":"string","description":"When the MCP endpoint was last updated","format":"date-time"}},"description":"An MCP endpoint: a url-friendly slug identifier that addresses an MCP server.","required":["id","project_id","mcp_server_id","slug","created_at","updated_at"]},"McpEnvironmentConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"When the config was created","format":"date-time"},"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"id":{"type":"string","description":"The ID of the environment config"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"updated_at":{"type":"string","description":"When the config was last updated","format":"date-time"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Represents an environment variable configured for an MCP server.","required":["id","variable_name","provided_by","created_at","updated_at"]},"McpEnvironmentConfigInput":{"type":"object","properties":{"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Input for configuring an environment variable for an MCP server.","required":["variable_name","provided_by"]},"McpExport":{"type":"object","properties":{"authentication":{"$ref":"#/components/schemas/McpExportAuthentication"},"description":{"type":"string","description":"Description of the MCP server"},"documentation_url":{"type":"string","description":"Link to external documentation"},"instructions":{"type":"string","description":"Server instructions for users"},"logo_url":{"type":"string","description":"URL to the server logo"},"name":{"type":"string","description":"The MCP server name"},"server_url":{"type":"string","description":"The MCP server URL"},"slug":{"type":"string","description":"The MCP server slug"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpExportTool"},"description":"Available tools on this MCP server"}},"description":"Complete MCP server export for documentation and integration","required":["name","slug","server_url","tools","authentication"]},"McpExportAuthHeader":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name (e.g., API Key)"},"name":{"type":"string","description":"The HTTP header name (e.g., Authorization)"}},"description":"An authentication header required by the MCP server","required":["name","display_name"]},"McpExportAuthentication":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpExportAuthHeader"},"description":"Required authentication headers"},"required":{"type":"boolean","description":"Whether authentication is required"}},"description":"Authentication requirements for the MCP server","required":["required","headers"]},"McpExportTool":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the tool does"},"input_schema":{"description":"JSON Schema for the tool's input parameters"},"name":{"type":"string","description":"The tool name"}},"description":"A tool definition in the MCP export","required":["name","description","input_schema"]},"McpMetadata":{"type":"object","properties":{"created_at":{"type":"string","description":"When the metadata entry was created","format":"date-time"},"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfig"},"description":"The list of environment variables configured for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page","format":"uri"},"id":{"type":"string","description":"The ID of the metadata record"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo","format":"uuid"},"toolset_id":{"type":"string","description":"The toolset associated with this install page metadata","format":"uuid"},"updated_at":{"type":"string","description":"When the metadata entry was last updated","format":"date-time"}},"description":"Metadata used to configure the MCP install page.","required":["id","toolset_id","created_at","updated_at"]},"McpServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the MCP server was created","format":"date-time"},"environment_id":{"type":"string","description":"The ID of the environment associated with the server","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP server","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server"},"project_id":{"type":"string","description":"The project ID this MCP server belongs to","format":"uuid"},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server used as the backend","format":"uuid"},"slug":{"type":"string","description":"A URL-safe, project-unique slug derived server-side from the name and ID"},"toolset_id":{"type":"string","description":"The ID of the toolset used as the backend","format":"uuid"},"updated_at":{"type":"string","description":"When the MCP server was last updated","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication for this server, if any.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"An MCP server configuration: authentication, environment, and backend selection for an MCP server.","required":["id","project_id","visibility","created_at","updated_at"]},"ModelUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Number of times used","format":"int64"},"name":{"type":"string","description":"Model name"}},"description":"Model usage statistics","required":["name","count"]},"NotModified":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]},"OAuthEnablementMetadata":{"type":"object","properties":{"oauth2_security_count":{"type":"integer","description":"Count of security variables that are OAuth2 supported","format":"int64"}},"required":["oauth2_security_count"]},"OAuthProxyProvider":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"created_at":{"type":"string","description":"When the OAuth proxy provider was created.","format":"date-time"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"The grant types supported by this provider"},"id":{"type":"string","description":"The ID of the OAuth proxy provider"},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by this provider"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"The token endpoint auth methods supported by this provider"},"updated_at":{"type":"string","description":"When the OAuth proxy provider was last updated.","format":"date-time"}},"required":["id","slug","provider_type","authorization_endpoint","token_endpoint","created_at","updated_at"]},"OAuthProxyServer":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"created_at":{"type":"string","description":"When the OAuth proxy server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the OAuth proxy server"},"oauth_proxy_providers":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProxyProvider"},"description":"The OAuth proxy providers for this server"},"project_id":{"type":"string","description":"The project ID this OAuth proxy server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the OAuth proxy server was last updated.","format":"date-time"}},"required":["id","project_id","slug","created_at","updated_at"]},"OAuthProxyServerForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (client_secret_basic or client_secret_post)"}},"required":["slug","provider_type"]},"OAuthProxyServerUpdateForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request (omit = no change, empty array = clear)"},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (omit = no change, empty array = clear)"}}},"OTELAttribute":{"type":"object","properties":{"key":{"type":"string","description":"Attribute key"},"value":{"$ref":"#/components/schemas/OTELAttributeValue"}},"description":"OTEL log attribute with key and typed value","required":["key"]},"OTELAttributeValue":{"type":"object","properties":{"arrayValue":{"description":"Array value (passed through)"},"boolValue":{"type":"boolean","description":"Boolean value"},"bytesValue":{"type":"string","description":"Bytes value (base64-encoded per OTLP/JSON)"},"doubleValue":{"type":"number","description":"Double value","format":"double"},"intValue":{"description":"Integer value (string-encoded per OTLP/JSON, or raw number)"},"kvlistValue":{"description":"Key-value list value (passed through)"},"stringValue":{"type":"string","description":"String value"}},"description":"OTEL attribute value - any of the OTLP/JSON value kinds"},"OTELLogBody":{"type":"object","properties":{"stringValue":{"type":"string","description":"String body value"}},"description":"OTEL log body"},"OTELLogRecord":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELAttribute"},"description":"Log attributes"},"body":{"$ref":"#/components/schemas/OTELLogBody"},"droppedAttributesCount":{"type":"integer","description":"Number of dropped attributes","format":"int64"},"observedTimeUnixNano":{"type":"string","description":"Observed timestamp in nanoseconds"},"timeUnixNano":{"type":"string","description":"Timestamp in nanoseconds since Unix epoch"}},"description":"Individual OTEL log record"},"OTELLogsPayload":{"type":"object","properties":{"resourceLogs":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceLog"},"description":"Array of resource logs"}},"description":"OTEL logs export payload"},"OTELMetric":{"type":"object","properties":{"description":{"type":"string","description":"Metric description"},"exponentialHistogram":{"description":"ExponentialHistogram metric data (passed through)"},"gauge":{"description":"Gauge metric data (passed through)"},"histogram":{"description":"Histogram metric data (passed through)"},"name":{"type":"string","description":"Metric name"},"sum":{"$ref":"#/components/schemas/OTELSum"},"summary":{"description":"Summary metric data (passed through)"},"unit":{"type":"string","description":"Metric unit"}},"description":"OTEL metric"},"OTELMetricsPayload":{"type":"object","properties":{"resourceMetrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceMetrics"},"description":"Array of resource metrics"}},"description":"OTEL metrics export payload"},"OTELNumberDataPoint":{"type":"object","properties":{"asDouble":{"type":"number","description":"Value as double","format":"double"},"asInt":{"description":"Value as integer (string-encoded per OTLP/JSON, or raw number)"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELAttribute"},"description":"Data point attributes"},"startTimeUnixNano":{"type":"string","description":"Start timestamp in nanoseconds"},"timeUnixNano":{"type":"string","description":"Timestamp in nanoseconds"}},"description":"OTEL number data point"},"OTELResource":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/OTELResourceAttribute"},"description":"Resource attributes"},"droppedAttributesCount":{"type":"integer","description":"Number of dropped attributes","format":"int64"}},"description":"OTEL resource information"},"OTELResourceAttribute":{"type":"object","properties":{"key":{"type":"string","description":"Resource attribute key"},"value":{"$ref":"#/components/schemas/OTELAttributeValue"}},"description":"OTEL resource attribute","required":["key"]},"OTELResourceLog":{"type":"object","properties":{"resource":{"$ref":"#/components/schemas/OTELResource"},"scopeLogs":{"type":"array","items":{"$ref":"#/components/schemas/OTELScopeLog"},"description":"Array of scope logs"}},"description":"OTEL resource logs container"},"OTELResourceMetrics":{"type":"object","properties":{"resource":{"$ref":"#/components/schemas/OTELResource"},"scopeMetrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELScopeMetrics"},"description":"Array of scope metrics"}},"description":"OTEL resource metrics container"},"OTELScope":{"type":"object","properties":{"name":{"type":"string","description":"Scope name"},"version":{"type":"string","description":"Scope version"}},"description":"OTEL instrumentation scope"},"OTELScopeLog":{"type":"object","properties":{"logRecords":{"type":"array","items":{"$ref":"#/components/schemas/OTELLogRecord"},"description":"Array of log records"},"scope":{"$ref":"#/components/schemas/OTELScope"}},"description":"OTEL scope logs container"},"OTELScopeMetrics":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/OTELMetric"},"description":"Array of metrics"},"scope":{"$ref":"#/components/schemas/OTELScope"}},"description":"OTEL scope metrics container"},"OTELSum":{"type":"object","properties":{"aggregationTemporality":{"description":"Aggregation temporality (number or enum string)"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/OTELNumberDataPoint"},"description":"Data points"},"isMonotonic":{"type":"boolean","description":"Whether the sum is monotonic"}},"description":"OTEL sum metric"},"ObservabilitySummary":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"avg_resolution_time_ms":{"type":"number","description":"Average time to resolution in milliseconds","format":"double"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","avg_session_duration_ms","avg_resolution_time_ms","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","total_tool_calls","failed_tool_calls","avg_latency_ms"]},"OpenAPIv3DeploymentAsset":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug"]},"Organization":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"The creation date of the organization.","format":"date-time"},"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the organization.","format":"date-time"},"webhooks_enabled":{"type":"boolean","description":"Whether webhooks are enabled for the organization"},"webhooks_onboarded":{"type":"boolean","description":"Whether webhooks support is initialized for the organization"}},"required":["id","name","slug","account_type","webhooks_onboarded","webhooks_enabled","created_at","updated_at"]},"OrganizationEntry":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"}},"slug":{"type":"string"},"user_workspace_slugs":{"type":"array","items":{"type":"string"}}},"required":["id","name","slug","projects"]},"OrganizationInvitation":{"type":"object","properties":{"accepted_at":{"type":"string","description":"When the invitation was accepted.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","description":"Invitee email address."},"expires_at":{"type":"string","description":"When the invitation expires.","format":"date-time"},"id":{"type":"string","description":"WorkOS invitation ID."},"inviter_user_id":{"type":"string","description":"Gram user ID of the inviter, when known."},"revoked_at":{"type":"string","description":"When the invitation was revoked.","format":"date-time"},"role_slug":{"type":"string","description":"WorkOS role slug assigned when the invite is accepted."},"state":{"type":"string","description":"Invitation lifecycle state.","enum":["pending","accepted","expired","revoked"]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","email","state","created_at","updated_at"]},"OrganizationInvitationAccept":{"type":"object","properties":{"accept_invitation_url":{"type":"string","description":"URL to complete acceptance in WorkOS (may be empty when not actionable)."},"email":{"type":"string","description":"Invitee email address."},"organization_name":{"type":"string","description":"Gram organization display name when the org is linked in Gram; empty if unknown."},"state":{"type":"string","description":"Invitation lifecycle state.","enum":["pending","accepted","expired","revoked"]}},"required":["email","state","organization_name","accept_invitation_url"]},"OrganizationUser":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","description":"User email address."},"id":{"type":"string","description":"Gram relationship row ID."},"last_login":{"type":"string","description":"Timestamp of the user's most recent login.","format":"date-time"},"name":{"type":"string","description":"User display name."},"organization_id":{"type":"string","description":"Gram organization ID."},"photo_url":{"type":"string","description":"User photo URL."},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","description":"Gram user ID."},"workos_membership_id":{"type":"string","description":"WorkOS organization membership ID when known."}},"required":["id","organization_id","user_id","name","email","created_at","updated_at"]},"OtelForwardingConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"ISO 8601 timestamp when the config was created. Omitted when no config is set.","format":"date-time"},"enabled":{"type":"boolean","description":"Whether forwarding is currently active."},"endpoint_url":{"type":"string","description":"URL each OTEL payload is POSTed to. Empty string when no config is set."},"headers":{"type":"array","items":{"$ref":"#/components/schemas/OtelForwardingHeader"},"description":"Headers configured for this endpoint. Values are never returned."},"id":{"type":"string","description":"Config ID. Omitted when no config is set for the organization."},"organization_id":{"type":"string","description":"Organization the config belongs to."},"updated_at":{"type":"string","description":"ISO 8601 timestamp of the most recent change. Omitted when no config is set.","format":"date-time"}},"description":"Per-organization config that controls forwarding of OTEL payloads received on the hooks endpoints to a customer-owned URL. When no config is set, id/created_at/updated_at are omitted and enabled defaults to false.","required":["organization_id","endpoint_url","enabled","headers"]},"OtelForwardingHeader":{"type":"object","properties":{"has_value":{"type":"boolean","description":"Whether a non-empty value is currently stored for this header. Always false on write-only operations."},"name":{"type":"string","description":"Header name."}},"description":"HTTP header forwarded with each OTEL payload.","required":["name","has_value"]},"OtelForwardingHeaderInput":{"type":"object","properties":{"name":{"type":"string","description":"Header name."},"value":{"type":"string","description":"Header value. Stored encrypted at rest; never returned on reads."}},"description":"HTTP header value provided when upserting a forwarding config.","required":["name","value"]},"Package":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package","format":"date-time"},"deleted_at":{"type":"string","description":"The deletion date of the package","format":"date-time"},"description":{"type":"string","description":"The description of the package. This contains HTML content."},"description_raw":{"type":"string","description":"The unsanitized, user-supplied description of the package. Limited markdown syntax is supported."},"id":{"type":"string","description":"The ID of the package"},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package"},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package"},"latest_version":{"type":"string","description":"The latest version of the package"},"name":{"type":"string","description":"The name of the package"},"organization_id":{"type":"string","description":"The ID of the organization that owns the package"},"project_id":{"type":"string","description":"The ID of the project that owns the package"},"summary":{"type":"string","description":"The summary of the package"},"title":{"type":"string","description":"The title of the package"},"updated_at":{"type":"string","description":"The last update date of the package","format":"date-time"},"url":{"type":"string","description":"External URL for the package owner"}},"required":["id","name","project_id","organization_id","created_at","updated_at"]},"PackageVersion":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package version","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment that the version belongs to"},"id":{"type":"string","description":"The ID of the package version"},"package_id":{"type":"string","description":"The ID of the package that the version belongs to"},"semver":{"type":"string","description":"The semantic version value"},"visibility":{"type":"string","description":"The visibility of the package version"}},"required":["id","package_id","deployment_id","visibility","semver","created_at"]},"PeriodUsage":{"type":"object","properties":{"actual_enabled_server_count":{"type":"integer","description":"The number of servers enabled at the time of the request","format":"int64"},"credits":{"type":"integer","description":"The number of credits used","format":"int64"},"has_active_subscription":{"type":"boolean","description":"Whether the project has an active subscription"},"included_credits":{"type":"integer","description":"The number of credits included in the tier","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"servers":{"type":"integer","description":"The number of servers used, according to the Polar meter","format":"int64"},"tool_calls":{"type":"integer","description":"The number of tool calls used","format":"int64"}},"required":["tool_calls","included_tool_calls","servers","included_servers","actual_enabled_server_count","credits","included_credits","has_active_subscription"]},"PlatformToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"owner_id":{"type":"string","description":"Optional owning entity ID"},"owner_kind":{"type":"string","description":"The entity kind that owns this tool's lifecycle"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"source_slug":{"type":"string","description":"The backing platform tool source (for example: logs)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A platform-owned tool served directly by the platform","required":["source_slug","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"Plugin":{"type":"object","properties":{"assignment_count":{"type":"integer","description":"Number of role/user assignments.","format":"int64"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/PluginAssignment"},"description":"Role/user assignments."},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string","description":"Optional description."},"id":{"type":"string","description":"Unique plugin identifier.","format":"uuid"},"name":{"type":"string","description":"Display name."},"server_count":{"type":"integer","description":"Number of active servers in this plugin.","format":"int64"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/PluginServer"},"description":"Servers included in this plugin."},"slug":{"type":"string","description":"URL-safe identifier, unique per org."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","created_at","updated_at"]},"PluginAssignment":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"Unique assignment identifier.","format":"uuid"},"principal_urn":{"type":"string","description":"Principal URN (e.g. role:engineering, user:id, or *)."}},"required":["id","principal_urn","created_at"]},"PluginServer":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"display_name":{"type":"string","description":"Display name shown in generated plugin config."},"id":{"type":"string","description":"Unique plugin server identifier.","format":"uuid"},"policy":{"type":"string","description":"Whether this server is required or optional.","enum":["required","optional"]},"sort_order":{"type":"integer","description":"Ordering within the plugin.","format":"int32"},"toolset_id":{"type":"string","description":"Gram toolset ID.","format":"uuid"}},"required":["id","toolset_id","display_name","policy","sort_order","created_at"]},"Project":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"logo_asset_id":{"type":"string","description":"The ID of the logo asset for the project"},"name":{"type":"string","description":"The name of the project"},"organization_id":{"type":"string","description":"The ID of the organization that owns the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"required":["id","name","slug","organization_id","created_at","updated_at"]},"ProjectEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug"]},"ProjectOverviewSummary":{"type":"object","properties":{"active_servers_count":{"type":"integer","description":"Number of MCP servers with at least one tool call in the time period","format":"int64"},"active_users_count":{"type":"integer","description":"Number of unique users with activity in the time period","format":"int64"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"llm_client_breakdown":{"type":"array","items":{"$ref":"#/components/schemas/LLMClientUsage"},"description":"Breakdown of messages/activity by LLM client/agent"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"top_servers":{"type":"array","items":{"$ref":"#/components/schemas/TopServer"},"description":"Top 10 MCP servers by tool call count"},"top_users":{"type":"array","items":{"$ref":"#/components/schemas/TopUser"},"description":"Top 10 users by activity (# of messages or tool calls depending on metrics_mode)"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated project-level summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","total_tool_calls","failed_tool_calls","active_servers_count","active_users_count","top_users","top_servers","llm_client_breakdown"]},"ProjectSummary":{"type":"object","properties":{"avg_chat_duration_ms":{"type":"number","description":"Average chat request duration in milliseconds","format":"double"},"avg_chat_resolution_score":{"type":"number","description":"Average chat resolution score (0-100)","format":"double"},"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"avg_tool_duration_ms":{"type":"number","description":"Average tool call duration in milliseconds","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"chat_resolution_abandoned":{"type":"integer","description":"Chats abandoned by user","format":"int64"},"chat_resolution_failure":{"type":"integer","description":"Chats that failed to resolve","format":"int64"},"chat_resolution_partial":{"type":"integer","description":"Chats partially resolved","format":"int64"},"chat_resolution_success":{"type":"integer","description":"Chats resolved successfully","format":"int64"},"distinct_models":{"type":"integer","description":"Number of distinct models used (project scope only)","format":"int64"},"distinct_providers":{"type":"integer","description":"Number of distinct providers used (project scope only)","format":"int64"},"finish_reason_stop":{"type":"integer","description":"Requests that completed naturally","format":"int64"},"finish_reason_tool_calls":{"type":"integer","description":"Requests that resulted in tool calls","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsage"},"description":"List of models used with call counts"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"List of tools used with success/failure counts"},"total_chat_requests":{"type":"integer","description":"Total number of chat requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions (project scope only)","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated metrics","required":["first_seen_unix_nano","last_seen_unix_nano","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","avg_tokens_per_request","total_chat_requests","avg_chat_duration_ms","finish_reason_stop","finish_reason_tool_calls","total_tool_calls","tool_call_success","tool_call_failure","avg_tool_duration_ms","chat_resolution_success","chat_resolution_failure","chat_resolution_partial","chat_resolution_abandoned","avg_chat_resolution_score","total_chats","distinct_models","distinct_providers","models","tools"]},"PromptTemplate":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"history_id":{"type":"string","description":"The revision tree ID for the prompt template"},"id":{"type":"string","description":"The ID of the tool"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the tool"},"predecessor_id":{"type":"string","description":"The previous version of the prompt template to use as predecessor"},"project_id":{"type":"string","description":"The ID of the project"},"prompt":{"type":"string","description":"The template content"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A prompt template","required":["id","history_id","name","prompt","engine","kind","tools_hint","tool_urn","created_at","updated_at","project_id","canonical_name","description","schema"]},"PromptTemplateEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the prompt template"},"kind":{"type":"string","description":"The kind of the prompt template"},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name"]},"PublishPackageForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The deployment ID to associate with the package version"},"name":{"type":"string","description":"The name of the package"},"version":{"type":"string","description":"The new semantic version of the package to publish"},"visibility":{"type":"string","description":"The visibility of the package version","enum":["public","private"]}},"required":["name","version","deployment_id","visibility"]},"PublishPackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"version":{"$ref":"#/components/schemas/PackageVersion"}},"required":["package","version"]},"PublishPluginsRequestBody":{"type":"object","properties":{"github_usernames":{"type":"array","items":{"type":"string"},"description":"GitHub usernames to add as collaborators on the repo."}}},"PublishPluginsResult":{"type":"object","properties":{"repo_url":{"type":"string","description":"The URL of the published GitHub repository."}},"required":["repo_url"]},"PublishStatusResult":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether GitHub publishing is configured on the server."},"connected":{"type":"boolean","description":"Whether this project has a GitHub connection."},"marketplace_url":{"type":"string","description":"Git-based Claude Code marketplace URL — the value to pass to `/plugin marketplace add` or set as the source URL in `extraKnownMarketplaces`. Present once a marketplace token has been minted, which happens automatically on the first publish."},"repo_name":{"type":"string","description":"GitHub repo name, if connected."},"repo_owner":{"type":"string","description":"GitHub repo owner, if connected."},"repo_url":{"type":"string","description":"Full GitHub repository URL, if connected."}},"required":["configured","connected"]},"RBACStatus":{"type":"object","properties":{"rbac_enabled":{"type":"boolean","description":"Whether RBAC enforcement is currently enabled for this organization."}},"required":["rbac_enabled"]},"RedeployRequestBody":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to redeploy."}},"required":["deployment_id"]},"RedeployResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"RegisterRequestBody":{"type":"object","properties":{"org_name":{"type":"string","description":"The name of the org to register"}},"required":["org_name"]},"RemoteMcpServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the remote MCP server was created","format":"date-time"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/RemoteMcpServerHeader"},"description":"Headers configured for this remote MCP server"},"id":{"type":"string","description":"The ID of the remote MCP server","format":"uuid"},"name":{"type":"string","description":"Optional human-readable name for the remote MCP server"},"project_id":{"type":"string","description":"The project ID this remote MCP server belongs to","format":"uuid"},"slug":{"type":"string","description":"URL-friendly slug derived from the URL and ID."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server"},"updated_at":{"type":"string","description":"When the remote MCP server was last updated","format":"date-time"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"A remote MCP server configuration","required":["id","project_id","url","transport_type","headers","created_at","updated_at"]},"RemoteMcpServerHeader":{"type":"object","properties":{"created_at":{"type":"string","description":"When the header was created","format":"date-time"},"description":{"type":"string","description":"Description of the header"},"id":{"type":"string","description":"The ID of the header","format":"uuid"},"is_required":{"type":"boolean","description":"Whether the header is required"},"is_secret":{"type":"boolean","description":"Whether the header value is a secret"},"name":{"type":"string","description":"The header name"},"updated_at":{"type":"string","description":"When the header was last updated","format":"date-time"},"value":{"type":"string","description":"The header value (redacted if secret)"},"value_from_request_header":{"type":"string","description":"Name of the inbound request header to pass through"}},"description":"A header configured for a remote MCP server","required":["id","name","is_required","is_secret","created_at","updated_at"]},"RemoteSession":{"type":"object","properties":{"access_expires_at":{"type":"string","description":"Upstream access-token expiry. Independent of refresh_expires_at.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The remote_session id.","format":"uuid"},"refresh_expires_at":{"type":"string","description":"Upstream refresh-token expiry. Null when the session has no refresh token.","format":"date-time"},"remote_session_client_id":{"type":"string","description":"The remote_session_client this session was minted against.","format":"uuid"},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes held by this session."},"subject_urn":{"type":"string","description":"The session's subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this session is bound to.","format":"uuid"}},"description":"A remote_session record — Gram's upstream OAuth session for a (principal, remote_session_client) pair. access_token_encrypted and refresh_token_encrypted are never returned.","required":["id","subject_urn","user_session_issuer_id","remote_session_client_id","access_expires_at","scopes","created_at","updated_at"]},"RemoteSessionClient":{"type":"object","properties":{"audience":{"type":"string","description":"Upstream OAuth audience sent on the authorize redirect and token exchange. Null omits the audience parameter."},"client_id":{"type":"string","description":"The client_id used to identify this client at the issuer's token and authorization endpoints."},"client_id_issued_at":{"type":"string","format":"date-time"},"client_secret_expires_at":{"type":"string","description":"Null when the secret does not expire.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The remote_session_client id.","format":"uuid"},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"remote_session_issuer_id":{"type":"string","description":"The owning remote_session_issuer id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string"},"description":"Explicit upstream OAuth scopes the dance requests for this client. Null falls back to the issuer's scopes_supported."},"token_endpoint_auth_method":{"type":"string","description":"How the client authenticates at the issuer's token endpoint. Null resolves to client_secret_basic at runtime.","enum":["client_secret_basic","client_secret_post"]},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer this client is paired with.","format":"uuid"}},"description":"A remote_session_client record. client_secret_encrypted is never returned.","required":["id","project_id","remote_session_issuer_id","user_session_issuer_id","client_id","client_id_issued_at","created_at","updated_at"]},"RemoteSessionIssuer":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"created_at":{"type":"string","format":"date-time"},"grant_types_supported":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"The remote_session_issuer id.","format":"uuid"},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI; null when not advertised."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer."},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; null for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"slug":{"type":"string","description":"Project-unique slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"}},"description":"A remote_session_issuer record — upstream Authorization Server identity that Gram speaks OAuth to.","required":["id","project_id","slug","issuer","oidc","passthrough","created_at","updated_at"]},"RemoteSessionIssuerDraft":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"discovery_warnings":{"type":"array","items":{"type":"string"},"description":"Warnings describing any RFC 8414 deviations encountered during discovery."},"grant_types_supported":{"type":"array","items":{"type":"string"}},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI; null when not advertised."},"oidc":{"type":"boolean","description":"When true, may unlock OIDC-aware behaviour."},"passthrough":{"type":"boolean","description":"When true, the MCP client registers and transacts directly with this issuer."},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint; null for issuers without DCR."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"description":"A draft remote_session_issuer returned by discover. Same shape as RemoteSessionIssuer minus id/project_id/timestamps, plus discovery_warnings describing any RFC 8414 deviations.","required":["issuer","oidc","passthrough","discovery_warnings"]},"RenderTemplateByIDRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true}},"required":["arguments"]},"RenderTemplateRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"prompt":{"type":"string","description":"The template content to render"}},"required":["prompt","arguments","engine","kind"]},"RenderTemplateResult":{"type":"object","properties":{"prompt":{"type":"string","description":"The rendered prompt"}},"required":["prompt"]},"ResolveChallengeForm":{"type":"object","properties":{"challenge_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the challenges in ClickHouse to resolve."},"principal_urn":{"type":"string","description":"Principal that was denied."},"resolution_type":{"type":"string","description":"How the challenge is being resolved.","enum":["role_assigned","dismissed"]},"resource_id":{"type":"string","description":"Resource ID from the challenge."},"resource_kind":{"type":"string","description":"Resource kind from the challenge."},"role_slug":{"type":"string","description":"Role slug to assign (required when resolution_type=role_assigned)."},"scope":{"type":"string","description":"Scope that was denied."}},"required":["challenge_ids","principal_urn","scope","resolution_type"]},"ResolveChallengesResult":{"type":"object","properties":{"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeResolution"},"description":"The created resolution records."}},"required":["resolutions"]},"Resource":{"type":"object","properties":{"function_resource_definition":{"$ref":"#/components/schemas/FunctionResourceDefinition"}},"description":"A polymorphic resource - currently only function resources are supported"},"ResourceEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the resource"},"name":{"type":"string","description":"The name of the resource"},"resource_urn":{"type":"string","description":"The URN of the resource"},"type":{"type":"string","enum":["function"]},"uri":{"type":"string","description":"The uri of the resource"}},"required":["type","id","name","uri","resource_urn"]},"ResponseFilter":{"type":"object","properties":{"content_types":{"type":"array","items":{"type":"string"},"description":"Content types to filter for"},"status_codes":{"type":"array","items":{"type":"string"},"description":"Status codes to filter for"},"type":{"type":"string","description":"Response filter type for the tool"}},"description":"Response filter metadata for the tool","required":["type","status_codes","content_types"]},"RiskCapabilitiesResult":{"type":"object","properties":{"pi_classifier_enabled":{"type":"boolean","description":"Whether the prompt-injection ML classifier is configured on this server."}},"required":["pi_classifier_enabled"]},"RiskCategoriesResult":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskCategoryDefinition"},"description":"Categories in classification-priority order. The last entry is the 'custom' fallback for findings that match none of the others."}},"description":"Canonical risk category definitions used to classify findings, in classification-priority order. Consumers should iterate in order and pick the first match.","required":["categories"]},"RiskCategoryDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Plain-English description of what this category covers."},"icon":{"type":"string","description":"Lucide icon name suggested for this category."},"key":{"type":"string","description":"Canonical category key (e.g. 'secrets', 'pii', 'shadow_mcp')."},"label":{"type":"string","description":"Human-readable category label for UI rendering."},"rule_id_prefix":{"type":"string","description":"When non-empty, findings whose rule_id starts with this prefix belong to this category. The catch-all for a family (e.g. 'pii.')."},"rule_ids":{"type":"array","items":{"type":"string"},"description":"When non-empty, findings whose rule_id is in this exact list belong to this category. Checked before rule_id_prefix."},"source":{"type":"string","description":"When non-empty, findings whose source equals this value belong to this category."}},"description":"One canonical risk category and how findings are classified into it.","required":["key","label","description","icon","source","rule_ids","rule_id_prefix"]},"RiskChatSummary":{"type":"object","properties":{"chat_id":{"type":"string","description":"The chat session ID.","format":"uuid"},"chat_title":{"type":"string","description":"Title of the chat session."},"findings_count":{"type":"integer","description":"Number of findings in this chat.","format":"int64"},"latest_detected":{"type":"string","description":"When the most recent finding was detected.","format":"date-time"},"user_id":{"type":"string","description":"The user who owns the chat session."}},"required":["chat_id","findings_count","latest_detected"]},"RiskOverviewCategory":{"type":"object","properties":{"category":{"type":"string","description":"Policy category key."},"findings":{"type":"integer","description":"Finding count for this category.","format":"int64"}},"required":["category","findings"]},"RiskOverviewResult":{"type":"object","properties":{"active_policies":{"type":"integer","description":"Enabled risk policies for the current project.","format":"int64"},"findings":{"type":"integer","description":"Policy findings in the window.","format":"int64"},"flagged_sessions":{"type":"integer","description":"Chat sessions with at least one finding in the window.","format":"int64"},"from":{"type":"string","description":"Inclusive start of the overview window.","format":"date-time"},"messages_scanned":{"type":"integer","description":"Messages analyzed by risk policies in the window.","format":"int64"},"time_series_findings":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewTimeSeriesFinding"},"description":"Time-series finding counts by category in the window."},"to":{"type":"string","description":"Exclusive end of the overview window.","format":"date-time"},"top_categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewCategory"},"description":"Top policy categories by finding count."},"top_rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Top rule_ids by finding count."},"top_users":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewUser"},"description":"Top users by finding count."}},"required":["from","to","messages_scanned","findings","flagged_sessions","active_policies","top_categories","top_users","top_rules","time_series_findings"]},"RiskOverviewTimeSeriesFinding":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Time bucket start.","format":"date-time"},"category":{"type":"string","description":"Policy category key."},"findings":{"type":"integer","description":"Finding count for this category and time bucket.","format":"int64"}},"required":["bucket_start","category","findings"]},"RiskOverviewUser":{"type":"object","properties":{"email":{"type":"string","description":"User email, or Unknown user when unavailable."},"external_user_id":{"type":"string","description":"External user identifier as recorded on chats, when known. Empty when the finding cannot be attributed to an external user."},"findings":{"type":"integer","description":"Finding count for this user.","format":"int64"}},"required":["email","external_user_id","findings"]},"RiskPolicy":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag (log only) or block (deny in real-time).","default":"flag","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name is auto-generated. When true, the name is regenerated on each update."},"created_at":{"type":"string","description":"When the policy was created.","format":"date-time"},"enabled":{"type":"boolean","description":"Whether the policy is active."},"id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"name":{"type":"string","description":"The policy name."},"pending_messages":{"type":"integer","description":"Number of messages not yet analyzed at the current policy version.","format":"int64"},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to scan for. When empty, scans all entities."},"project_id":{"type":"string","description":"The project ID.","format":"uuid"},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids enabled in addition to the heuristic baseline (e.g. 'deberta-v3-classifier'). When empty, only heuristics run."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources enabled for this policy."},"total_messages":{"type":"integer","description":"Total number of messages in the project.","format":"int64"},"updated_at":{"type":"string","description":"When the policy was last updated.","format":"date-time"},"user_message":{"type":"string","description":"Optional message shown to the end user when this policy blocks an action or surfaces a flagged finding. When unset, a default message is rendered."},"version":{"type":"integer","description":"Policy version, incremented on each update.","format":"int64"}},"required":["id","project_id","name","sources","enabled","action","auto_name","version","created_at","updated_at","pending_messages","total_messages"]},"RiskPolicyStatus":{"type":"object","properties":{"analyzed_messages":{"type":"integer","description":"Messages analyzed at the current policy version.","format":"int64"},"findings_count":{"type":"integer","description":"Number of findings at the current policy version.","format":"int64"},"pending_messages":{"type":"integer","description":"Messages not yet analyzed.","format":"int64"},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"policy_version":{"type":"integer","description":"Current policy version.","format":"int64"},"total_messages":{"type":"integer","description":"Total messages in the project.","format":"int64"},"workflow_status":{"type":"string","description":"Workflow state: running, sleeping, or not_started.","enum":["running","sleeping","not_started"]}},"required":["policy_id","policy_version","total_messages","analyzed_messages","pending_messages","findings_count","workflow_status"]},"RiskResult":{"type":"object","properties":{"chat_id":{"type":"string","description":"The chat session containing the message.","format":"uuid"},"chat_message_id":{"type":"string","description":"The chat message that was scanned.","format":"uuid"},"chat_title":{"type":"string","description":"Title of the chat session."},"confidence":{"type":"number","description":"Confidence score for this finding.","format":"double"},"created_at":{"type":"string","description":"When this result was created.","format":"date-time"},"description":{"type":"string","description":"Human-readable description of the finding."},"end_pos":{"type":"integer","description":"End byte position within the message content.","format":"int64"},"id":{"type":"string","description":"The result ID.","format":"uuid"},"match":{"type":"string","description":"The matched secret or sensitive data."},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"policy_version":{"type":"integer","description":"Policy version when this result was produced.","format":"int64"},"rule_id":{"type":"string","description":"The matched rule identifier."},"source":{"type":"string","description":"Detection source (e.g. gitleaks)."},"start_pos":{"type":"integer","description":"Start byte position within the message content.","format":"int64"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags from the detection rule."},"user_id":{"type":"string","description":"The user who owns the chat session."}},"required":["id","policy_id","policy_version","chat_message_id","source","created_at"]},"RiskResultRedacted":{"type":"object","properties":{"chat_id":{"type":"string","description":"The chat session containing the message.","format":"uuid"},"chat_message_id":{"type":"string","description":"The chat message that was scanned.","format":"uuid"},"chat_title":{"type":"string","description":"Title of the chat session."},"confidence":{"type":"number","description":"Confidence score for this finding.","format":"double"},"created_at":{"type":"string","description":"When this result was created.","format":"date-time"},"description":{"type":"string","description":"Human-readable description of the finding."},"id":{"type":"string","description":"The result ID.","format":"uuid"},"match_redacted":{"type":"string","description":"Opaque fingerprint of the original match in the form `\u003credacted len=N sha=XXXXXXXX\u003e` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim."},"policy_id":{"type":"string","description":"The risk policy ID.","format":"uuid"},"policy_version":{"type":"integer","description":"Policy version when this result was produced.","format":"int64"},"position_known":{"type":"boolean","description":"Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks."},"rule_id":{"type":"string","description":"The matched rule identifier."},"source":{"type":"string","description":"Detection source (e.g. gitleaks, presidio, shadow_mcp)."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags from the detection rule."},"user_id":{"type":"string","description":"The user who owns the chat session."}},"required":["id","policy_id","policy_version","chat_message_id","source","created_at","match_redacted","position_known"]},"RiskRuleBreakdownEntry":{"type":"object","properties":{"findings":{"type":"integer","description":"Finding count for this rule within the window.","format":"int64"},"rule_id":{"type":"string","description":"Rule identifier (e.g. 'secret.aws-access-key'). Empty when the finding has no rule_id (treat as 'unspecified')."},"source":{"type":"string","description":"Source bucket the rule belongs to (gitleaks, presidio, etc.) for label/icon resolution on the dashboard."}},"required":["rule_id","source","findings"]},"RiskRuleBreakdownResult":{"type":"object","properties":{"category":{"type":"string","description":"Category the breakdown is scoped to."},"from":{"type":"string","description":"Inclusive start of the window used.","format":"date-time"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Rules in this category, ordered by finding count descending."},"to":{"type":"string","description":"Exclusive end of the window used.","format":"date-time"},"total":{"type":"integer","description":"Total findings across all rules in this category and window.","format":"int64"}},"required":["from","to","category","rules","total"]},"RiskUserBreakdownResult":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/RiskOverviewCategory"},"description":"Category breakdown for this user, ordered by finding count descending."},"external_user_id":{"type":"string","description":"External user the breakdown is scoped to."},"findings":{"type":"integer","description":"Total findings for this user in the window.","format":"int64"},"from":{"type":"string","description":"Inclusive start of the window used.","format":"date-time"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RiskRuleBreakdownEntry"},"description":"Rule_id breakdown for this user, ordered by finding count descending."},"to":{"type":"string","description":"Exclusive end of the window used.","format":"date-time"}},"required":["from","to","external_user_id","findings","categories","rules"]},"Role":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":"string","description":"Human-readable description."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Scope grants assigned to this role."},"id":{"type":"string","description":"Unique role identifier."},"is_system":{"type":"boolean","description":"Whether this is a built-in system role that cannot be deleted."},"member_count":{"type":"integer","description":"Number of members assigned to this role.","format":"int64"},"name":{"type":"string","description":"Display name of the role."},"slug":{"type":"string","description":"Stable WorkOS role slug."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","description","is_system","grants","member_count","created_at","updated_at"]},"RoleGrant":{"type":"object","properties":{"effect":{"type":"string","description":"Whether this grant allows or denies the scope. Defaults to 'allow' when omitted.","default":"allow","enum":["allow","deny"]},"scope":{"type":"string","description":"The scope slug this grant applies to.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]},"selectors":{"type":"array","items":{"$ref":"#/components/schemas/Selector"},"description":"Selector constraints. Null means unrestricted."}},"required":["scope"]},"RoleSummary":{"type":"object","properties":{"cost_per_user":{"type":"number","description":"Average cost per user (total_cost / user_count)","format":"double"},"role_id":{"type":"string","description":"Role identifier extracted from role URN"},"role_name":{"type":"string","description":"Human-readable role name"},"total_chats":{"type":"integer","description":"Total chat sessions across all users","format":"int64"},"total_cost":{"type":"number","description":"Total cost across all users with this role","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens across all users","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens across all users","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens across all users","format":"int64"},"user_count":{"type":"integer","description":"Number of users with this role","format":"int64"}},"description":"Aggregated usage summary for a role","required":["role_id","role_name","user_count","total_cost","cost_per_user","total_input_tokens","total_output_tokens","total_tokens","total_chats"]},"ScopeDefinition":{"type":"object","properties":{"description":{"type":"string","description":"What this scope protects."},"resource_type":{"type":"string","description":"The type of resource this scope applies to.","enum":["org","project","mcp","environment"]},"slug":{"type":"string","description":"Unique scope identifier.","enum":["org:read","org:admin","project:read","project:write","mcp:read","mcp:write","mcp:connect","environment:read","environment:write"]}},"required":["slug","description","resource_type"]},"SearchChatsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching chat sessions"},"SearchChatsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchChatsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching chat session summaries"},"SearchChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummary"},"description":"List of chat session summaries"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching chat session summaries","required":["chats"]},"SearchLogsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_chat_id":{"type":"string","description":"Chat ID filter"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"gram_urns":{"type":"array","items":{"type":"string"},"description":"Gram URN filter (one or more URNs)"},"http_method":{"type":"string","description":"HTTP method filter","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]},"http_route":{"type":"string","description":"HTTP route filter"},"http_status_code":{"type":"integer","description":"HTTP status code filter","format":"int32"},"service_name":{"type":"string","description":"Service name filter"},"severity_text":{"type":"string","description":"Severity level filter","enum":["DEBUG","INFO","WARN","ERROR","FATAL"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"trace_id":{"type":"string","description":"Trace ID filter (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching logs"},"SearchLogsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchLogsFilter"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/LogFilter"},"description":"Filter conditions for the search query"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for searching telemetry logs"},"SearchLogsResult":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/TelemetryLogRecord"},"description":"List of telemetry log records"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching telemetry logs","required":["logs"]},"SearchToolCallsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching tool calls"},"SearchToolCallsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchToolCallsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching tool call summaries"},"SearchToolCallsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallSummary"},"description":"List of tool call summaries"}},"description":"Result of searching tool call summaries","required":["tool_calls"]},"SearchUsersFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"event_source":{"type":"string","description":"Optional event source filter (e.g. 'hook'). When set, only rows with a matching event_source are included."},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"hook_source":{"type":"string","description":"Optional hook source filter (e.g. 'cursor', 'claude-code')."},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_ids":{"type":"array","items":{"type":"string"},"description":"Optional list of user identifiers to include. Matches user_id for internal searches and external_user_id for external searches."}},"description":"Filter criteria for searching user usage summaries","required":["from","to"]},"SearchUsersPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (user identifier from last item)"},"filter":{"$ref":"#/components/schemas/SearchUsersFilter"},"group_by":{"type":"string","description":"Grouping dimension for results","default":"employee","enum":["employee","role"]},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"user_type":{"type":"string","description":"Type of user identifier to group by","enum":["internal","external"]}},"description":"Payload for searching user usage summaries","required":["filter","user_type"]},"SearchUsersResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor for next page"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/RoleSummary"},"description":"List of role usage summaries (populated when group_by=role)"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserSummary"},"description":"List of user usage summaries (populated when group_by=employee)"}},"description":"Result of searching user usage summaries","required":["users"]},"SecurityVariable":{"type":"object","properties":{"bearer_format":{"type":"string","description":"The bearer format"},"display_name":{"type":"string","description":"User-friendly display name for the security variable (defaults to name if not set)"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"},"id":{"type":"string","description":"The unique identifier of the security variable"},"in_placement":{"type":"string","description":"Where the security token is placed"},"name":{"type":"string","description":"The name of the security scheme (actual header/parameter name)"},"oauth_flows":{"type":"string","description":"The OAuth flows","format":"binary"},"oauth_types":{"type":"array","items":{"type":"string"},"description":"The OAuth types"},"scheme":{"type":"string","description":"The security scheme"},"type":{"type":"string","description":"The type of security"}},"required":["id","name","in_placement","scheme","env_variables"]},"Selector":{"type":"object","properties":{"disposition":{"type":"string","description":"Tool disposition filter (MCP scopes only).","enum":["read_only","destructive","idempotent","open_world"]},"project_id":{"type":"string","description":"Project filter (MCP scopes only). When set with resource_id='*', grants access to all servers in the project."},"resource_id":{"type":"string","description":"The resource identifier, or '*' for all resources of this kind."},"resource_kind":{"type":"string","description":"The kind of resource this selector targets.","enum":["project","mcp","org","environment","*"]},"tool":{"type":"string","description":"Specific tool name filter (MCP scopes only)."}},"description":"A constraint that narrows which resources a grant applies to.","required":["resource_kind","resource_id"]},"SendInviteRequestBody":{"type":"object","properties":{"email":{"type":"string","description":"Email address to invite."},"role_id":{"type":"string","description":"Optional role ID for the invitee."}},"required":["email"]},"ServeChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the attachment to serve"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeChatAttachmentResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeChatAttachmentSignedForm":{"type":"object","properties":{"token":{"type":"string","description":"The signed JWT token"}},"required":["token"]},"ServeChatAttachmentSignedResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeFunctionForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeFunctionResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeImageForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the asset to serve"}},"required":["id"]},"ServeImageResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeOpenAPIv3Result":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServerNameOverride":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name"},"id":{"type":"string","description":"Override ID"},"raw_server_name":{"type":"string","description":"Original server name from hooks"}},"description":"User-defined display name for a hooks server","required":["id","raw_server_name","display_name"]},"ServerVariable":{"type":"object","properties":{"description":{"type":"string","description":"Description of the server variable"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"}},"required":["description","env_variables"]},"ServiceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"version":{"type":"string","description":"Service version"}},"description":"Service information","required":["name"]},"SetMcpMetadataRequestBody":{"type":"object","properties":{"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfigInput"},"description":"The list of environment variables to configure for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo"},"toolset_slug":{"type":"string","description":"The slug of the toolset associated with this install page metadata","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"SetOrganizationWhitelistRequestBody":{"type":"object","properties":{"organization_id":{"type":"string","description":"The ID of the organization to update"},"whitelisted":{"type":"boolean","description":"Whether the organization should be whitelisted"}},"required":["organization_id","whitelisted"]},"SetPluginAssignmentsForm":{"type":"object","properties":{"plugin_id":{"type":"string","format":"uuid"},"principal_urns":{"type":"array","items":{"type":"string"},"description":"List of principal URNs to assign."}},"required":["plugin_id","principal_urns"]},"SetPluginAssignmentsResponseBody":{"type":"object","properties":{"assignments":{"type":"array","items":{"$ref":"#/components/schemas/PluginAssignment"},"description":"The updated assignments."}},"required":["assignments"]},"SetProductFeatureRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the feature should be enabled"},"feature_name":{"type":"string","description":"Name of the feature to update","enum":["logs","tool_io_logs","session_capture","authz_challenge_logging"],"maxLength":60}},"required":["feature_name","enabled"]},"SetProjectLogoForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the asset"}},"required":["asset_id"]},"SetProjectLogoResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"SetSourceEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source (http or function)","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"required":["source_kind","source_slug","environment_id"]},"SetToolsetEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"required":["toolset_id","environment_id"]},"SetUserSessionIssuerForm":{"type":"object","properties":{"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"user_session_issuer_id":{"type":"string","description":"The user_session_issuer id to link, or null to unlink.","format":"uuid"}},"required":["slug"]},"SetUserSessionIssuerRequestBody":{"type":"object","properties":{"user_session_issuer_id":{"type":"string","description":"The user_session_issuer id to link, or null to unlink.","format":"uuid"}}},"ShadowMCPApproval":{"type":"object","properties":{"approved_at":{"type":"string","description":"When the approval was recorded.","format":"date-time"},"approved_by":{"type":"string","description":"User that recorded the approval."},"match":{"type":"string","description":"The MCP server identifier this approval covers — typically a server URL, stdio command, or `mcp__\u003cserver\u003e__` prefix (the same value surfaced in `RiskResult.match`)."},"policy_id":{"type":"string","description":"The risk policy ID this approval is scoped to.","format":"uuid"},"server_name":{"type":"string","description":"Display name of the MCP server, when known."}},"required":["policy_id","match","approved_at"]},"SkillBreakdownRow":{"type":"object","properties":{"skill_name":{"type":"string","description":"Skill name"},"use_count":{"type":"integer","description":"Use count for this skill/user combination","format":"int64"},"user_email":{"type":"string","description":"User email address"}},"description":"Per-(skill, user) aggregated counts","required":["skill_name","user_email","use_count"]},"SkillSummary":{"type":"object","properties":{"skill_name":{"type":"string","description":"Skill name (extracted from tool name)"},"unique_users":{"type":"integer","description":"Number of unique users who used this skill","format":"int64"},"use_count":{"type":"integer","description":"Total number of times this skill was used","format":"int64"}},"description":"Aggregated skills metrics for a single skill","required":["skill_name","use_count","unique_users"]},"SkillTimeSeriesPoint":{"type":"object","properties":{"bucket_start_ns":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS int64 precision)"},"event_count":{"type":"integer","description":"Number of skill use events in this bucket","format":"int64"},"skill_name":{"type":"string","description":"Skill name"}},"description":"A single time-series bucket for skill usage activity","required":["bucket_start_ns","skill_name","event_count"]},"SlackAppResult":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"icon_asset_id":{"type":"string","description":"Asset ID for the app icon"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"Display name of the Slack app"},"redirect_url":{"type":"string","description":"OAuth callback URL for this app"},"request_url":{"type":"string","description":"Event subscription URL for this app"},"slack_client_id":{"type":"string","description":"The Slack app Client ID"},"slack_team_id":{"type":"string","description":"The connected Slack workspace ID"},"slack_team_name":{"type":"string","description":"The connected Slack workspace name"},"status":{"type":"string","description":"Current status: unconfigured, active"},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Attached toolset IDs"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","toolset_ids","created_at","updated_at"]},"SourceEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the source environment link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source that can be linked to an environment","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"description":"A link between a source and an environment","required":["id","source_kind","source_slug","environment_id"]},"SubmitFeedbackRequestBody":{"type":"object","properties":{"feedback":{"type":"string","description":"User feedback: success or failure","enum":["success","failure"]},"id":{"type":"string","description":"The ID of the chat"}},"required":["id","feedback"]},"TelemetryFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for telemetry queries"},"TelemetryLogRecord":{"type":"object","properties":{"attributes":{"description":"Log attributes as JSON object"},"body":{"type":"string","description":"The primary log message"},"id":{"type":"string","description":"Log record ID","format":"uuid"},"observed_time_unix_nano":{"type":"string","description":"Unix time in nanoseconds when event was observed (string for JS int64 precision)"},"resource_attributes":{"description":"Resource attributes as JSON object"},"service":{"$ref":"#/components/schemas/ServiceInfo"},"severity_text":{"type":"string","description":"Text representation of severity"},"span_id":{"type":"string","description":"W3C span ID (16 hex characters)"},"time_unix_nano":{"type":"string","description":"Unix time in nanoseconds when event occurred (string for JS int64 precision)"},"trace_id":{"type":"string","description":"W3C trace ID (32 hex characters)"}},"description":"OpenTelemetry log record","required":["id","time_unix_nano","observed_time_unix_nano","body","attributes","resource_attributes","service"]},"TierLimits":{"type":"object","properties":{"add_on_bullets":{"type":"array","items":{"type":"string"},"description":"Add-on items bullets of the tier (optional)"},"base_price":{"type":"number","description":"The base price for the tier","format":"double"},"feature_bullets":{"type":"array","items":{"type":"string"},"description":"Key feature bullets of the tier"},"included_bullets":{"type":"array","items":{"type":"string"},"description":"Included items bullets of the tier"},"included_credits":{"type":"integer","description":"The number of credits included in the tier for playground and other dashboard activities","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"price_per_additional_server":{"type":"number","description":"The price per additional server","format":"double"},"price_per_additional_tool_call":{"type":"number","description":"The price per additional tool call","format":"double"}},"required":["base_price","included_tool_calls","included_servers","included_credits","price_per_additional_tool_call","price_per_additional_server","feature_bullets","included_bullets"]},"TimeSeriesBucket":{"type":"object","properties":{"abandoned_chats":{"type":"integer","description":"Abandoned chat sessions in this bucket","format":"int64"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"avg_tool_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"bucket_time_unix_nano":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS precision)"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens in this bucket","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens in this bucket","format":"int64"},"failed_chats":{"type":"integer","description":"Failed chat sessions in this bucket","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Failed tool calls in this bucket","format":"int64"},"partial_chats":{"type":"integer","description":"Partially resolved chat sessions in this bucket","format":"int64"},"resolved_chats":{"type":"integer","description":"Resolved chat sessions in this bucket","format":"int64"},"total_chats":{"type":"integer","description":"Total chat sessions in this bucket","format":"int64"},"total_cost":{"type":"number","description":"Total cost in this bucket","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens in this bucket","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens in this bucket","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens in this bucket","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total tool calls in this bucket","format":"int64"}},"description":"A single time bucket for time series metrics","required":["bucket_time_unix_nano","total_chats","resolved_chats","failed_chats","partial_chats","abandoned_chats","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","total_tool_calls","failed_tool_calls","avg_tool_latency_ms","avg_session_duration_ms"]},"Tool":{"type":"object","properties":{"external_mcp_tool_definition":{"$ref":"#/components/schemas/ExternalMCPToolDefinition"},"function_tool_definition":{"$ref":"#/components/schemas/FunctionToolDefinition"},"http_tool_definition":{"$ref":"#/components/schemas/HTTPToolDefinition"},"platform_tool_definition":{"$ref":"#/components/schemas/PlatformToolDefinition"},"prompt_template":{"$ref":"#/components/schemas/PromptTemplate"}},"description":"A polymorphic tool - can be an HTTP tool, function tool, prompt template, or external MCP proxy"},"ToolAnnotations":{"type":"object","properties":{"destructive_hint":{"type":"boolean","description":"If true, the tool may perform destructive updates (only meaningful when read_only_hint is false)"},"idempotent_hint":{"type":"boolean","description":"If true, repeated calls with same arguments have no additional effect (only meaningful when read_only_hint is false)"},"open_world_hint":{"type":"boolean","description":"If true, the tool interacts with external entities beyond its local environment"},"read_only_hint":{"type":"boolean","description":"If true, the tool does not modify its environment"},"title":{"type":"string","description":"Human-readable display name for the tool"}},"description":"Tool annotations providing behavioral hints about the tool"},"ToolCallSummary":{"type":"object","properties":{"event_source":{"type":"string","description":"Event source (from attributes.gram.event.source)"},"gram_urn":{"type":"string","description":"Gram URN associated with this tool call"},"http_status_code":{"type":"integer","description":"HTTP status code (if applicable)","format":"int32"},"log_count":{"type":"integer","description":"Total number of logs in this tool call","format":"int64"},"start_time_unix_nano":{"type":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"tool_name":{"type":"string","description":"Tool name (from attributes.gram.tool.name)"},"tool_source":{"type":"string","description":"Tool call source (from attributes.gram.tool_call.source)"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"}},"description":"Summary information for a tool call","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"ToolEntry":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"http_method":{"type":"string","description":"HTTP method for HTTP tools (GET, POST, PUT, PATCH, DELETE)"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"tool_urn":{"type":"string","description":"The URN of the tool"},"type":{"type":"string","description":"The type of tool","enum":["http","prompt","function","platform","externalmcp"]}},"required":["type","id","name","tool_urn"]},"ToolMetric":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average latency in milliseconds","format":"double"},"call_count":{"type":"integer","description":"Total number of calls","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed calls","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate (0.0 to 1.0)","format":"double"},"gram_urn":{"type":"string","description":"Tool URN"},"success_count":{"type":"integer","description":"Number of successful calls","format":"int64"}},"description":"Aggregated metrics for a single tool","required":["gram_urn","call_count","success_count","failure_count","avg_latency_ms","failure_rate"]},"ToolUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Total call count","format":"int64"},"failure_count":{"type":"integer","description":"Failed calls (4xx/5xx status)","format":"int64"},"success_count":{"type":"integer","description":"Successful calls (2xx status)","format":"int64"},"urn":{"type":"string","description":"Tool URN"}},"description":"Tool usage statistics","required":["urn","count","success_count","failure_count"]},"ToolVariation":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation"},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"created_at":{"type":"string","description":"The creation date of the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"group_id":{"type":"string","description":"The ID of the tool variation group"},"id":{"type":"string","description":"The ID of the tool variation"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"},"updated_at":{"type":"string","description":"The last update date of the tool variation"}},"required":["id","group_id","src_tool_name","src_tool_urn","created_at","updated_at"]},"Toolset":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServer"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"oauth_enablement_metadata":{"$ref":"#/components/schemas/OAuthEnablementMetadata"},"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServer"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The tools in this toolset"},"toolset_version":{"type":"integer","description":"The version of the toolset (will be 0 if none exists)","format":"int64"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The id of the user_session_issuer wired to this toolset. Set via toolsets.setUserSessionIssuer; null when no USI is linked."},"user_session_issuer_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","project_id","organization_id","account_type","name","slug","tools","tool_selection_mode","toolset_version","prompt_templates","tool_urns","resources","resource_urns","oauth_enablement_metadata","created_at","updated_at"]},"ToolsetEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"origin":{"$ref":"#/components/schemas/ToolsetOrigin"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplateEntry"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceEntry"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","name","slug","tools","tool_selection_mode","prompt_templates","tool_urns","resources","resource_urns","created_at","updated_at"]},"ToolsetEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the toolset environment link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"description":"A link between a toolset and an environment","required":["id","toolset_id","environment_id"]},"ToolsetOrigin":{"type":"object","properties":{"registry_specifier":{"type":"string","description":"The globally unique registry specifier this toolset originated from"}},"required":["registry_specifier"]},"ToolsetSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"description":"A lightweight summary of a toolset, containing only the fields needed for org-level listing (e.g. RBAC UI).","required":["id","project_id","organization_id","name","slug","tool_selection_mode","tools","created_at","updated_at"]},"TopServer":{"type":"object","properties":{"server_name":{"type":"string","description":"MCP server name"},"tool_call_count":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Top MCP server by tool call count","required":["server_name","tool_call_count"]},"TopUser":{"type":"object","properties":{"activity_count":{"type":"integer","description":"Number of messages (session mode) or tool calls (tool_call mode)","format":"int64"},"user_id":{"type":"string","description":"User ID (internal or external depending on availability)"},"user_type":{"type":"string","description":"Type of user ID","enum":["internal","external"]}},"description":"Top user by activity","required":["user_id","user_type","activity_count"]},"TriggerDefinition":{"type":"object","properties":{"config_schema":{"type":"string","description":"JSON schema describing the trigger config.","format":"json"},"description":{"type":"string","description":"Description of the trigger definition."},"env_requirements":{"type":"array","items":{"$ref":"#/components/schemas/TriggerEnvRequirement"},"description":"Environment variables required by this trigger definition."},"kind":{"type":"string","description":"The ingress kind for the trigger definition.","enum":["webhook","schedule"]},"slug":{"type":"string","description":"The trigger definition slug."},"title":{"type":"string","description":"The trigger definition title."}},"required":["slug","title","description","kind","config_schema","env_requirements"]},"TriggerEnvRequirement":{"type":"object","properties":{"description":{"type":"string","description":"Description of the variable."},"name":{"type":"string","description":"The environment variable name."},"required":{"type":"boolean","description":"Whether the variable is required."}},"required":["name","required"]},"TriggerInstance":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"created_at":{"type":"string","description":"Creation timestamp.","format":"date-time"},"definition_slug":{"type":"string","description":"The trigger definition slug."},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"id":{"type":"string","description":"The trigger instance ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"project_id":{"type":"string","description":"The project ID owning the trigger instance.","format":"uuid"},"status":{"type":"string","description":"The trigger instance status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The target kind for the trigger instance."},"target_ref":{"type":"string","description":"The opaque target reference."},"updated_at":{"type":"string","description":"Last update timestamp.","format":"date-time"},"webhook_url":{"type":"string","description":"Webhook URL for webhook-backed triggers."}},"required":["id","project_id","definition_slug","name","target_kind","target_ref","target_display","config","status","created_at","updated_at"]},"TriggerRiskAnalysisRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The policy ID.","format":"uuid"},"limit":{"type":"integer","description":"Cap the backfill at the most recent N unanalyzed messages. Defaults to 100 (the recent-N drain budget). Pass 0 to request a full backfill of every unanalyzed message.","default":100,"format":"int32","minimum":0}},"required":["id"]},"UpdateAssistantForm":{"type":"object","properties":{"id":{"type":"string","description":"The assistant ID.","format":"uuid"},"instructions":{"type":"string","description":"The system instructions for the assistant."},"max_concurrency":{"type":"integer","description":"Maximum active warm runtimes.","format":"int64"},"model":{"type":"string","description":"The model identifier used by the assistant."},"name":{"type":"string","description":"The assistant name."},"status":{"type":"string","description":"The assistant status.","enum":["active","paused"]},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/AssistantToolsetRef"},"description":"Toolsets available to the assistant."},"warm_ttl_seconds":{"type":"integer","description":"Warm runtime TTL in seconds.","format":"int64"}},"required":["id"]},"UpdateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for updating an environment","required":["slug","entries_to_update","entries_to_remove"]},"UpdateEnvironmentRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"}},"required":["entries_to_update","entries_to_remove"]},"UpdateInviteRoleRequestBody":{"type":"object","properties":{"invitation_id":{"type":"string","description":"WorkOS invitation ID."},"role_id":{"type":"string","description":"Role ID to assign to the invitee."}},"required":["invitation_id","role_id"]},"UpdateMcpEndpointForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to register the endpoint slug under. Omit to move the endpoint to a platform domain.","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP endpoint to update","format":"uuid"},"mcp_server_id":{"type":"string","description":"The ID of the MCP server this endpoint addresses","format":"uuid"},"slug":{"type":"string","description":"A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":128}},"description":"Form for updating an MCP endpoint. This is a full-record replace: the custom_domain_id field omitted from the request becomes null on the stored record. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.","required":["id","mcp_server_id","slug"]},"UpdateMcpServerForm":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to associate with the server","format":"uuid"},"id":{"type":"string","description":"The ID of the MCP server to update","format":"uuid"},"name":{"type":"string","description":"A human-readable display name for the server. Omit to leave the existing name unchanged; if provided, must be non-empty."},"remote_mcp_server_id":{"type":"string","description":"The ID of the remote MCP server to use as the backend","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset to use as the backend","format":"uuid"},"user_session_issuer_id":{"type":"string","description":"The ID of the user session issuer that gates OAuth-based MCP client authentication. Omit to disable issuer-gated OAuth.","format":"uuid"},"visibility":{"type":"string","description":"The visibility of an MCP server","enum":["disabled","private","public"]}},"description":"Form for updating an MCP server. This is a full-record replace: fields omitted from the request become null on the stored record. Exactly one of remote_mcp_server_id or toolset_id must be provided. Omit name to leave the existing display name unchanged; the slug is recomputed server-side from the resulting name.","required":["id","visibility"]},"UpdateMemberRolesForm":{"type":"object","properties":{"role_ids":{"type":"array","items":{"type":"string"},"description":"The role IDs to assign. Replaces all existing role assignments."},"user_id":{"type":"string","description":"The user ID to update."}},"required":["user_id","role_ids"]},"UpdateOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerUpdateForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"UpdateOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerUpdateForm"}},"required":["oauth_proxy_server"]},"UpdateOrganizationRequestBody":{"type":"object","properties":{"account_type":{"type":"string","description":"New gram_account_type (e.g. free, pro, enterprise)."},"id":{"type":"string","description":"Organization ID."},"whitelisted":{"type":"boolean","description":"New whitelisted flag."}},"required":["id"]},"UpdatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"id":{"type":"string","description":"The id of the package to update","maxLength":50},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["id"]},"UpdatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"UpdatePluginForm":{"type":"object","properties":{"description":{"type":"string","description":"Updated description."},"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Updated display name."},"slug":{"type":"string","description":"Updated slug."}},"required":["id","name","slug"]},"UpdatePluginServerForm":{"type":"object","properties":{"display_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"plugin_id":{"type":"string","format":"uuid"},"policy":{"type":"string","default":"required","enum":["required","optional"]},"sort_order":{"type":"integer","default":0,"format":"int32"}},"required":["id","plugin_id","display_name"]},"UpdatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"id":{"type":"string","description":"The ID of the prompt template to update"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the prompt template. Will be updated via variation"},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["id"]},"UpdatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"UpdateRemoteSessionClientForm":{"type":"object","properties":{"audience":{"type":"string","description":"Replace the upstream OAuth audience sent for this client. Omit to leave unchanged.","pattern":"^[!-~]+$","maxLength":512},"client_secret":{"type":"string","description":"Rotate the client secret. Gram re-encrypts before persisting."},"id":{"type":"string","description":"The remote_session_client id.","format":"uuid"},"scope":{"type":"array","items":{"type":"string","pattern":"^[!#-[\\]-~]+$","maxLength":128},"description":"Replace the explicit upstream OAuth scopes for this client. Omit to leave unchanged."},"token_endpoint_auth_method":{"type":"string","description":"Change how the client authenticates at the issuer's token endpoint.","enum":["client_secret_basic","client_secret_post"]},"user_session_issuer_id":{"type":"string","description":"Re-pair with a different user_session_issuer.","format":"uuid"}},"description":"Form for updating a remote_session_client. All non-id fields are optional patches.","required":["id"]},"UpdateRemoteSessionIssuerForm":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"Upstream authorization endpoint."},"grant_types_supported":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"The remote_session_issuer id.","format":"uuid"},"issuer":{"type":"string","description":"Issuer URL; matches the iss claim."},"jwks_uri":{"type":"string","description":"Upstream JWKS URI."},"oidc":{"type":"boolean"},"passthrough":{"type":"boolean"},"registration_endpoint":{"type":"string","description":"Upstream RFC 7591 registration endpoint."},"response_types_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"slug":{"type":"string","description":"Rename the slug."},"token_endpoint":{"type":"string","description":"Upstream token endpoint."},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"description":"Form for updating a remote_session_issuer. All non-id fields are optional patches.","required":["id"]},"UpdateRequestBody":{"type":"object","properties":{"collection_id":{"type":"string","description":"ID of the collection to update","format":"uuid"},"description":{"type":"string","description":"Description of the collection","maxLength":500},"name":{"type":"string","description":"Display name for the collection","minLength":1,"maxLength":100},"visibility":{"type":"string","description":"Visibility of the collection","enum":["public","private"]}},"required":["collection_id"]},"UpdateRiskPolicyRequestBody":{"type":"object","properties":{"action":{"type":"string","description":"Policy action: flag or block.","enum":["flag","block"]},"auto_name":{"type":"boolean","description":"Whether the policy name should be auto-generated."},"enabled":{"type":"boolean","description":"Whether the policy is active."},"id":{"type":"string","description":"The policy ID.","format":"uuid"},"name":{"type":"string","description":"The policy name."},"presidio_entities":{"type":"array","items":{"type":"string"},"description":"Presidio entity types to detect."},"prompt_injection_rules":{"type":"array","items":{"type":"string"},"description":"Prompt-injection detection rule ids to enable in addition to the heuristic baseline (e.g. 'deberta-v3-classifier')."},"sources":{"type":"array","items":{"type":"string"},"description":"Detection sources to enable."},"user_message":{"type":"string","description":"Optional message shown to end users when this policy blocks an action or surfaces a flagged finding. Send an empty string to clear."}},"required":["id","name"]},"UpdateRoleForm":{"type":"object","properties":{"description":{"type":"string","description":"Updated description."},"grants":{"type":"array","items":{"$ref":"#/components/schemas/RoleGrant"},"description":"Updated scope grants."},"id":{"type":"string","description":"The ID of the role to update."},"member_ids":{"type":"array","items":{"type":"string"},"description":"Optional member IDs to additionally assign to this role. Existing assignments are preserved."},"name":{"type":"string","description":"Updated display name."}},"required":["id"]},"UpdateSecurityVariableDisplayNameForm":{"type":"object","properties":{"display_name":{"type":"string","description":"The user-friendly display name. Set to empty string to clear and use the original name.","maxLength":120},"project_slug_input":{"type":"string"},"security_key":{"type":"string","description":"The security scheme key (e.g., 'BearerAuth', 'ApiKeyAuth') from the OpenAPI spec","maxLength":60},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug","security_key","display_name"]},"UpdateServerForm":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/HeaderInput"},"description":"The complete desired set of headers. Omit to leave headers unchanged. Provide an empty array to remove all headers."},"id":{"type":"string","description":"The ID of the remote MCP server to update"},"name":{"type":"string","description":"Optional human-readable name. Pass an empty string to clear the existing name."},"transport_type":{"type":"string","description":"The transport type for the remote MCP server"},"url":{"type":"string","description":"The URL of the remote MCP server","format":"uri"}},"description":"Form for updating a remote MCP server. When headers is provided, it represents the complete desired set of headers — any existing headers not in the list will be removed.","required":["id"]},"UpdateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"New display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"}},"required":["id"]},"UpdateToolsetForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"project_slug_input":{"type":"string"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["slug"]},"UpdateToolsetRequestBody":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"The slug of the MCP to use for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}}},"UpdateTriggerInstanceForm":{"type":"object","properties":{"config":{"type":"object","description":"The trigger config payload.","additionalProperties":true},"environment_id":{"type":"string","description":"The linked environment ID.","format":"uuid"},"id":{"type":"string","description":"The trigger instance ID.","format":"uuid"},"name":{"type":"string","description":"The trigger instance name."},"status":{"type":"string","description":"The trigger status.","enum":["active","paused"]},"target_display":{"type":"string","description":"The user-facing target display value."},"target_kind":{"type":"string","description":"The trigger target kind.","enum":["assistant","noop"]},"target_ref":{"type":"string","description":"The opaque target reference."}},"required":["id"]},"UpdateUserSessionIssuerForm":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"chain | interactive.","enum":["chain","interactive"]},"id":{"type":"string","description":"The user_session_issuer id.","format":"uuid"},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Rename the slug."}},"description":"Form for updating a user_session_issuer. All non-id fields are optional patches.","required":["id"]},"UploadChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadChatAttachmentResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"url":{"type":"string","description":"The URL to serve the chat attachment"}},"required":["asset","url"]},"UploadFunctionsForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadFunctionsResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadImageForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadImageResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadOpenAPIv3Result":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UpsertAllowedOriginForm":{"type":"object","properties":{"origin":{"type":"string","description":"The origin URL to upsert","minLength":1,"maxLength":500},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]}},"required":["origin"]},"UpsertAllowedOriginResult":{"type":"object","properties":{"allowed_origin":{"$ref":"#/components/schemas/AllowedOrigin"}},"required":["allowed_origin"]},"UpsertConfigRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether forwarding should be active."},"endpoint_url":{"type":"string","description":"URL to forward OTEL payloads to."},"headers":{"type":"array","items":{"$ref":"#/components/schemas/OtelForwardingHeaderInput"},"description":"Full set of headers to attach. Replaces any existing headers."}},"required":["endpoint_url","enabled"]},"UpsertGlobalToolVariationForm":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation","enum":["always","never","session"]},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"summary":{"type":"string","description":"The summary of the tool variation"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"}},"required":["src_tool_name","src_tool_urn"]},"UpsertGlobalToolVariationResult":{"type":"object","properties":{"variation":{"$ref":"#/components/schemas/ToolVariation"}},"required":["variation"]},"UpsertRequestBody":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name"},"raw_server_name":{"type":"string","description":"Original server name from hooks"}},"required":["raw_server_name","display_name"]},"UsageTiers":{"type":"object","properties":{"enterprise":{"$ref":"#/components/schemas/TierLimits"},"free":{"$ref":"#/components/schemas/TierLimits"},"pro":{"$ref":"#/components/schemas/TierLimits"}},"required":["free","pro","enterprise"]},"UserSession":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","description":"Terminal session expiry; ceiling on refresh_expires_at.","format":"date-time"},"id":{"type":"string","description":"The user_session id.","format":"uuid"},"jti":{"type":"string","description":"Current access-token JTI; used by the revocation path."},"refresh_expires_at":{"type":"string","description":"Next refresh deadline.","format":"date-time"},"subject_urn":{"type":"string","description":"The session's subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The issuing user_session_issuer id.","format":"uuid"}},"description":"An issued user_session record. refresh_token_hash is never returned.","required":["id","user_session_issuer_id","subject_urn","jti","refresh_expires_at","expires_at","created_at","updated_at"]},"UserSessionClient":{"type":"object","properties":{"client_id":{"type":"string","description":"DCR-issued client_id."},"client_id_issued_at":{"type":"string","format":"date-time"},"client_name":{"type":"string","description":"Display name from the registration request."},"client_secret_expires_at":{"type":"string","description":"Null when the secret does not expire.","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_client id.","format":"uuid"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Validated on every /authorize."},"updated_at":{"type":"string","format":"date-time"},"user_session_issuer_id":{"type":"string","description":"The owning user_session_issuer id.","format":"uuid"}},"description":"A user_session_client (DCR'd MCP client). client_secret_hash is never returned.","required":["id","user_session_issuer_id","client_id","client_name","redirect_uris","client_id_issued_at","created_at","updated_at"]},"UserSessionConsent":{"type":"object","properties":{"consented_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_consent id.","format":"uuid"},"remote_set_hash":{"type":"string","description":"SHA-256 of the sorted list of remote_session_issuer ids on the client's owning issuer at consent time."},"subject_urn":{"type":"string","description":"The consenting subject URN (user:\u003cid\u003e | apikey:\u003cuuid\u003e | anonymous:\u003cmcp-session-id\u003e)."},"updated_at":{"type":"string","format":"date-time"},"user_session_client_id":{"type":"string","description":"The user_session_client this consent binds to.","format":"uuid"}},"description":"A user_session_consent record. Per-client (not per-issuer) consent.","required":["id","subject_urn","user_session_client_id","remote_set_hash","consented_at","created_at","updated_at"]},"UserSessionIssuer":{"type":"object","properties":{"authn_challenge_mode":{"type":"string","description":"chain | interactive."},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"The user_session_issuer id.","format":"uuid"},"project_id":{"type":"string","description":"The owning project id.","format":"uuid"},"session_duration_hours":{"type":"integer","description":"Issued user session lifetime, in hours.","format":"int64"},"slug":{"type":"string","description":"Project-unique slug."},"updated_at":{"type":"string","format":"date-time"}},"description":"A user_session_issuer record.","required":["id","project_id","slug","authn_challenge_mode","session_duration_hours","created_at","updated_at"]},"UserSummary":{"type":"object","properties":{"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"cache_creation_input_tokens":{"type":"integer","description":"Sum of cache creation input tokens","format":"int64"},"cache_read_input_tokens":{"type":"integer","description":"Sum of cache read input tokens","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"hook_sources":{"type":"array","items":{"$ref":"#/components/schemas/HookSourceUsage"},"description":"Per-hook-source usage breakdown"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"Per-tool usage breakdown"},"total_chat_requests":{"type":"integer","description":"Total number of chat completion requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions","format":"int64"},"total_cost":{"type":"number","description":"Total cost of all requests","format":"double"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"},"user_id":{"type":"string","description":"User identifier (user_id or external_user_id depending on group_by)"}},"description":"Aggregated usage summary for a single user","required":["user_id","first_seen_unix_nano","last_seen_unix_nano","total_chats","total_chat_requests","total_input_tokens","total_output_tokens","total_tokens","cache_read_input_tokens","cache_creation_input_tokens","total_cost","avg_tokens_per_request","total_tool_calls","tool_call_success","tool_call_failure","tools","hook_sources"]},"ValidateKeyOrganization":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"}},"required":["id","name","slug"]},"ValidateKeyProject":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"}},"required":["id","name","slug"]},"ValidateKeyResult":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ValidateKeyOrganization"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ValidateKeyProject"},"description":"The projects accessible with this key"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"}},"required":["organization","projects","scopes"]},"VerifyURLForm":{"type":"object","properties":{"transport_type":{"type":"string","description":"The transport type for the remote MCP server (e.g. streamable-http)"},"url":{"type":"string","description":"The URL of the remote MCP server to probe","format":"uri"}},"description":"Form for probing a remote MCP server URL","required":["url","transport_type"]},"VerifyURLResult":{"type":"object","properties":{"http_status":{"type":"integer","description":"HTTP status code returned by the URL, if any","format":"int64"},"message":{"type":"string","description":"Human-readable summary of the verification outcome"},"verified":{"type":"boolean","description":"Whether the URL responded in a way consistent with a remote MCP server"}},"description":"Outcome of a remote MCP server URL verification","required":["verified","message"]}},"securitySchemes":{"admin_auth_header_Authorization":{"type":"apiKey","description":"Admin session auth for admin endpoints. Cookie-only credential; session is validated against Google on every request.","name":"Authorization","in":"header"},"apikey_header_Authorization":{"type":"apiKey","description":"key based auth.","name":"Authorization","in":"header"},"apikey_header_Gram-Key":{"type":"apiKey","description":"key based auth.","name":"Gram-Key","in":"header"},"chat_sessions_token_header_Gram-Chat-Session":{"type":"http","description":"Gram Chat Sessions token based auth.","scheme":"bearer"},"function_token_header_Authorization":{"type":"http","description":"Gram Functions token based auth.","scheme":"bearer"},"project_slug_header_Gram-Project":{"type":"apiKey","description":"project slug header auth.","name":"Gram-Project","in":"header"},"session_header_Gram-Session":{"type":"apiKey","description":"Session based auth. By cookie or header.","name":"Gram-Session","in":"header"}}},"tags":[{"name":"access","description":"Manage roles, team member access control, and authorization challenge events."},{"name":"admin","description":"Operations supporting admin tasks, protected by Google workspace auth."},{"name":"assets","description":"Manages assets used by Gram projects."},{"name":"assistantMemories","description":"Manage assistant memory records."},{"name":"assistants","description":"Manage assistants and their runtime configuration."},{"name":"auditlogs","description":"Manages audit logs in Gram."},{"name":"auth","description":"Managed auth for gram producers and dashboard."},{"name":"chat","description":"Managed chats for gram AI consumers."},{"name":"chatSessions","description":"Manages chat session tokens for client-side authentication"},{"name":"deployments","description":"Manages deployments of tools from upstream sources."},{"name":"domains","description":"Manage custom domains for gram."},{"name":"environments","description":"Managing toolset environments."},{"name":"mcpRegistries","description":"External MCP registry operations"},{"name":"collections","description":"MCP collection operations"},{"name":"functions","description":"Endpoints for working with functions."},{"name":"hooksServerNames","description":"Manages display name overrides for hooks servers."},{"name":"hooks","description":"Receives hook events from coding assistants for tool usage observability."},{"name":"instances","description":"Consumer APIs for interacting with all relevant data for an instance of a toolset and environment."},{"name":"integrations","description":"Explore third-party tools in Gram."},{"name":"keys","description":"Managing system api keys."},{"name":"mcpEndpoints","description":"Managing MCP endpoints, the url-friendly slug identifiers that address MCP servers."},{"name":"mcpMetadata","description":"Manages metadata for the MCP install page shown to users."},{"name":"mcpServers","description":"Managing MCP servers, which configure authentication, environment, and backend selection for an MCP server."},{"name":"organizations","description":"Organization membership, invitations, and directory."},{"name":"otelForwarding","description":"Manage per-organization forwarding of inbound OTEL hook payloads to a customer-owned endpoint."},{"name":"packages","description":"Manages packages in Gram."},{"name":"plugins","description":"Manage distributable plugin bundles of MCP servers and hooks."},{"name":"features","description":"Manage product level feature controls."},{"name":"projects","description":"Manages projects in Gram."},{"name":"remoteMcp","description":"Managing remote MCP servers."},{"name":"remoteSessionClients","description":"Manage remote_session_client records — credentials Gram uses when acting as an OAuth client of a remote_session_issuer. client_secret_encrypted is never returned."},{"name":"remoteSessionIssuers","description":"Manage remote_session_issuer records — upstream Authorization Server identity records that Gram talks to as an OAuth client."},{"name":"remoteSessions","description":"Operator visibility into remote_sessions Gram is holding on a principal's behalf. Read + revoke; sessions are written by /mcp/{slug}/remote_login_callback and the silent-refresh path. access_token_encrypted and refresh_token_encrypted are never returned."},{"name":"resources","description":"Dashboard API for interacting with resources."},{"name":"risk","description":"Manage risk analysis policies and view scan results."},{"name":"slack","description":"Auth and interactions for the Gram Slack App."},{"name":"telemetry","description":"Fetch telemetry data for tools in Gram."},{"name":"templates","description":"Manages re-usable prompt templates and higher-order tools for a project."},{"name":"tools","description":"Dashboard API for interacting with tools."},{"name":"toolsets","description":"Managed toolsets for gram AI consumers."},{"name":"triggers","description":"Manage project trigger instances and static trigger definitions."},{"name":"usage","description":"Read usage for gram."},{"name":"userSessionClients","description":"Operator visibility into DCR'd MCP clients (user_session_clients). Read + revoke; registrations are written by /mcp/{slug}/register."},{"name":"userSessionConsents","description":"Operator visibility into user_session_consents — persistent consent records per (subject, user_session_client). List + revoke."},{"name":"userSessionIssuers","description":"Manage user_session_issuer records — Gram-side authorization-server configuration that issues user sessions for an MCP server."},{"name":"userSessions","description":"Operator visibility into issued user_sessions. List + revoke; sessions are written by /mcp/{slug}/token."},{"name":"variations","description":"Manage variations of tools."},{"name":"external","description":"Endpoints for external services to interact with gram."}]} \ No newline at end of file diff --git a/server/gen/http/openapi3.yaml b/server/gen/http/openapi3.yaml index c568e8eb38..5fcd504639 100644 --- a/server/gen/http/openapi3.yaml +++ b/server/gen/http/openapi3.yaml @@ -20417,6 +20417,175 @@ paths: x-speakeasy-name-override: list x-speakeasy-react-hook: name: RiskListResults + /rpc/risk.results.listForAgent: + get: + description: List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim. + operationId: listRiskResultsForAgent + parameters: + - allowEmptyValue: true + description: Optional policy ID to filter by. + in: query + name: policy_id + schema: + description: Optional policy ID to filter by. + format: uuid + type: string + - allowEmptyValue: true + description: Optional chat ID to filter by. + in: query + name: chat_id + schema: + description: Optional chat ID to filter by. + format: uuid + type: string + - allowEmptyValue: true + description: Optional rule category key to filter by (e.g. secrets, pii, financial). + in: query + name: category + schema: + description: Optional rule category key to filter by (e.g. secrets, pii, financial). + type: string + - allowEmptyValue: true + description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules). + in: query + name: rule_id + schema: + description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules). + type: string + - allowEmptyValue: true + description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body. + in: query + name: unique_match + schema: + description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body. + type: boolean + - allowEmptyValue: true + description: Filter results to messages created at or after this timestamp (ISO 8601). + in: query + name: from + schema: + description: Filter results to messages created at or after this timestamp (ISO 8601). + format: date-time + type: string + - allowEmptyValue: true + description: Filter results to messages created strictly before this timestamp (ISO 8601). + in: query + name: to + schema: + description: Filter results to messages created strictly before this timestamp (ISO 8601). + format: date-time + type: string + - allowEmptyValue: true + description: Cursor to fetch the next page of results. + in: query + name: cursor + schema: + description: Cursor to fetch the next page of results. + type: string + - allowEmptyValue: true + description: Maximum number of results to return per page. + in: query + name: limit + schema: + description: Maximum number of results to return per page. + format: int64 + maximum: 200 + minimum: 1 + type: integer + - allowEmptyValue: true + description: API Key header + in: header + name: Gram-Key + schema: + description: API Key header + type: string + - allowEmptyValue: true + description: Session header + in: header + name: Gram-Session + schema: + description: Session header + type: string + - allowEmptyValue: true + description: project header + in: header + name: Gram-Project + schema: + description: project header + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListRiskResultsForAgentResult' + description: OK response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'bad_request: request is invalid' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unauthorized: unauthorized access' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'forbidden: permission denied' + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'not_found: resource not found' + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'conflict: resource already exists' + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unsupported_media: unsupported media type' + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'invalid: request contains one or more invalidation fields' + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'unexpected: an unexpected error occurred' + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: 'gateway_error: an unexpected error occurred' + security: + - apikey_header_Gram-Key: [] + project_slug_header_Gram-Project: [] + - project_slug_header_Gram-Project: [] + session_header_Gram-Session: [] + summary: listRiskResultsForAgent risk + tags: + - risk + x-speakeasy-group: risk.results + x-speakeasy-name-override: listForAgent + x-speakeasy-react-hook: + name: RiskListResultsForAgent /rpc/slack-apps.configure: post: description: Store Slack credentials (client ID, client secret, signing secret) for an app. @@ -32882,6 +33051,24 @@ components: description: Cursor for the next page of results. required: - chats + ListRiskResultsForAgentResult: + type: object + properties: + next_cursor: + type: string + description: Cursor for the next page of results. + results: + type: array + items: + $ref: '#/components/schemas/RiskResultRedacted' + description: The list of risk results with match content redacted to opaque fingerprints. + total_count: + type: integer + description: Total number of findings across all enabled policies. + format: int64 + required: + - results + - total_count ListRiskResultsResult: type: object properties: @@ -35846,6 +36033,72 @@ components: - chat_message_id - source - created_at + RiskResultRedacted: + type: object + properties: + chat_id: + type: string + description: The chat session containing the message. + format: uuid + chat_message_id: + type: string + description: The chat message that was scanned. + format: uuid + chat_title: + type: string + description: Title of the chat session. + confidence: + type: number + description: Confidence score for this finding. + format: double + created_at: + type: string + description: When this result was created. + format: date-time + description: + type: string + description: Human-readable description of the finding. + id: + type: string + description: The result ID. + format: uuid + match_redacted: + type: string + description: Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim. + policy_id: + type: string + description: The risk policy ID. + format: uuid + policy_version: + type: integer + description: Policy version when this result was produced. + format: int64 + position_known: + type: boolean + description: Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks. + rule_id: + type: string + description: The matched rule identifier. + source: + type: string + description: Detection source (e.g. gitleaks, presidio, shadow_mcp). + tags: + type: array + items: + type: string + description: Tags from the detection rule. + user_id: + type: string + description: The user who owns the chat session. + required: + - id + - policy_id + - policy_version + - chat_message_id + - source + - created_at + - match_redacted + - position_known RiskRuleBreakdownEntry: type: object properties: diff --git a/server/gen/http/risk/client/cli.go b/server/gen/http/risk/client/cli.go index 65a3c407aa..a6664121a0 100644 --- a/server/gen/http/risk/client/cli.go +++ b/server/gen/http/risk/client/cli.go @@ -419,6 +419,135 @@ func BuildListRiskResultsPayload(riskListRiskResultsPolicyID string, riskListRis return v, nil } +// BuildListRiskResultsForAgentPayload builds the payload for the risk +// listRiskResultsForAgent endpoint from CLI flags. +func BuildListRiskResultsForAgentPayload(riskListRiskResultsForAgentPolicyID string, riskListRiskResultsForAgentChatID string, riskListRiskResultsForAgentCategory string, riskListRiskResultsForAgentRuleID string, riskListRiskResultsForAgentUniqueMatch string, riskListRiskResultsForAgentFrom string, riskListRiskResultsForAgentTo string, riskListRiskResultsForAgentCursor string, riskListRiskResultsForAgentLimit string, riskListRiskResultsForAgentApikeyToken string, riskListRiskResultsForAgentSessionToken string, riskListRiskResultsForAgentProjectSlugInput string) (*risk.ListRiskResultsForAgentPayload, error) { + var err error + var policyID *string + { + if riskListRiskResultsForAgentPolicyID != "" { + policyID = &riskListRiskResultsForAgentPolicyID + err = goa.MergeErrors(err, goa.ValidateFormat("policy_id", *policyID, goa.FormatUUID)) + if err != nil { + return nil, err + } + } + } + var chatID *string + { + if riskListRiskResultsForAgentChatID != "" { + chatID = &riskListRiskResultsForAgentChatID + err = goa.MergeErrors(err, goa.ValidateFormat("chat_id", *chatID, goa.FormatUUID)) + if err != nil { + return nil, err + } + } + } + var category *string + { + if riskListRiskResultsForAgentCategory != "" { + category = &riskListRiskResultsForAgentCategory + } + } + var ruleID *string + { + if riskListRiskResultsForAgentRuleID != "" { + ruleID = &riskListRiskResultsForAgentRuleID + } + } + var uniqueMatch *bool + { + if riskListRiskResultsForAgentUniqueMatch != "" { + var val bool + val, err = strconv.ParseBool(riskListRiskResultsForAgentUniqueMatch) + uniqueMatch = &val + if err != nil { + return nil, fmt.Errorf("invalid value for uniqueMatch, must be BOOL") + } + } + } + var from *string + { + if riskListRiskResultsForAgentFrom != "" { + from = &riskListRiskResultsForAgentFrom + err = goa.MergeErrors(err, goa.ValidateFormat("from", *from, goa.FormatDateTime)) + if err != nil { + return nil, err + } + } + } + var to *string + { + if riskListRiskResultsForAgentTo != "" { + to = &riskListRiskResultsForAgentTo + err = goa.MergeErrors(err, goa.ValidateFormat("to", *to, goa.FormatDateTime)) + if err != nil { + return nil, err + } + } + } + var cursor *string + { + if riskListRiskResultsForAgentCursor != "" { + cursor = &riskListRiskResultsForAgentCursor + } + } + var limit *int + { + if riskListRiskResultsForAgentLimit != "" { + var v int64 + v, err = strconv.ParseInt(riskListRiskResultsForAgentLimit, 10, strconv.IntSize) + val := int(v) + limit = &val + if err != nil { + return nil, fmt.Errorf("invalid value for limit, must be INT") + } + if *limit < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", *limit, 1, true)) + } + if *limit > 200 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", *limit, 200, false)) + } + if err != nil { + return nil, err + } + } + } + var apikeyToken *string + { + if riskListRiskResultsForAgentApikeyToken != "" { + apikeyToken = &riskListRiskResultsForAgentApikeyToken + } + } + var sessionToken *string + { + if riskListRiskResultsForAgentSessionToken != "" { + sessionToken = &riskListRiskResultsForAgentSessionToken + } + } + var projectSlugInput *string + { + if riskListRiskResultsForAgentProjectSlugInput != "" { + projectSlugInput = &riskListRiskResultsForAgentProjectSlugInput + } + } + v := &risk.ListRiskResultsForAgentPayload{} + v.PolicyID = policyID + v.ChatID = chatID + v.Category = category + v.RuleID = ruleID + v.UniqueMatch = uniqueMatch + v.From = from + v.To = to + v.Cursor = cursor + v.Limit = limit + v.ApikeyToken = apikeyToken + v.SessionToken = sessionToken + v.ProjectSlugInput = projectSlugInput + + return v, nil +} + // BuildListRiskResultsByChatPayload builds the payload for the risk // listRiskResultsByChat endpoint from CLI flags. func BuildListRiskResultsByChatPayload(riskListRiskResultsByChatCursor string, riskListRiskResultsByChatLimit string, riskListRiskResultsByChatApikeyToken string, riskListRiskResultsByChatSessionToken string, riskListRiskResultsByChatProjectSlugInput string) (*risk.ListRiskResultsByChatPayload, error) { diff --git a/server/gen/http/risk/client/client.go b/server/gen/http/risk/client/client.go index b54120b223..5808dd9d5d 100644 --- a/server/gen/http/risk/client/client.go +++ b/server/gen/http/risk/client/client.go @@ -45,6 +45,10 @@ type Client struct { // listRiskResults endpoint. ListRiskResultsDoer goahttp.Doer + // ListRiskResultsForAgent Doer is the HTTP client used to make requests to the + // listRiskResultsForAgent endpoint. + ListRiskResultsForAgentDoer goahttp.Doer + // ListRiskResultsByChat Doer is the HTTP client used to make requests to the // listRiskResultsByChat endpoint. ListRiskResultsByChatDoer goahttp.Doer @@ -112,6 +116,7 @@ func NewClient( UpdateRiskPolicyDoer: doer, DeleteRiskPolicyDoer: doer, ListRiskResultsDoer: doer, + ListRiskResultsForAgentDoer: doer, ListRiskResultsByChatDoer: doer, GetRiskOverviewDoer: doer, ListRiskCategoriesDoer: doer, @@ -298,6 +303,30 @@ func (c *Client) ListRiskResults() goa.Endpoint { } } +// ListRiskResultsForAgent returns an endpoint that makes HTTP requests to the +// risk service listRiskResultsForAgent server. +func (c *Client) ListRiskResultsForAgent() goa.Endpoint { + var ( + encodeRequest = EncodeListRiskResultsForAgentRequest(c.encoder) + decodeResponse = DecodeListRiskResultsForAgentResponse(c.decoder, c.RestoreResponseBody) + ) + return func(ctx context.Context, v any) (any, error) { + req, err := c.BuildListRiskResultsForAgentRequest(ctx, v) + if err != nil { + return nil, err + } + err = encodeRequest(req, v) + if err != nil { + return nil, err + } + resp, err := c.ListRiskResultsForAgentDoer.Do(req) + if err != nil { + return nil, goahttp.ErrRequestError("risk", "listRiskResultsForAgent", err) + } + return decodeResponse(resp) + } +} + // ListRiskResultsByChat returns an endpoint that makes HTTP requests to the // risk service listRiskResultsByChat server. func (c *Client) ListRiskResultsByChat() goa.Endpoint { diff --git a/server/gen/http/risk/client/encode_decode.go b/server/gen/http/risk/client/encode_decode.go index fa9c8f98e1..a6a214fdde 100644 --- a/server/gen/http/risk/client/encode_decode.go +++ b/server/gen/http/risk/client/encode_decode.go @@ -1716,6 +1716,274 @@ func DecodeListRiskResultsResponse(decoder func(*http.Response) goahttp.Decoder, } } +// BuildListRiskResultsForAgentRequest instantiates a HTTP request object with +// method and path set to call the "risk" service "listRiskResultsForAgent" +// endpoint +func (c *Client) BuildListRiskResultsForAgentRequest(ctx context.Context, v any) (*http.Request, error) { + u := &url.URL{Scheme: c.scheme, Host: c.host, Path: ListRiskResultsForAgentRiskPath()} + req, err := http.NewRequest("GET", u.String(), nil) + if err != nil { + return nil, goahttp.ErrInvalidURL("risk", "listRiskResultsForAgent", u.String(), err) + } + if ctx != nil { + req = req.WithContext(ctx) + } + + return req, nil +} + +// EncodeListRiskResultsForAgentRequest returns an encoder for requests sent to +// the risk listRiskResultsForAgent server. +func EncodeListRiskResultsForAgentRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error { + return func(req *http.Request, v any) error { + p, ok := v.(*risk.ListRiskResultsForAgentPayload) + if !ok { + return goahttp.ErrInvalidType("risk", "listRiskResultsForAgent", "*risk.ListRiskResultsForAgentPayload", v) + } + if p.ApikeyToken != nil { + head := *p.ApikeyToken + req.Header.Set("Gram-Key", head) + } + if p.SessionToken != nil { + head := *p.SessionToken + req.Header.Set("Gram-Session", head) + } + if p.ProjectSlugInput != nil { + head := *p.ProjectSlugInput + req.Header.Set("Gram-Project", head) + } + values := req.URL.Query() + if p.PolicyID != nil { + values.Add("policy_id", *p.PolicyID) + } + if p.ChatID != nil { + values.Add("chat_id", *p.ChatID) + } + if p.Category != nil { + values.Add("category", *p.Category) + } + if p.RuleID != nil { + values.Add("rule_id", *p.RuleID) + } + if p.UniqueMatch != nil { + values.Add("unique_match", fmt.Sprintf("%v", *p.UniqueMatch)) + } + if p.From != nil { + values.Add("from", *p.From) + } + if p.To != nil { + values.Add("to", *p.To) + } + if p.Cursor != nil { + values.Add("cursor", *p.Cursor) + } + if p.Limit != nil { + values.Add("limit", fmt.Sprintf("%v", *p.Limit)) + } + req.URL.RawQuery = values.Encode() + return nil + } +} + +// DecodeListRiskResultsForAgentResponse returns a decoder for responses +// returned by the risk listRiskResultsForAgent endpoint. restoreBody controls +// whether the response body should be restored after having been read. +// DecodeListRiskResultsForAgentResponse may return the following errors: +// - "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized +// - "forbidden" (type *goa.ServiceError): http.StatusForbidden +// - "bad_request" (type *goa.ServiceError): http.StatusBadRequest +// - "not_found" (type *goa.ServiceError): http.StatusNotFound +// - "conflict" (type *goa.ServiceError): http.StatusConflict +// - "unsupported_media" (type *goa.ServiceError): http.StatusUnsupportedMediaType +// - "invalid" (type *goa.ServiceError): http.StatusUnprocessableEntity +// - "invariant_violation" (type *goa.ServiceError): http.StatusInternalServerError +// - "unexpected" (type *goa.ServiceError): http.StatusInternalServerError +// - "gateway_error" (type *goa.ServiceError): http.StatusBadGateway +// - error: internal error +func DecodeListRiskResultsForAgentResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { + if restoreBody { + b, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + resp.Body = io.NopCloser(bytes.NewBuffer(b)) + defer func() { + resp.Body = io.NopCloser(bytes.NewBuffer(b)) + }() + } else { + defer resp.Body.Close() + } + switch resp.StatusCode { + case http.StatusOK: + var ( + body ListRiskResultsForAgentResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + res := NewListRiskResultsForAgentResultOK(&body) + return res, nil + case http.StatusUnauthorized: + var ( + body ListRiskResultsForAgentUnauthorizedResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentUnauthorizedResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentUnauthorized(&body) + case http.StatusForbidden: + var ( + body ListRiskResultsForAgentForbiddenResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentForbiddenResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentForbidden(&body) + case http.StatusBadRequest: + var ( + body ListRiskResultsForAgentBadRequestResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentBadRequestResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentBadRequest(&body) + case http.StatusNotFound: + var ( + body ListRiskResultsForAgentNotFoundResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentNotFoundResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentNotFound(&body) + case http.StatusConflict: + var ( + body ListRiskResultsForAgentConflictResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentConflictResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentConflict(&body) + case http.StatusUnsupportedMediaType: + var ( + body ListRiskResultsForAgentUnsupportedMediaResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentUnsupportedMediaResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentUnsupportedMedia(&body) + case http.StatusUnprocessableEntity: + var ( + body ListRiskResultsForAgentInvalidResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentInvalidResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentInvalid(&body) + case http.StatusInternalServerError: + en := resp.Header.Get("goa-error") + switch en { + case "invariant_violation": + var ( + body ListRiskResultsForAgentInvariantViolationResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentInvariantViolationResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentInvariantViolation(&body) + case "unexpected": + var ( + body ListRiskResultsForAgentUnexpectedResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentUnexpectedResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentUnexpected(&body) + default: + body, _ := io.ReadAll(resp.Body) + return nil, goahttp.ErrInvalidResponse("risk", "listRiskResultsForAgent", resp.StatusCode, string(body)) + } + case http.StatusBadGateway: + var ( + body ListRiskResultsForAgentGatewayErrorResponseBody + err error + ) + err = decoder(resp).Decode(&body) + if err != nil { + return nil, goahttp.ErrDecodingError("risk", "listRiskResultsForAgent", err) + } + err = ValidateListRiskResultsForAgentGatewayErrorResponseBody(&body) + if err != nil { + return nil, goahttp.ErrValidationError("risk", "listRiskResultsForAgent", err) + } + return nil, NewListRiskResultsForAgentGatewayError(&body) + default: + body, _ := io.ReadAll(resp.Body) + return nil, goahttp.ErrInvalidResponse("risk", "listRiskResultsForAgent", resp.StatusCode, string(body)) + } + } +} + // BuildListRiskResultsByChatRequest instantiates a HTTP request object with // method and path set to call the "risk" service "listRiskResultsByChat" // endpoint @@ -4194,6 +4462,36 @@ func unmarshalRiskResultResponseBodyToTypesRiskResult(v *RiskResultResponseBody) return res } +// unmarshalRiskResultRedactedResponseBodyToTypesRiskResultRedacted builds a +// value of type *types.RiskResultRedacted from a value of type +// *RiskResultRedactedResponseBody. +func unmarshalRiskResultRedactedResponseBodyToTypesRiskResultRedacted(v *RiskResultRedactedResponseBody) *types.RiskResultRedacted { + res := &types.RiskResultRedacted{ + ID: *v.ID, + PolicyID: *v.PolicyID, + PolicyVersion: *v.PolicyVersion, + ChatMessageID: *v.ChatMessageID, + ChatID: v.ChatID, + ChatTitle: v.ChatTitle, + UserID: v.UserID, + Source: *v.Source, + RuleID: v.RuleID, + Description: v.Description, + MatchRedacted: *v.MatchRedacted, + PositionKnown: *v.PositionKnown, + Confidence: v.Confidence, + CreatedAt: *v.CreatedAt, + } + if v.Tags != nil { + res.Tags = make([]string, len(v.Tags)) + for i, val := range v.Tags { + res.Tags[i] = val + } + } + + return res +} + // unmarshalRiskChatSummaryResponseBodyToTypesRiskChatSummary builds a value of // type *types.RiskChatSummary from a value of type // *RiskChatSummaryResponseBody. diff --git a/server/gen/http/risk/client/paths.go b/server/gen/http/risk/client/paths.go index 23f864d5d5..de70fd09eb 100644 --- a/server/gen/http/risk/client/paths.go +++ b/server/gen/http/risk/client/paths.go @@ -42,6 +42,11 @@ func ListRiskResultsRiskPath() string { return "/rpc/risk.results.list" } +// ListRiskResultsForAgentRiskPath returns the URL path to the risk service listRiskResultsForAgent HTTP endpoint. +func ListRiskResultsForAgentRiskPath() string { + return "/rpc/risk.results.listForAgent" +} + // ListRiskResultsByChatRiskPath returns the URL path to the risk service listRiskResultsByChat HTTP endpoint. func ListRiskResultsByChatRiskPath() string { return "/rpc/risk.results.byChat" diff --git a/server/gen/http/risk/client/types.go b/server/gen/http/risk/client/types.go index 6e54b739ea..b478642ea3 100644 --- a/server/gen/http/risk/client/types.go +++ b/server/gen/http/risk/client/types.go @@ -222,6 +222,17 @@ type ListRiskResultsResponseBody struct { NextCursor *string `form:"next_cursor,omitempty" json:"next_cursor,omitempty" xml:"next_cursor,omitempty"` } +// ListRiskResultsForAgentResponseBody is the type of the "risk" service +// "listRiskResultsForAgent" endpoint HTTP response body. +type ListRiskResultsForAgentResponseBody struct { + // The list of risk results with match content redacted to opaque fingerprints. + Results []*RiskResultRedactedResponseBody `form:"results,omitempty" json:"results,omitempty" xml:"results,omitempty"` + // Total number of findings across all enabled policies. + TotalCount *int64 `form:"total_count,omitempty" json:"total_count,omitempty" xml:"total_count,omitempty"` + // Cursor for the next page of results. + NextCursor *string `form:"next_cursor,omitempty" json:"next_cursor,omitempty" xml:"next_cursor,omitempty"` +} + // ListRiskResultsByChatResponseBody is the type of the "risk" service // "listRiskResultsByChat" endpoint HTTP response body. type ListRiskResultsByChatResponseBody struct { @@ -1616,6 +1627,196 @@ type ListRiskResultsGatewayErrorResponseBody struct { Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` } +// ListRiskResultsForAgentUnauthorizedResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unauthorized" error. +type ListRiskResultsForAgentUnauthorizedResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentForbiddenResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "forbidden" error. +type ListRiskResultsForAgentForbiddenResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentBadRequestResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "bad_request" error. +type ListRiskResultsForAgentBadRequestResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentNotFoundResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "not_found" error. +type ListRiskResultsForAgentNotFoundResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentConflictResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "conflict" error. +type ListRiskResultsForAgentConflictResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentUnsupportedMediaResponseBody is the type of the +// "risk" service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unsupported_media" error. +type ListRiskResultsForAgentUnsupportedMediaResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentInvalidResponseBody is the type of the "risk" service +// "listRiskResultsForAgent" endpoint HTTP response body for the "invalid" +// error. +type ListRiskResultsForAgentInvalidResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentInvariantViolationResponseBody is the type of the +// "risk" service "listRiskResultsForAgent" endpoint HTTP response body for the +// "invariant_violation" error. +type ListRiskResultsForAgentInvariantViolationResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentUnexpectedResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unexpected" error. +type ListRiskResultsForAgentUnexpectedResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + +// ListRiskResultsForAgentGatewayErrorResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "gateway_error" error. +type ListRiskResultsForAgentGatewayErrorResponseBody struct { + // Name is the name of this class of errors. + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // ID is a unique identifier for this particular occurrence of the problem. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // Is the error temporary? + Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` + // Is the error a timeout? + Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` + // Is the error a server-side fault? + Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` +} + // ListRiskResultsByChatUnauthorizedResponseBody is the type of the "risk" // service "listRiskResultsByChat" endpoint HTTP response body for the // "unauthorized" error. @@ -3546,6 +3747,47 @@ type RiskResultResponseBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` } +// RiskResultRedactedResponseBody is used to define fields on response body +// types. +type RiskResultRedactedResponseBody struct { + // The result ID. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // The risk policy ID. + PolicyID *string `form:"policy_id,omitempty" json:"policy_id,omitempty" xml:"policy_id,omitempty"` + // Policy version when this result was produced. + PolicyVersion *int64 `form:"policy_version,omitempty" json:"policy_version,omitempty" xml:"policy_version,omitempty"` + // The chat message that was scanned. + ChatMessageID *string `form:"chat_message_id,omitempty" json:"chat_message_id,omitempty" xml:"chat_message_id,omitempty"` + // The chat session containing the message. + ChatID *string `form:"chat_id,omitempty" json:"chat_id,omitempty" xml:"chat_id,omitempty"` + // Title of the chat session. + ChatTitle *string `form:"chat_title,omitempty" json:"chat_title,omitempty" xml:"chat_title,omitempty"` + // The user who owns the chat session. + UserID *string `form:"user_id,omitempty" json:"user_id,omitempty" xml:"user_id,omitempty"` + // Detection source (e.g. gitleaks, presidio, shadow_mcp). + Source *string `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"` + // The matched rule identifier. + RuleID *string `form:"rule_id,omitempty" json:"rule_id,omitempty" xml:"rule_id,omitempty"` + // Human-readable description of the finding. + Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"` + // Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX + // is the first 8 hex characters of sha256(match). For shadow_mcp findings the + // original match value (a non-sensitive server URL or command identifier) is + // passed through verbatim. + MatchRedacted *string `form:"match_redacted,omitempty" json:"match_redacted,omitempty" xml:"match_redacted,omitempty"` + // Whether the original finding carried byte-position information within the + // source message. Exact positions are intentionally not exposed to avoid + // reconstruction attacks. + PositionKnown *bool `form:"position_known,omitempty" json:"position_known,omitempty" xml:"position_known,omitempty"` + // Confidence score for this finding. + Confidence *float64 `form:"confidence,omitempty" json:"confidence,omitempty" xml:"confidence,omitempty"` + // Tags from the detection rule. + Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"` + // When this result was created. + CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` +} + // RiskChatSummaryResponseBody is used to define fields on response body types. type RiskChatSummaryResponseBody struct { // The chat session ID. @@ -4945,27 +5187,28 @@ func NewListRiskResultsGatewayError(body *ListRiskResultsGatewayErrorResponseBod return v } -// NewListRiskResultsByChatResultOK builds a "risk" service -// "listRiskResultsByChat" endpoint result from a HTTP "OK" response. -func NewListRiskResultsByChatResultOK(body *ListRiskResultsByChatResponseBody) *risk.ListRiskResultsByChatResult { - v := &risk.ListRiskResultsByChatResult{ +// NewListRiskResultsForAgentResultOK builds a "risk" service +// "listRiskResultsForAgent" endpoint result from a HTTP "OK" response. +func NewListRiskResultsForAgentResultOK(body *ListRiskResultsForAgentResponseBody) *risk.ListRiskResultsForAgentResult { + v := &risk.ListRiskResultsForAgentResult{ + TotalCount: *body.TotalCount, NextCursor: body.NextCursor, } - v.Chats = make([]*types.RiskChatSummary, len(body.Chats)) - for i, val := range body.Chats { + v.Results = make([]*types.RiskResultRedacted, len(body.Results)) + for i, val := range body.Results { if val == nil { - v.Chats[i] = nil + v.Results[i] = nil continue } - v.Chats[i] = unmarshalRiskChatSummaryResponseBodyToTypesRiskChatSummary(val) + v.Results[i] = unmarshalRiskResultRedactedResponseBodyToTypesRiskResultRedacted(val) } return v } -// NewListRiskResultsByChatUnauthorized builds a risk service -// listRiskResultsByChat endpoint unauthorized error. -func NewListRiskResultsByChatUnauthorized(body *ListRiskResultsByChatUnauthorizedResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentUnauthorized builds a risk service +// listRiskResultsForAgent endpoint unauthorized error. +func NewListRiskResultsForAgentUnauthorized(body *ListRiskResultsForAgentUnauthorizedResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -4978,9 +5221,9 @@ func NewListRiskResultsByChatUnauthorized(body *ListRiskResultsByChatUnauthorize return v } -// NewListRiskResultsByChatForbidden builds a risk service -// listRiskResultsByChat endpoint forbidden error. -func NewListRiskResultsByChatForbidden(body *ListRiskResultsByChatForbiddenResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentForbidden builds a risk service +// listRiskResultsForAgent endpoint forbidden error. +func NewListRiskResultsForAgentForbidden(body *ListRiskResultsForAgentForbiddenResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -4993,9 +5236,9 @@ func NewListRiskResultsByChatForbidden(body *ListRiskResultsByChatForbiddenRespo return v } -// NewListRiskResultsByChatBadRequest builds a risk service -// listRiskResultsByChat endpoint bad_request error. -func NewListRiskResultsByChatBadRequest(body *ListRiskResultsByChatBadRequestResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentBadRequest builds a risk service +// listRiskResultsForAgent endpoint bad_request error. +func NewListRiskResultsForAgentBadRequest(body *ListRiskResultsForAgentBadRequestResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5008,9 +5251,9 @@ func NewListRiskResultsByChatBadRequest(body *ListRiskResultsByChatBadRequestRes return v } -// NewListRiskResultsByChatNotFound builds a risk service listRiskResultsByChat -// endpoint not_found error. -func NewListRiskResultsByChatNotFound(body *ListRiskResultsByChatNotFoundResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentNotFound builds a risk service +// listRiskResultsForAgent endpoint not_found error. +func NewListRiskResultsForAgentNotFound(body *ListRiskResultsForAgentNotFoundResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5023,9 +5266,9 @@ func NewListRiskResultsByChatNotFound(body *ListRiskResultsByChatNotFoundRespons return v } -// NewListRiskResultsByChatConflict builds a risk service listRiskResultsByChat -// endpoint conflict error. -func NewListRiskResultsByChatConflict(body *ListRiskResultsByChatConflictResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentConflict builds a risk service +// listRiskResultsForAgent endpoint conflict error. +func NewListRiskResultsForAgentConflict(body *ListRiskResultsForAgentConflictResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5038,9 +5281,9 @@ func NewListRiskResultsByChatConflict(body *ListRiskResultsByChatConflictRespons return v } -// NewListRiskResultsByChatUnsupportedMedia builds a risk service -// listRiskResultsByChat endpoint unsupported_media error. -func NewListRiskResultsByChatUnsupportedMedia(body *ListRiskResultsByChatUnsupportedMediaResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentUnsupportedMedia builds a risk service +// listRiskResultsForAgent endpoint unsupported_media error. +func NewListRiskResultsForAgentUnsupportedMedia(body *ListRiskResultsForAgentUnsupportedMediaResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5053,9 +5296,9 @@ func NewListRiskResultsByChatUnsupportedMedia(body *ListRiskResultsByChatUnsuppo return v } -// NewListRiskResultsByChatInvalid builds a risk service listRiskResultsByChat -// endpoint invalid error. -func NewListRiskResultsByChatInvalid(body *ListRiskResultsByChatInvalidResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentInvalid builds a risk service +// listRiskResultsForAgent endpoint invalid error. +func NewListRiskResultsForAgentInvalid(body *ListRiskResultsForAgentInvalidResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5068,9 +5311,9 @@ func NewListRiskResultsByChatInvalid(body *ListRiskResultsByChatInvalidResponseB return v } -// NewListRiskResultsByChatInvariantViolation builds a risk service -// listRiskResultsByChat endpoint invariant_violation error. -func NewListRiskResultsByChatInvariantViolation(body *ListRiskResultsByChatInvariantViolationResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentInvariantViolation builds a risk service +// listRiskResultsForAgent endpoint invariant_violation error. +func NewListRiskResultsForAgentInvariantViolation(body *ListRiskResultsForAgentInvariantViolationResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5083,9 +5326,9 @@ func NewListRiskResultsByChatInvariantViolation(body *ListRiskResultsByChatInvar return v } -// NewListRiskResultsByChatUnexpected builds a risk service -// listRiskResultsByChat endpoint unexpected error. -func NewListRiskResultsByChatUnexpected(body *ListRiskResultsByChatUnexpectedResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentUnexpected builds a risk service +// listRiskResultsForAgent endpoint unexpected error. +func NewListRiskResultsForAgentUnexpected(body *ListRiskResultsForAgentUnexpectedResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5098,9 +5341,9 @@ func NewListRiskResultsByChatUnexpected(body *ListRiskResultsByChatUnexpectedRes return v } -// NewListRiskResultsByChatGatewayError builds a risk service -// listRiskResultsByChat endpoint gateway_error error. -func NewListRiskResultsByChatGatewayError(body *ListRiskResultsByChatGatewayErrorResponseBody) *goa.ServiceError { +// NewListRiskResultsForAgentGatewayError builds a risk service +// listRiskResultsForAgent endpoint gateway_error error. +func NewListRiskResultsForAgentGatewayError(body *ListRiskResultsForAgentGatewayErrorResponseBody) *goa.ServiceError { v := &goa.ServiceError{ Name: *body.Name, ID: *body.ID, @@ -5113,21 +5356,189 @@ func NewListRiskResultsByChatGatewayError(body *ListRiskResultsByChatGatewayErro return v } -// NewGetRiskOverviewRiskOverviewResultOK builds a "risk" service -// "getRiskOverview" endpoint result from a HTTP "OK" response. -func NewGetRiskOverviewRiskOverviewResultOK(body *GetRiskOverviewResponseBody) *risk.RiskOverviewResult { - v := &risk.RiskOverviewResult{ - From: *body.From, - To: *body.To, - MessagesScanned: *body.MessagesScanned, - Findings: *body.Findings, - FlaggedSessions: *body.FlaggedSessions, - ActivePolicies: *body.ActivePolicies, +// NewListRiskResultsByChatResultOK builds a "risk" service +// "listRiskResultsByChat" endpoint result from a HTTP "OK" response. +func NewListRiskResultsByChatResultOK(body *ListRiskResultsByChatResponseBody) *risk.ListRiskResultsByChatResult { + v := &risk.ListRiskResultsByChatResult{ + NextCursor: body.NextCursor, } - v.TopCategories = make([]*risk.RiskOverviewCategory, len(body.TopCategories)) - for i, val := range body.TopCategories { + v.Chats = make([]*types.RiskChatSummary, len(body.Chats)) + for i, val := range body.Chats { if val == nil { - v.TopCategories[i] = nil + v.Chats[i] = nil + continue + } + v.Chats[i] = unmarshalRiskChatSummaryResponseBodyToTypesRiskChatSummary(val) + } + + return v +} + +// NewListRiskResultsByChatUnauthorized builds a risk service +// listRiskResultsByChat endpoint unauthorized error. +func NewListRiskResultsByChatUnauthorized(body *ListRiskResultsByChatUnauthorizedResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatForbidden builds a risk service +// listRiskResultsByChat endpoint forbidden error. +func NewListRiskResultsByChatForbidden(body *ListRiskResultsByChatForbiddenResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatBadRequest builds a risk service +// listRiskResultsByChat endpoint bad_request error. +func NewListRiskResultsByChatBadRequest(body *ListRiskResultsByChatBadRequestResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatNotFound builds a risk service listRiskResultsByChat +// endpoint not_found error. +func NewListRiskResultsByChatNotFound(body *ListRiskResultsByChatNotFoundResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatConflict builds a risk service listRiskResultsByChat +// endpoint conflict error. +func NewListRiskResultsByChatConflict(body *ListRiskResultsByChatConflictResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatUnsupportedMedia builds a risk service +// listRiskResultsByChat endpoint unsupported_media error. +func NewListRiskResultsByChatUnsupportedMedia(body *ListRiskResultsByChatUnsupportedMediaResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatInvalid builds a risk service listRiskResultsByChat +// endpoint invalid error. +func NewListRiskResultsByChatInvalid(body *ListRiskResultsByChatInvalidResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatInvariantViolation builds a risk service +// listRiskResultsByChat endpoint invariant_violation error. +func NewListRiskResultsByChatInvariantViolation(body *ListRiskResultsByChatInvariantViolationResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatUnexpected builds a risk service +// listRiskResultsByChat endpoint unexpected error. +func NewListRiskResultsByChatUnexpected(body *ListRiskResultsByChatUnexpectedResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewListRiskResultsByChatGatewayError builds a risk service +// listRiskResultsByChat endpoint gateway_error error. +func NewListRiskResultsByChatGatewayError(body *ListRiskResultsByChatGatewayErrorResponseBody) *goa.ServiceError { + v := &goa.ServiceError{ + Name: *body.Name, + ID: *body.ID, + Message: *body.Message, + Temporary: *body.Temporary, + Timeout: *body.Timeout, + Fault: *body.Fault, + } + + return v +} + +// NewGetRiskOverviewRiskOverviewResultOK builds a "risk" service +// "getRiskOverview" endpoint result from a HTTP "OK" response. +func NewGetRiskOverviewRiskOverviewResultOK(body *GetRiskOverviewResponseBody) *risk.RiskOverviewResult { + v := &risk.RiskOverviewResult{ + From: *body.From, + To: *body.To, + MessagesScanned: *body.MessagesScanned, + Findings: *body.Findings, + FlaggedSessions: *body.FlaggedSessions, + ActivePolicies: *body.ActivePolicies, + } + v.TopCategories = make([]*risk.RiskOverviewCategory, len(body.TopCategories)) + for i, val := range body.TopCategories { + if val == nil { + v.TopCategories[i] = nil continue } v.TopCategories[i] = unmarshalRiskOverviewCategoryResponseBodyToRiskRiskOverviewCategory(val) @@ -6843,6 +7254,25 @@ func ValidateListRiskResultsResponseBody(body *ListRiskResultsResponseBody) (err return } +// ValidateListRiskResultsForAgentResponseBody runs the validations defined on +// ListRiskResultsForAgentResponseBody +func ValidateListRiskResultsForAgentResponseBody(body *ListRiskResultsForAgentResponseBody) (err error) { + if body.Results == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("results", "body")) + } + if body.TotalCount == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("total_count", "body")) + } + for _, e := range body.Results { + if e != nil { + if err2 := ValidateRiskResultRedactedResponseBody(e); err2 != nil { + err = goa.MergeErrors(err, err2) + } + } + } + return +} + // ValidateListRiskResultsByChatResponseBody runs the validations defined on // ListRiskResultsByChatResponseBody func ValidateListRiskResultsByChatResponseBody(body *ListRiskResultsByChatResponseBody) (err error) { @@ -8775,6 +9205,248 @@ func ValidateListRiskResultsGatewayErrorResponseBody(body *ListRiskResultsGatewa return } +// ValidateListRiskResultsForAgentUnauthorizedResponseBody runs the validations +// defined on listRiskResultsForAgent_unauthorized_response_body +func ValidateListRiskResultsForAgentUnauthorizedResponseBody(body *ListRiskResultsForAgentUnauthorizedResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentForbiddenResponseBody runs the validations +// defined on listRiskResultsForAgent_forbidden_response_body +func ValidateListRiskResultsForAgentForbiddenResponseBody(body *ListRiskResultsForAgentForbiddenResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentBadRequestResponseBody runs the validations +// defined on listRiskResultsForAgent_bad_request_response_body +func ValidateListRiskResultsForAgentBadRequestResponseBody(body *ListRiskResultsForAgentBadRequestResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentNotFoundResponseBody runs the validations +// defined on listRiskResultsForAgent_not_found_response_body +func ValidateListRiskResultsForAgentNotFoundResponseBody(body *ListRiskResultsForAgentNotFoundResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentConflictResponseBody runs the validations +// defined on listRiskResultsForAgent_conflict_response_body +func ValidateListRiskResultsForAgentConflictResponseBody(body *ListRiskResultsForAgentConflictResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentUnsupportedMediaResponseBody runs the +// validations defined on +// listRiskResultsForAgent_unsupported_media_response_body +func ValidateListRiskResultsForAgentUnsupportedMediaResponseBody(body *ListRiskResultsForAgentUnsupportedMediaResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentInvalidResponseBody runs the validations +// defined on listRiskResultsForAgent_invalid_response_body +func ValidateListRiskResultsForAgentInvalidResponseBody(body *ListRiskResultsForAgentInvalidResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentInvariantViolationResponseBody runs the +// validations defined on +// listRiskResultsForAgent_invariant_violation_response_body +func ValidateListRiskResultsForAgentInvariantViolationResponseBody(body *ListRiskResultsForAgentInvariantViolationResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentUnexpectedResponseBody runs the validations +// defined on listRiskResultsForAgent_unexpected_response_body +func ValidateListRiskResultsForAgentUnexpectedResponseBody(body *ListRiskResultsForAgentUnexpectedResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + +// ValidateListRiskResultsForAgentGatewayErrorResponseBody runs the validations +// defined on listRiskResultsForAgent_gateway_error_response_body +func ValidateListRiskResultsForAgentGatewayErrorResponseBody(body *ListRiskResultsForAgentGatewayErrorResponseBody) (err error) { + if body.Name == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("name", "body")) + } + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.Message == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("message", "body")) + } + if body.Temporary == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body")) + } + if body.Timeout == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body")) + } + if body.Fault == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body")) + } + return +} + // ValidateListRiskResultsByChatUnauthorizedResponseBody runs the validations // defined on listRiskResultsByChat_unauthorized_response_body func ValidateListRiskResultsByChatUnauthorizedResponseBody(body *ListRiskResultsByChatUnauthorizedResponseBody) (err error) { @@ -11277,6 +11949,51 @@ func ValidateRiskResultResponseBody(body *RiskResultResponseBody) (err error) { return } +// ValidateRiskResultRedactedResponseBody runs the validations defined on +// RiskResultRedactedResponseBody +func ValidateRiskResultRedactedResponseBody(body *RiskResultRedactedResponseBody) (err error) { + if body.ID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) + } + if body.PolicyID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("policy_id", "body")) + } + if body.PolicyVersion == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("policy_version", "body")) + } + if body.ChatMessageID == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("chat_message_id", "body")) + } + if body.Source == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("source", "body")) + } + if body.CreatedAt == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "body")) + } + if body.MatchRedacted == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("match_redacted", "body")) + } + if body.PositionKnown == nil { + err = goa.MergeErrors(err, goa.MissingFieldError("position_known", "body")) + } + if body.ID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.id", *body.ID, goa.FormatUUID)) + } + if body.PolicyID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.policy_id", *body.PolicyID, goa.FormatUUID)) + } + if body.ChatMessageID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.chat_message_id", *body.ChatMessageID, goa.FormatUUID)) + } + if body.ChatID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.chat_id", *body.ChatID, goa.FormatUUID)) + } + if body.CreatedAt != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("body.created_at", *body.CreatedAt, goa.FormatDateTime)) + } + return +} + // ValidateRiskChatSummaryResponseBody runs the validations defined on // RiskChatSummaryResponseBody func ValidateRiskChatSummaryResponseBody(body *RiskChatSummaryResponseBody) (err error) { diff --git a/server/gen/http/risk/server/encode_decode.go b/server/gen/http/risk/server/encode_decode.go index 488343b1fd..cb493b6953 100644 --- a/server/gen/http/risk/server/encode_decode.go +++ b/server/gen/http/risk/server/encode_decode.go @@ -1682,6 +1682,308 @@ func EncodeListRiskResultsError(encoder func(context.Context, http.ResponseWrite } } +// EncodeListRiskResultsForAgentResponse returns an encoder for responses +// returned by the risk listRiskResultsForAgent endpoint. +func EncodeListRiskResultsForAgentResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { + res, _ := v.(*risk.ListRiskResultsForAgentResult) + enc := encoder(ctx, w) + body := NewListRiskResultsForAgentResponseBody(res) + w.WriteHeader(http.StatusOK) + return enc.Encode(body) + } +} + +// DecodeListRiskResultsForAgentRequest returns a decoder for requests sent to +// the risk listRiskResultsForAgent endpoint. +func DecodeListRiskResultsForAgentRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*risk.ListRiskResultsForAgentPayload, error) { + return func(r *http.Request) (*risk.ListRiskResultsForAgentPayload, error) { + var payload *risk.ListRiskResultsForAgentPayload + var ( + policyID *string + chatID *string + category *string + ruleID *string + uniqueMatch *bool + from *string + to *string + cursor *string + limit *int + apikeyToken *string + sessionToken *string + projectSlugInput *string + err error + ) + qp := r.URL.Query() + policyIDRaw := qp.Get("policy_id") + if policyIDRaw != "" { + policyID = &policyIDRaw + } + if policyID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("policy_id", *policyID, goa.FormatUUID)) + } + chatIDRaw := qp.Get("chat_id") + if chatIDRaw != "" { + chatID = &chatIDRaw + } + if chatID != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("chat_id", *chatID, goa.FormatUUID)) + } + categoryRaw := qp.Get("category") + if categoryRaw != "" { + category = &categoryRaw + } + ruleIDRaw := qp.Get("rule_id") + if ruleIDRaw != "" { + ruleID = &ruleIDRaw + } + { + uniqueMatchRaw := qp.Get("unique_match") + if uniqueMatchRaw != "" { + v, err2 := strconv.ParseBool(uniqueMatchRaw) + if err2 != nil { + err = goa.MergeErrors(err, goa.InvalidFieldTypeError("unique_match", uniqueMatchRaw, "boolean")) + } + uniqueMatch = &v + } + } + fromRaw := qp.Get("from") + if fromRaw != "" { + from = &fromRaw + } + if from != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("from", *from, goa.FormatDateTime)) + } + toRaw := qp.Get("to") + if toRaw != "" { + to = &toRaw + } + if to != nil { + err = goa.MergeErrors(err, goa.ValidateFormat("to", *to, goa.FormatDateTime)) + } + cursorRaw := qp.Get("cursor") + if cursorRaw != "" { + cursor = &cursorRaw + } + { + limitRaw := qp.Get("limit") + if limitRaw != "" { + v, err2 := strconv.ParseInt(limitRaw, 10, strconv.IntSize) + if err2 != nil { + err = goa.MergeErrors(err, goa.InvalidFieldTypeError("limit", limitRaw, "integer")) + } + pv := int(v) + limit = &pv + } + } + if limit != nil { + if *limit < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", *limit, 1, true)) + } + } + if limit != nil { + if *limit > 200 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", *limit, 200, false)) + } + } + apikeyTokenRaw := r.Header.Get("Gram-Key") + if apikeyTokenRaw != "" { + apikeyToken = &apikeyTokenRaw + } + sessionTokenRaw := r.Header.Get("Gram-Session") + if sessionTokenRaw != "" { + sessionToken = &sessionTokenRaw + } + projectSlugInputRaw := r.Header.Get("Gram-Project") + if projectSlugInputRaw != "" { + projectSlugInput = &projectSlugInputRaw + } + if err != nil { + return payload, err + } + payload = NewListRiskResultsForAgentPayload(policyID, chatID, category, ruleID, uniqueMatch, from, to, cursor, limit, apikeyToken, sessionToken, projectSlugInput) + if payload.ApikeyToken != nil { + if strings.Contains(*payload.ApikeyToken, " ") { + // Remove authorization scheme prefix (e.g. "Bearer") + cred := strings.SplitN(*payload.ApikeyToken, " ", 2)[1] + payload.ApikeyToken = &cred + } + } + if payload.ProjectSlugInput != nil { + if strings.Contains(*payload.ProjectSlugInput, " ") { + // Remove authorization scheme prefix (e.g. "Bearer") + cred := strings.SplitN(*payload.ProjectSlugInput, " ", 2)[1] + payload.ProjectSlugInput = &cred + } + } + if payload.SessionToken != nil { + if strings.Contains(*payload.SessionToken, " ") { + // Remove authorization scheme prefix (e.g. "Bearer") + cred := strings.SplitN(*payload.SessionToken, " ", 2)[1] + payload.SessionToken = &cred + } + } + + return payload, nil + } +} + +// EncodeListRiskResultsForAgentError returns an encoder for errors returned by +// the listRiskResultsForAgent risk endpoint. +func EncodeListRiskResultsForAgentError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error { + encodeError := goahttp.ErrorEncoder(encoder, formatter) + return func(ctx context.Context, w http.ResponseWriter, v error) error { + var en goa.GoaErrorNamer + if !errors.As(v, &en) { + return encodeError(ctx, w, v) + } + switch en.GoaErrorName() { + case "unauthorized": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentUnauthorizedResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusUnauthorized) + return enc.Encode(body) + case "forbidden": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentForbiddenResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusForbidden) + return enc.Encode(body) + case "bad_request": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentBadRequestResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusBadRequest) + return enc.Encode(body) + case "not_found": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentNotFoundResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusNotFound) + return enc.Encode(body) + case "conflict": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentConflictResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusConflict) + return enc.Encode(body) + case "unsupported_media": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentUnsupportedMediaResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusUnsupportedMediaType) + return enc.Encode(body) + case "invalid": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentInvalidResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusUnprocessableEntity) + return enc.Encode(body) + case "invariant_violation": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentInvariantViolationResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusInternalServerError) + return enc.Encode(body) + case "unexpected": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentUnexpectedResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusInternalServerError) + return enc.Encode(body) + case "gateway_error": + var res *goa.ServiceError + errors.As(v, &res) + ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json") + enc := encoder(ctx, w) + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListRiskResultsForAgentGatewayErrorResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) + w.WriteHeader(http.StatusBadGateway) + return enc.Encode(body) + default: + return encodeError(ctx, w, v) + } + } +} + // EncodeListRiskResultsByChatResponse returns an encoder for responses // returned by the risk listRiskResultsByChat endpoint. func EncodeListRiskResultsByChatResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { @@ -4098,6 +4400,36 @@ func marshalTypesRiskResultToRiskResultResponseBody(v *types.RiskResult) *RiskRe return res } +// marshalTypesRiskResultRedactedToRiskResultRedactedResponseBody builds a +// value of type *RiskResultRedactedResponseBody from a value of type +// *types.RiskResultRedacted. +func marshalTypesRiskResultRedactedToRiskResultRedactedResponseBody(v *types.RiskResultRedacted) *RiskResultRedactedResponseBody { + res := &RiskResultRedactedResponseBody{ + ID: v.ID, + PolicyID: v.PolicyID, + PolicyVersion: v.PolicyVersion, + ChatMessageID: v.ChatMessageID, + ChatID: v.ChatID, + ChatTitle: v.ChatTitle, + UserID: v.UserID, + Source: v.Source, + RuleID: v.RuleID, + Description: v.Description, + MatchRedacted: v.MatchRedacted, + PositionKnown: v.PositionKnown, + Confidence: v.Confidence, + CreatedAt: v.CreatedAt, + } + if v.Tags != nil { + res.Tags = make([]string, len(v.Tags)) + for i, val := range v.Tags { + res.Tags[i] = val + } + } + + return res +} + // marshalTypesRiskChatSummaryToRiskChatSummaryResponseBody builds a value of // type *RiskChatSummaryResponseBody from a value of type // *types.RiskChatSummary. diff --git a/server/gen/http/risk/server/paths.go b/server/gen/http/risk/server/paths.go index d11667524c..b61177ab77 100644 --- a/server/gen/http/risk/server/paths.go +++ b/server/gen/http/risk/server/paths.go @@ -42,6 +42,11 @@ func ListRiskResultsRiskPath() string { return "/rpc/risk.results.list" } +// ListRiskResultsForAgentRiskPath returns the URL path to the risk service listRiskResultsForAgent HTTP endpoint. +func ListRiskResultsForAgentRiskPath() string { + return "/rpc/risk.results.listForAgent" +} + // ListRiskResultsByChatRiskPath returns the URL path to the risk service listRiskResultsByChat HTTP endpoint. func ListRiskResultsByChatRiskPath() string { return "/rpc/risk.results.byChat" diff --git a/server/gen/http/risk/server/server.go b/server/gen/http/risk/server/server.go index bfda06859c..b9d8de6734 100644 --- a/server/gen/http/risk/server/server.go +++ b/server/gen/http/risk/server/server.go @@ -26,6 +26,7 @@ type Server struct { UpdateRiskPolicy http.Handler DeleteRiskPolicy http.Handler ListRiskResults http.Handler + ListRiskResultsForAgent http.Handler ListRiskResultsByChat http.Handler GetRiskOverview http.Handler ListRiskCategories http.Handler @@ -72,6 +73,7 @@ func New( {"UpdateRiskPolicy", "PUT", "/rpc/risk.policies.update"}, {"DeleteRiskPolicy", "DELETE", "/rpc/risk.policies.delete"}, {"ListRiskResults", "GET", "/rpc/risk.results.list"}, + {"ListRiskResultsForAgent", "GET", "/rpc/risk.results.listForAgent"}, {"ListRiskResultsByChat", "GET", "/rpc/risk.results.byChat"}, {"GetRiskOverview", "GET", "/rpc/risk.overview.get"}, {"ListRiskCategories", "GET", "/rpc/risk.categories"}, @@ -90,6 +92,7 @@ func New( UpdateRiskPolicy: NewUpdateRiskPolicyHandler(e.UpdateRiskPolicy, mux, decoder, encoder, errhandler, formatter), DeleteRiskPolicy: NewDeleteRiskPolicyHandler(e.DeleteRiskPolicy, mux, decoder, encoder, errhandler, formatter), ListRiskResults: NewListRiskResultsHandler(e.ListRiskResults, mux, decoder, encoder, errhandler, formatter), + ListRiskResultsForAgent: NewListRiskResultsForAgentHandler(e.ListRiskResultsForAgent, mux, decoder, encoder, errhandler, formatter), ListRiskResultsByChat: NewListRiskResultsByChatHandler(e.ListRiskResultsByChat, mux, decoder, encoder, errhandler, formatter), GetRiskOverview: NewGetRiskOverviewHandler(e.GetRiskOverview, mux, decoder, encoder, errhandler, formatter), ListRiskCategories: NewListRiskCategoriesHandler(e.ListRiskCategories, mux, decoder, encoder, errhandler, formatter), @@ -115,6 +118,7 @@ func (s *Server) Use(m func(http.Handler) http.Handler) { s.UpdateRiskPolicy = m(s.UpdateRiskPolicy) s.DeleteRiskPolicy = m(s.DeleteRiskPolicy) s.ListRiskResults = m(s.ListRiskResults) + s.ListRiskResultsForAgent = m(s.ListRiskResultsForAgent) s.ListRiskResultsByChat = m(s.ListRiskResultsByChat) s.GetRiskOverview = m(s.GetRiskOverview) s.ListRiskCategories = m(s.ListRiskCategories) @@ -139,6 +143,7 @@ func Mount(mux goahttp.Muxer, h *Server) { MountUpdateRiskPolicyHandler(mux, h.UpdateRiskPolicy) MountDeleteRiskPolicyHandler(mux, h.DeleteRiskPolicy) MountListRiskResultsHandler(mux, h.ListRiskResults) + MountListRiskResultsForAgentHandler(mux, h.ListRiskResultsForAgent) MountListRiskResultsByChatHandler(mux, h.ListRiskResultsByChat) MountGetRiskOverviewHandler(mux, h.GetRiskOverview) MountListRiskCategoriesHandler(mux, h.ListRiskCategories) @@ -527,6 +532,59 @@ func NewListRiskResultsHandler( }) } +// MountListRiskResultsForAgentHandler configures the mux to serve the "risk" +// service "listRiskResultsForAgent" endpoint. +func MountListRiskResultsForAgentHandler(mux goahttp.Muxer, h http.Handler) { + f, ok := h.(http.HandlerFunc) + if !ok { + f = func(w http.ResponseWriter, r *http.Request) { + h.ServeHTTP(w, r) + } + } + mux.Handle("GET", "/rpc/risk.results.listForAgent", f) +} + +// NewListRiskResultsForAgentHandler creates a HTTP handler which loads the +// HTTP request and calls the "risk" service "listRiskResultsForAgent" endpoint. +func NewListRiskResultsForAgentHandler( + endpoint goa.Endpoint, + mux goahttp.Muxer, + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, +) http.Handler { + var ( + decodeRequest = DecodeListRiskResultsForAgentRequest(mux, decoder) + encodeResponse = EncodeListRiskResultsForAgentResponse(encoder) + encodeError = EncodeListRiskResultsForAgentError(encoder, formatter) + ) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) + ctx = context.WithValue(ctx, goa.MethodKey, "listRiskResultsForAgent") + ctx = context.WithValue(ctx, goa.ServiceKey, "risk") + payload, err := decodeRequest(r) + if err != nil { + if err := encodeError(ctx, w, err); err != nil && errhandler != nil { + errhandler(ctx, w, err) + } + return + } + res, err := endpoint(ctx, payload) + if err != nil { + if err := encodeError(ctx, w, err); err != nil && errhandler != nil { + errhandler(ctx, w, err) + } + return + } + if err := encodeResponse(ctx, w, res); err != nil { + if errhandler != nil { + errhandler(ctx, w, err) + } + } + }) +} + // MountListRiskResultsByChatHandler configures the mux to serve the "risk" // service "listRiskResultsByChat" endpoint. func MountListRiskResultsByChatHandler(mux goahttp.Muxer, h http.Handler) { diff --git a/server/gen/http/risk/server/types.go b/server/gen/http/risk/server/types.go index e09ee716b1..cb7d2d3ed7 100644 --- a/server/gen/http/risk/server/types.go +++ b/server/gen/http/risk/server/types.go @@ -222,6 +222,17 @@ type ListRiskResultsResponseBody struct { NextCursor *string `form:"next_cursor,omitempty" json:"next_cursor,omitempty" xml:"next_cursor,omitempty"` } +// ListRiskResultsForAgentResponseBody is the type of the "risk" service +// "listRiskResultsForAgent" endpoint HTTP response body. +type ListRiskResultsForAgentResponseBody struct { + // The list of risk results with match content redacted to opaque fingerprints. + Results []*RiskResultRedactedResponseBody `form:"results" json:"results" xml:"results"` + // Total number of findings across all enabled policies. + TotalCount int64 `form:"total_count" json:"total_count" xml:"total_count"` + // Cursor for the next page of results. + NextCursor *string `form:"next_cursor,omitempty" json:"next_cursor,omitempty" xml:"next_cursor,omitempty"` +} + // ListRiskResultsByChatResponseBody is the type of the "risk" service // "listRiskResultsByChat" endpoint HTTP response body. type ListRiskResultsByChatResponseBody struct { @@ -1616,6 +1627,196 @@ type ListRiskResultsGatewayErrorResponseBody struct { Fault bool `form:"fault" json:"fault" xml:"fault"` } +// ListRiskResultsForAgentUnauthorizedResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unauthorized" error. +type ListRiskResultsForAgentUnauthorizedResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentForbiddenResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "forbidden" error. +type ListRiskResultsForAgentForbiddenResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentBadRequestResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "bad_request" error. +type ListRiskResultsForAgentBadRequestResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentNotFoundResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "not_found" error. +type ListRiskResultsForAgentNotFoundResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentConflictResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "conflict" error. +type ListRiskResultsForAgentConflictResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentUnsupportedMediaResponseBody is the type of the +// "risk" service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unsupported_media" error. +type ListRiskResultsForAgentUnsupportedMediaResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentInvalidResponseBody is the type of the "risk" service +// "listRiskResultsForAgent" endpoint HTTP response body for the "invalid" +// error. +type ListRiskResultsForAgentInvalidResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentInvariantViolationResponseBody is the type of the +// "risk" service "listRiskResultsForAgent" endpoint HTTP response body for the +// "invariant_violation" error. +type ListRiskResultsForAgentInvariantViolationResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentUnexpectedResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "unexpected" error. +type ListRiskResultsForAgentUnexpectedResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + +// ListRiskResultsForAgentGatewayErrorResponseBody is the type of the "risk" +// service "listRiskResultsForAgent" endpoint HTTP response body for the +// "gateway_error" error. +type ListRiskResultsForAgentGatewayErrorResponseBody struct { + // Name is the name of this class of errors. + Name string `form:"name" json:"name" xml:"name"` + // ID is a unique identifier for this particular occurrence of the problem. + ID string `form:"id" json:"id" xml:"id"` + // Message is a human-readable explanation specific to this occurrence of the + // problem. + Message string `form:"message" json:"message" xml:"message"` + // Is the error temporary? + Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` + // Is the error a timeout? + Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` + // Is the error a server-side fault? + Fault bool `form:"fault" json:"fault" xml:"fault"` +} + // ListRiskResultsByChatUnauthorizedResponseBody is the type of the "risk" // service "listRiskResultsByChat" endpoint HTTP response body for the // "unauthorized" error. @@ -3546,6 +3747,47 @@ type RiskResultResponseBody struct { CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` } +// RiskResultRedactedResponseBody is used to define fields on response body +// types. +type RiskResultRedactedResponseBody struct { + // The result ID. + ID string `form:"id" json:"id" xml:"id"` + // The risk policy ID. + PolicyID string `form:"policy_id" json:"policy_id" xml:"policy_id"` + // Policy version when this result was produced. + PolicyVersion int64 `form:"policy_version" json:"policy_version" xml:"policy_version"` + // The chat message that was scanned. + ChatMessageID string `form:"chat_message_id" json:"chat_message_id" xml:"chat_message_id"` + // The chat session containing the message. + ChatID *string `form:"chat_id,omitempty" json:"chat_id,omitempty" xml:"chat_id,omitempty"` + // Title of the chat session. + ChatTitle *string `form:"chat_title,omitempty" json:"chat_title,omitempty" xml:"chat_title,omitempty"` + // The user who owns the chat session. + UserID *string `form:"user_id,omitempty" json:"user_id,omitempty" xml:"user_id,omitempty"` + // Detection source (e.g. gitleaks, presidio, shadow_mcp). + Source string `form:"source" json:"source" xml:"source"` + // The matched rule identifier. + RuleID *string `form:"rule_id,omitempty" json:"rule_id,omitempty" xml:"rule_id,omitempty"` + // Human-readable description of the finding. + Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"` + // Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX + // is the first 8 hex characters of sha256(match). For shadow_mcp findings the + // original match value (a non-sensitive server URL or command identifier) is + // passed through verbatim. + MatchRedacted string `form:"match_redacted" json:"match_redacted" xml:"match_redacted"` + // Whether the original finding carried byte-position information within the + // source message. Exact positions are intentionally not exposed to avoid + // reconstruction attacks. + PositionKnown bool `form:"position_known" json:"position_known" xml:"position_known"` + // Confidence score for this finding. + Confidence *float64 `form:"confidence,omitempty" json:"confidence,omitempty" xml:"confidence,omitempty"` + // Tags from the detection rule. + Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"` + // When this result was created. + CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` +} + // RiskChatSummaryResponseBody is used to define fields on response body types. type RiskChatSummaryResponseBody struct { // The chat session ID. @@ -3813,6 +4055,28 @@ func NewListRiskResultsResponseBody(res *risk.ListRiskResultsResult) *ListRiskRe return body } +// NewListRiskResultsForAgentResponseBody builds the HTTP response body from +// the result of the "listRiskResultsForAgent" endpoint of the "risk" service. +func NewListRiskResultsForAgentResponseBody(res *risk.ListRiskResultsForAgentResult) *ListRiskResultsForAgentResponseBody { + body := &ListRiskResultsForAgentResponseBody{ + TotalCount: res.TotalCount, + NextCursor: res.NextCursor, + } + if res.Results != nil { + body.Results = make([]*RiskResultRedactedResponseBody, len(res.Results)) + for i, val := range res.Results { + if val == nil { + body.Results[i] = nil + continue + } + body.Results[i] = marshalTypesRiskResultRedactedToRiskResultRedactedResponseBody(val) + } + } else { + body.Results = []*RiskResultRedactedResponseBody{} + } + return body +} + // NewListRiskResultsByChatResponseBody builds the HTTP response body from the // result of the "listRiskResultsByChat" endpoint of the "risk" service. func NewListRiskResultsByChatResponseBody(res *risk.ListRiskResultsByChatResult) *ListRiskResultsByChatResponseBody { @@ -5012,6 +5276,156 @@ func NewListRiskResultsGatewayErrorResponseBody(res *goa.ServiceError) *ListRisk return body } +// NewListRiskResultsForAgentUnauthorizedResponseBody builds the HTTP response +// body from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentUnauthorizedResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentUnauthorizedResponseBody { + body := &ListRiskResultsForAgentUnauthorizedResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentForbiddenResponseBody builds the HTTP response +// body from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentForbiddenResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentForbiddenResponseBody { + body := &ListRiskResultsForAgentForbiddenResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentBadRequestResponseBody builds the HTTP response +// body from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentBadRequestResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentBadRequestResponseBody { + body := &ListRiskResultsForAgentBadRequestResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentNotFoundResponseBody builds the HTTP response body +// from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentNotFoundResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentNotFoundResponseBody { + body := &ListRiskResultsForAgentNotFoundResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentConflictResponseBody builds the HTTP response body +// from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentConflictResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentConflictResponseBody { + body := &ListRiskResultsForAgentConflictResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentUnsupportedMediaResponseBody builds the HTTP +// response body from the result of the "listRiskResultsForAgent" endpoint of +// the "risk" service. +func NewListRiskResultsForAgentUnsupportedMediaResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentUnsupportedMediaResponseBody { + body := &ListRiskResultsForAgentUnsupportedMediaResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentInvalidResponseBody builds the HTTP response body +// from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentInvalidResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentInvalidResponseBody { + body := &ListRiskResultsForAgentInvalidResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentInvariantViolationResponseBody builds the HTTP +// response body from the result of the "listRiskResultsForAgent" endpoint of +// the "risk" service. +func NewListRiskResultsForAgentInvariantViolationResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentInvariantViolationResponseBody { + body := &ListRiskResultsForAgentInvariantViolationResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentUnexpectedResponseBody builds the HTTP response +// body from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentUnexpectedResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentUnexpectedResponseBody { + body := &ListRiskResultsForAgentUnexpectedResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + +// NewListRiskResultsForAgentGatewayErrorResponseBody builds the HTTP response +// body from the result of the "listRiskResultsForAgent" endpoint of the "risk" +// service. +func NewListRiskResultsForAgentGatewayErrorResponseBody(res *goa.ServiceError) *ListRiskResultsForAgentGatewayErrorResponseBody { + body := &ListRiskResultsForAgentGatewayErrorResponseBody{ + Name: res.Name, + ID: res.ID, + Message: res.Message, + Temporary: res.Temporary, + Timeout: res.Timeout, + Fault: res.Fault, + } + return body +} + // NewListRiskResultsByChatUnauthorizedResponseBody builds the HTTP response // body from the result of the "listRiskResultsByChat" endpoint of the "risk" // service. @@ -6599,6 +7013,26 @@ func NewListRiskResultsPayload(policyID *string, chatID *string, category *strin return v } +// NewListRiskResultsForAgentPayload builds a risk service +// listRiskResultsForAgent endpoint payload. +func NewListRiskResultsForAgentPayload(policyID *string, chatID *string, category *string, ruleID *string, uniqueMatch *bool, from *string, to *string, cursor *string, limit *int, apikeyToken *string, sessionToken *string, projectSlugInput *string) *risk.ListRiskResultsForAgentPayload { + v := &risk.ListRiskResultsForAgentPayload{} + v.PolicyID = policyID + v.ChatID = chatID + v.Category = category + v.RuleID = ruleID + v.UniqueMatch = uniqueMatch + v.From = from + v.To = to + v.Cursor = cursor + v.Limit = limit + v.ApikeyToken = apikeyToken + v.SessionToken = sessionToken + v.ProjectSlugInput = projectSlugInput + + return v +} + // NewListRiskResultsByChatPayload builds a risk service listRiskResultsByChat // endpoint payload. func NewListRiskResultsByChatPayload(cursor *string, limit *int, apikeyToken *string, sessionToken *string, projectSlugInput *string) *risk.ListRiskResultsByChatPayload { diff --git a/server/gen/risk/client.go b/server/gen/risk/client.go index 8a27b7d11f..0573e8470b 100644 --- a/server/gen/risk/client.go +++ b/server/gen/risk/client.go @@ -23,6 +23,7 @@ type Client struct { UpdateRiskPolicyEndpoint goa.Endpoint DeleteRiskPolicyEndpoint goa.Endpoint ListRiskResultsEndpoint goa.Endpoint + ListRiskResultsForAgentEndpoint goa.Endpoint ListRiskResultsByChatEndpoint goa.Endpoint GetRiskOverviewEndpoint goa.Endpoint ListRiskCategoriesEndpoint goa.Endpoint @@ -36,7 +37,7 @@ type Client struct { } // NewClient initializes a "risk" service client given the endpoints. -func NewClient(createRiskPolicy, listRiskPolicies, getRiskCapabilities, getRiskPolicy, updateRiskPolicy, deleteRiskPolicy, listRiskResults, listRiskResultsByChat, getRiskOverview, listRiskCategories, getRiskUserBreakdown, getRiskRuleBreakdown, getRiskPolicyStatus, listShadowMCPApprovals, approveShadowMCP, revokeShadowMCPApproval, triggerRiskAnalysis goa.Endpoint) *Client { +func NewClient(createRiskPolicy, listRiskPolicies, getRiskCapabilities, getRiskPolicy, updateRiskPolicy, deleteRiskPolicy, listRiskResults, listRiskResultsForAgent, listRiskResultsByChat, getRiskOverview, listRiskCategories, getRiskUserBreakdown, getRiskRuleBreakdown, getRiskPolicyStatus, listShadowMCPApprovals, approveShadowMCP, revokeShadowMCPApproval, triggerRiskAnalysis goa.Endpoint) *Client { return &Client{ CreateRiskPolicyEndpoint: createRiskPolicy, ListRiskPoliciesEndpoint: listRiskPolicies, @@ -45,6 +46,7 @@ func NewClient(createRiskPolicy, listRiskPolicies, getRiskCapabilities, getRiskP UpdateRiskPolicyEndpoint: updateRiskPolicy, DeleteRiskPolicyEndpoint: deleteRiskPolicy, ListRiskResultsEndpoint: listRiskResults, + ListRiskResultsForAgentEndpoint: listRiskResultsForAgent, ListRiskResultsByChatEndpoint: listRiskResultsByChat, GetRiskOverviewEndpoint: getRiskOverview, ListRiskCategoriesEndpoint: listRiskCategories, @@ -209,6 +211,29 @@ func (c *Client) ListRiskResults(ctx context.Context, p *ListRiskResultsPayload) return ires.(*ListRiskResultsResult), nil } +// ListRiskResultsForAgent calls the "listRiskResultsForAgent" endpoint of the +// "risk" service. +// ListRiskResultsForAgent may return the following errors: +// - "unauthorized" (type *goa.ServiceError): unauthorized access +// - "forbidden" (type *goa.ServiceError): permission denied +// - "bad_request" (type *goa.ServiceError): request is invalid +// - "not_found" (type *goa.ServiceError): resource not found +// - "conflict" (type *goa.ServiceError): resource already exists +// - "unsupported_media" (type *goa.ServiceError): unsupported media type +// - "invalid" (type *goa.ServiceError): request contains one or more invalidation fields +// - "invariant_violation" (type *goa.ServiceError): an unexpected error occurred +// - "unexpected" (type *goa.ServiceError): an unexpected error occurred +// - "gateway_error" (type *goa.ServiceError): an unexpected error occurred +// - error: internal error +func (c *Client) ListRiskResultsForAgent(ctx context.Context, p *ListRiskResultsForAgentPayload) (res *ListRiskResultsForAgentResult, err error) { + var ires any + ires, err = c.ListRiskResultsForAgentEndpoint(ctx, p) + if err != nil { + return + } + return ires.(*ListRiskResultsForAgentResult), nil +} + // ListRiskResultsByChat calls the "listRiskResultsByChat" endpoint of the // "risk" service. // ListRiskResultsByChat may return the following errors: diff --git a/server/gen/risk/endpoints.go b/server/gen/risk/endpoints.go index 7178969af2..e2d6e134c1 100644 --- a/server/gen/risk/endpoints.go +++ b/server/gen/risk/endpoints.go @@ -23,6 +23,7 @@ type Endpoints struct { UpdateRiskPolicy goa.Endpoint DeleteRiskPolicy goa.Endpoint ListRiskResults goa.Endpoint + ListRiskResultsForAgent goa.Endpoint ListRiskResultsByChat goa.Endpoint GetRiskOverview goa.Endpoint ListRiskCategories goa.Endpoint @@ -47,6 +48,7 @@ func NewEndpoints(s Service) *Endpoints { UpdateRiskPolicy: NewUpdateRiskPolicyEndpoint(s, a.APIKeyAuth), DeleteRiskPolicy: NewDeleteRiskPolicyEndpoint(s, a.APIKeyAuth), ListRiskResults: NewListRiskResultsEndpoint(s, a.APIKeyAuth), + ListRiskResultsForAgent: NewListRiskResultsForAgentEndpoint(s, a.APIKeyAuth), ListRiskResultsByChat: NewListRiskResultsByChatEndpoint(s, a.APIKeyAuth), GetRiskOverview: NewGetRiskOverviewEndpoint(s, a.APIKeyAuth), ListRiskCategories: NewListRiskCategoriesEndpoint(s, a.APIKeyAuth), @@ -69,6 +71,7 @@ func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { e.UpdateRiskPolicy = m(e.UpdateRiskPolicy) e.DeleteRiskPolicy = m(e.DeleteRiskPolicy) e.ListRiskResults = m(e.ListRiskResults) + e.ListRiskResultsForAgent = m(e.ListRiskResultsForAgent) e.ListRiskResultsByChat = m(e.ListRiskResultsByChat) e.GetRiskOverview = m(e.GetRiskOverview) e.ListRiskCategories = m(e.ListRiskCategories) @@ -494,6 +497,65 @@ func NewListRiskResultsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) } } +// NewListRiskResultsForAgentEndpoint returns an endpoint function that calls +// the method "listRiskResultsForAgent" of service "risk". +func NewListRiskResultsForAgentEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint { + return func(ctx context.Context, req any) (any, error) { + p := req.(*ListRiskResultsForAgentPayload) + var err error + sc := security.APIKeyScheme{ + Name: "apikey", + Scopes: []string{"consumer", "producer", "chat", "hooks"}, + RequiredScopes: []string{"producer"}, + } + var key string + if p.ApikeyToken != nil { + key = *p.ApikeyToken + } + ctx, err = authAPIKeyFn(ctx, key, &sc) + if err == nil { + sc := security.APIKeyScheme{ + Name: "project_slug", + Scopes: []string{}, + RequiredScopes: []string{"producer"}, + } + var key string + if p.ProjectSlugInput != nil { + key = *p.ProjectSlugInput + } + ctx, err = authAPIKeyFn(ctx, key, &sc) + } + if err != nil { + sc := security.APIKeyScheme{ + Name: "session", + Scopes: []string{}, + RequiredScopes: []string{}, + } + var key string + if p.SessionToken != nil { + key = *p.SessionToken + } + ctx, err = authAPIKeyFn(ctx, key, &sc) + if err == nil { + sc := security.APIKeyScheme{ + Name: "project_slug", + Scopes: []string{}, + RequiredScopes: []string{}, + } + var key string + if p.ProjectSlugInput != nil { + key = *p.ProjectSlugInput + } + ctx, err = authAPIKeyFn(ctx, key, &sc) + } + } + if err != nil { + return nil, err + } + return s.ListRiskResultsForAgent(ctx, p) + } +} + // NewListRiskResultsByChatEndpoint returns an endpoint function that calls the // method "listRiskResultsByChat" of service "risk". func NewListRiskResultsByChatEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint { diff --git a/server/gen/risk/service.go b/server/gen/risk/service.go index d93c55bb8e..6844281296 100644 --- a/server/gen/risk/service.go +++ b/server/gen/risk/service.go @@ -31,6 +31,14 @@ type Service interface { DeleteRiskPolicy(context.Context, *DeleteRiskPolicyPayload) (err error) // List risk analysis results for the current project. ListRiskResults(context.Context, *ListRiskResultsPayload) (res *ListRiskResultsResult, err error) + // List risk analysis results with the `match` field redacted to an opaque + // length+sha256-prefix fingerprint. Matches the payload and pagination + // semantics of listRiskResults. Designed for AI assistant / MCP consumption so + // secret content (gitleaks captures, presidio entities, prompt-injection + // payloads) never reaches the model context. For shadow_mcp findings the + // `match` value — a non-sensitive server URL or command identifier — is passed + // through verbatim. + ListRiskResultsForAgent(context.Context, *ListRiskResultsForAgentPayload) (res *ListRiskResultsForAgentResult, err error) // List risk results grouped by chat session for the current project. ListRiskResultsByChat(context.Context, *ListRiskResultsByChatPayload) (res *ListRiskResultsByChatResult, err error) // Get risk overview metrics and trend data for the current project. @@ -85,7 +93,7 @@ const ServiceName = "risk" // MethodNames lists the service method names as defined in the design. These // are the same values that are set in the endpoint request contexts under the // MethodKey key. -var MethodNames = [17]string{"createRiskPolicy", "listRiskPolicies", "getRiskCapabilities", "getRiskPolicy", "updateRiskPolicy", "deleteRiskPolicy", "listRiskResults", "listRiskResultsByChat", "getRiskOverview", "listRiskCategories", "getRiskUserBreakdown", "getRiskRuleBreakdown", "getRiskPolicyStatus", "listShadowMCPApprovals", "approveShadowMCP", "revokeShadowMCPApproval", "triggerRiskAnalysis"} +var MethodNames = [18]string{"createRiskPolicy", "listRiskPolicies", "getRiskCapabilities", "getRiskPolicy", "updateRiskPolicy", "deleteRiskPolicy", "listRiskResults", "listRiskResultsForAgent", "listRiskResultsByChat", "getRiskOverview", "listRiskCategories", "getRiskUserBreakdown", "getRiskRuleBreakdown", "getRiskPolicyStatus", "listShadowMCPApprovals", "approveShadowMCP", "revokeShadowMCPApproval", "triggerRiskAnalysis"} // ApproveShadowMCPPayload is the payload type of the risk service // approveShadowMCP method. @@ -252,6 +260,46 @@ type ListRiskResultsByChatResult struct { NextCursor *string } +// ListRiskResultsForAgentPayload is the payload type of the risk service +// listRiskResultsForAgent method. +type ListRiskResultsForAgentPayload struct { + ApikeyToken *string + SessionToken *string + ProjectSlugInput *string + // Optional policy ID to filter by. + PolicyID *string + // Optional chat ID to filter by. + ChatID *string + // Optional rule category key to filter by (e.g. secrets, pii, financial). + Category *string + // Optional rule identifier substring to filter by (case-insensitive, e.g. + // 'secret' matches all 'secret.*' rules). + RuleID *string + // If true, collapse results to one row per (policy_id, rule_id, match), + // keeping the most recent occurrence. Useful when the same secret is detected + // many times within a single message body. + UniqueMatch *bool + // Filter results to messages created at or after this timestamp (ISO 8601). + From *string + // Filter results to messages created strictly before this timestamp (ISO 8601). + To *string + // Cursor to fetch the next page of results. + Cursor *string + // Maximum number of results to return per page. + Limit *int +} + +// ListRiskResultsForAgentResult is the result type of the risk service +// listRiskResultsForAgent method. +type ListRiskResultsForAgentResult struct { + // The list of risk results with match content redacted to opaque fingerprints. + Results []*types.RiskResultRedacted + // Total number of findings across all enabled policies. + TotalCount int64 + // Cursor for the next page of results. + NextCursor *string +} + // ListRiskResultsPayload is the payload type of the risk service // listRiskResults method. type ListRiskResultsPayload struct { diff --git a/server/gen/types/risk_result_redacted.go b/server/gen/types/risk_result_redacted.go new file mode 100644 index 0000000000..c8bbf79a23 --- /dev/null +++ b/server/gen/types/risk_result_redacted.go @@ -0,0 +1,47 @@ +// Code generated by goa v3.25.3, DO NOT EDIT. +// +// User types +// +// Command: +// $ goa gen github.com/speakeasy-api/gram/server/design + +package types + +type RiskResultRedacted struct { + // The result ID. + ID string + // The risk policy ID. + PolicyID string + // Policy version when this result was produced. + PolicyVersion int64 + // The chat message that was scanned. + ChatMessageID string + // The chat session containing the message. + ChatID *string + // Title of the chat session. + ChatTitle *string + // The user who owns the chat session. + UserID *string + // Detection source (e.g. gitleaks, presidio, shadow_mcp). + Source string + // The matched rule identifier. + RuleID *string + // Human-readable description of the finding. + Description *string + // Opaque fingerprint of the original match in the form `` where N is the byte length of the original match and XXXXXXXX + // is the first 8 hex characters of sha256(match). For shadow_mcp findings the + // original match value (a non-sensitive server URL or command identifier) is + // passed through verbatim. + MatchRedacted string + // Whether the original finding carried byte-position information within the + // source message. Exact positions are intentionally not exposed to avoid + // reconstruction attacks. + PositionKnown bool + // Confidence score for this finding. + Confidence *float64 + // Tags from the detection rule. + Tags []string + // When this result was created. + CreatedAt string +} diff --git a/server/internal/risk/impl.go b/server/internal/risk/impl.go index 4291bfd9b0..1d5146ca9c 100644 --- a/server/internal/risk/impl.go +++ b/server/internal/risk/impl.go @@ -3,6 +3,8 @@ package risk import ( "cmp" "context" + "crypto/sha256" + "encoding/hex" "fmt" "log/slog" "slices" @@ -711,6 +713,105 @@ func parseOptionalTimestamptz(raw *string) (pgtype.Timestamptz, error) { return pgtype.Timestamptz{Time: parsed.UTC(), InfinityModifier: pgtype.Finite, Valid: true}, nil } +// ListRiskResultsForAgent serves the same data as ListRiskResults but strips +// raw `match` content from non-shadow_mcp findings before returning, so the +// agent / MCP surface never holds secret values in model context. Shadow-MCP +// findings pass `match` through verbatim because the value is a server URL +// or stdio command identifier the dashboard already exposes unmasked. +func (s *Service) ListRiskResultsForAgent(ctx context.Context, payload *gen.ListRiskResultsForAgentPayload) (*gen.ListRiskResultsForAgentResult, error) { + base, err := s.ListRiskResults(ctx, &gen.ListRiskResultsPayload{ + ApikeyToken: payload.ApikeyToken, + SessionToken: payload.SessionToken, + ProjectSlugInput: payload.ProjectSlugInput, + PolicyID: payload.PolicyID, + ChatID: payload.ChatID, + Category: payload.Category, + RuleID: payload.RuleID, + UniqueMatch: payload.UniqueMatch, + From: payload.From, + To: payload.To, + Cursor: payload.Cursor, + Limit: payload.Limit, + }) + if err != nil { + return nil, err + } + + // ListRiskResults already enforced auth above; this lookup is safe and + // only used to derive the per-org salt for match-fingerprint hashing. + authCtx, ok := contextvalues.GetAuthContext(ctx) + if !ok || authCtx == nil { + return nil, oops.C(oops.CodeUnauthorized) + } + + redacted := make([]*types.RiskResultRedacted, 0, len(base.Results)) + for _, r := range base.Results { + redacted = append(redacted, redactRiskResult(r, authCtx.ActiveOrganizationID)) + } + + return &gen.ListRiskResultsForAgentResult{ + Results: redacted, + TotalCount: base.TotalCount, + NextCursor: base.NextCursor, + }, nil +} + +// redactRiskResult converts a RiskResult into a RiskResultRedacted by +// replacing raw `match` content with an opaque length+sha256-prefix +// fingerprint and coarsening position info to a single boolean. Source == +// "shadow_mcp" is a deliberate carve-out: its match is a server URL or +// command identifier (already shown unmasked in the dashboard) and the agent +// needs to be able to name it to be useful. +// +// orgID is mixed into the hash so fingerprints cannot correlate the same +// secret across organizations even if some future code path widens the +// surface beyond org-scoped access. +func redactRiskResult(r *types.RiskResult, orgID string) *types.RiskResultRedacted { + matchRedacted := redactMatch(r.Source, r.Match, orgID) + + return &types.RiskResultRedacted{ + ID: r.ID, + PolicyID: r.PolicyID, + PolicyVersion: r.PolicyVersion, + ChatMessageID: r.ChatMessageID, + ChatID: r.ChatID, + ChatTitle: r.ChatTitle, + UserID: r.UserID, + Source: r.Source, + RuleID: r.RuleID, + Description: r.Description, + MatchRedacted: matchRedacted, + PositionKnown: r.StartPos != nil && r.EndPos != nil, + Confidence: r.Confidence, + Tags: r.Tags, + CreatedAt: r.CreatedAt, + } +} + +// redactMatch encodes a match value as `` for +// non-shadow_mcp sources, or passes it through verbatim for shadow_mcp. +// A nil/empty match collapses to `` without a sha component +// so the absence of a finding payload is distinguishable from a real hash. +// +// The hash is salted by orgID with a NUL separator so two different orgs +// holding the same secret produce different fingerprints — defense in depth +// against any future surface that crosses an org boundary. Within an org the +// fingerprint stays deterministic so agents can still dedupe. +func redactMatch(source string, match *string, orgID string) string { + if match == nil || *match == "" { + return "" + } + if source == shadowmcp.SourceShadowMCP { + return *match + } + var buf []byte + buf = append(buf, orgID...) + buf = append(buf, 0x00) + buf = append(buf, *match...) + sum := sha256.Sum256(buf) + return fmt.Sprintf("", len(*match), hex.EncodeToString(sum[:4])) +} + func (s *Service) ListRiskResultsByChat(ctx context.Context, payload *gen.ListRiskResultsByChatPayload) (*gen.ListRiskResultsByChatResult, error) { authCtx, ok := contextvalues.GetAuthContext(ctx) if !ok || authCtx == nil || authCtx.ProjectID == nil { diff --git a/server/internal/risk/redact_internal_test.go b/server/internal/risk/redact_internal_test.go new file mode 100644 index 0000000000..63793aabc4 --- /dev/null +++ b/server/internal/risk/redact_internal_test.go @@ -0,0 +1,74 @@ +package risk + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +// White-box tests for the per-org-salted redaction helper. The integration +// tests in results_test.go can't express cross-org assertions because +// testenv.InitAuthContext pins every test instance to mockidp.MockOrgID, so +// we exercise the pure function directly here. + +func TestRedactMatch_FingerprintDiffersAcrossOrgs(t *testing.T) { + t.Parallel() + + secret := "sk-shared-across-orgs-7777" + + fpOrgA := redactMatch("gitleaks", &secret, "org-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa") + fpOrgB := redactMatch("gitleaks", &secret, "org-bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb") + + require.NotEqual(t, fpOrgA, fpOrgB, + "same secret in two different orgs must produce different fingerprints (org-salted sha256)") + require.Regexp(t, `^$`, fpOrgA) + require.Regexp(t, `^$`, fpOrgB) +} + +func TestRedactMatch_FingerprintDeterministicWithinOrg(t *testing.T) { + t.Parallel() + + secret := "sk-abc123def456" + orgID := "org-cccccccc-cccc-cccc-cccc-cccccccccccc" + + fp1 := redactMatch("gitleaks", &secret, orgID) + fp2 := redactMatch("gitleaks", &secret, orgID) + + require.Equal(t, fp1, fp2, + "same secret in same org must produce identical fingerprints so agents can dedupe") +} + +func TestRedactMatch_ShadowMCPIgnoresSalt(t *testing.T) { + t.Parallel() + + const serverID = "mcp__evil-server__" + match := serverID + + got := redactMatch("shadow_mcp", &match, "any-org-id") + + require.Equal(t, serverID, got, + "shadow_mcp match should pass through verbatim regardless of orgID") +} + +func TestRedactMatch_EmptyMatchCollapses(t *testing.T) { + t.Parallel() + + empty := "" + require.Equal(t, "", redactMatch("gitleaks", nil, "org-x")) + require.Equal(t, "", redactMatch("gitleaks", &empty, "org-x")) +} + +// Guards against an "org_id || match" concatenation bug where an attacker +// could shift bytes between salt and payload. With a NUL separator, +// (orgID="ab", match="cd") and (orgID="a", match="bcd") must produce +// different fingerprints even though their concatenation is identical. +func TestRedactMatch_NULSeparatorPreventsBoundaryAmbiguity(t *testing.T) { + t.Parallel() + + left, right := "bcd", "cd" + fpA := redactMatch("gitleaks", &left, "a") + fpB := redactMatch("gitleaks", &right, "ab") + + require.NotEqual(t, fpA, fpB, + "shifting bytes from match into orgID must change the fingerprint (NUL separator boundary)") +} diff --git a/server/internal/risk/results_test.go b/server/internal/risk/results_test.go index 1f11d97d92..abef128199 100644 --- a/server/internal/risk/results_test.go +++ b/server/internal/risk/results_test.go @@ -276,3 +276,133 @@ func TestDeleteRiskPolicy_Unauthorized(t *testing.T) { require.ErrorAs(t, err, &oopsErr) require.Equal(t, oops.CodeForbidden, oopsErr.Code) } + +// seedRiskResultWith inserts a finding with caller-supplied source, rule_id, +// and match so redaction-mode tests can vary inputs independently of the +// gitleaks-flavoured default in seedRiskResult. +func seedRiskResultWith(t *testing.T, ti *testInstance, projectID uuid.UUID, orgID string, policyID uuid.UUID, msgID uuid.UUID, source, ruleID, match string) { + t.Helper() + ctx := t.Context() + + resultID, err := uuid.NewV7() + require.NoError(t, err) + + repo := riskrepo.New(ti.conn) + _, err = repo.InsertRiskResults(ctx, []riskrepo.InsertRiskResultsParams{{ + ID: resultID, + ProjectID: projectID, + OrganizationID: orgID, + RiskPolicyID: policyID, + RiskPolicyVersion: 1, + ChatMessageID: msgID, + Source: source, + Found: true, + RuleID: pgtype.Text{String: ruleID, Valid: ruleID != ""}, + Description: pgtype.Text{String: "", Valid: false}, + Match: pgtype.Text{String: match, Valid: match != ""}, + StartPos: pgtype.Int4{Int32: 0, Valid: true}, + EndPos: pgtype.Int4{Int32: int32(len(match)), Valid: true}, + Confidence: pgtype.Float8{Float64: 1.0, Valid: true}, + Tags: nil, + }}) + require.NoError(t, err) +} + +func TestListRiskResultsForAgent_RedactsGitleaksMatch(t *testing.T) { + t.Parallel() + ctx, ti := newTestRiskService(t) + + authCtx, _ := contextvalues.GetAuthContext(ctx) + ctx = withExactAccessGrants(t, ctx, ti.conn, + authz.Grant{Scope: authz.ScopeOrgAdmin, Selector: authz.NewSelector(authz.ScopeOrgAdmin, authCtx.ActiveOrganizationID)}, + ) + + policy, err := ti.service.CreateRiskPolicy(ctx, &gen.CreateRiskPolicyPayload{Name: new("Agent Redact")}) + require.NoError(t, err) + + policyID, _ := uuid.Parse(policy.ID) + _, msgID := seedChatMessage(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID) + seedRiskResult(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID, policyID, 1, msgID, true) + + result, err := ti.service.ListRiskResultsForAgent(ctx, &gen.ListRiskResultsForAgentPayload{ + PolicyID: &policy.ID, + }) + require.NoError(t, err) + require.Len(t, result.Results, 1) + + got := result.Results[0] + // seedRiskResult uses match "AKIAIOSFODNN7EXAMPLE" (len 20). + require.NotContains(t, got.MatchRedacted, "AKIA", "raw secret leaked into redacted output") + require.Contains(t, got.MatchRedacted, "len=20") + require.Regexp(t, `^$`, got.MatchRedacted) + require.True(t, got.PositionKnown, "position_known should be true when start/end pos are present") + require.Equal(t, "aws-access-key-id", *got.RuleID) +} + +func TestListRiskResultsForAgent_ShadowMCPPassthrough(t *testing.T) { + t.Parallel() + ctx, ti := newTestRiskService(t) + + authCtx, _ := contextvalues.GetAuthContext(ctx) + ctx = withExactAccessGrants(t, ctx, ti.conn, + authz.Grant{Scope: authz.ScopeOrgAdmin, Selector: authz.NewSelector(authz.ScopeOrgAdmin, authCtx.ActiveOrganizationID)}, + ) + + policy, err := ti.service.CreateRiskPolicy(ctx, &gen.CreateRiskPolicyPayload{ + Name: new("Shadow Passthrough"), + Sources: []string{"shadow_mcp"}, + }) + require.NoError(t, err) + + policyID, _ := uuid.Parse(policy.ID) + _, msgID := seedChatMessage(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID) + const shadowMatch = "mcp__evil-server__" + seedRiskResultWith(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID, policyID, msgID, "shadow_mcp", "unapproved-mcp", shadowMatch) + + result, err := ti.service.ListRiskResultsForAgent(ctx, &gen.ListRiskResultsForAgentPayload{ + PolicyID: &policy.ID, + }) + require.NoError(t, err) + require.Len(t, result.Results, 1) + require.Equal(t, shadowMatch, result.Results[0].MatchRedacted, "shadow_mcp match should pass through verbatim") +} + +func TestListRiskResultsForAgent_DeterministicFingerprintWithinOrg(t *testing.T) { + t.Parallel() + ctx, ti := newTestRiskService(t) + + authCtx, _ := contextvalues.GetAuthContext(ctx) + ctx = withExactAccessGrants(t, ctx, ti.conn, + authz.Grant{Scope: authz.ScopeOrgAdmin, Selector: authz.NewSelector(authz.ScopeOrgAdmin, authCtx.ActiveOrganizationID)}, + ) + + policy, err := ti.service.CreateRiskPolicy(ctx, &gen.CreateRiskPolicyPayload{Name: new("Dedupe")}) + require.NoError(t, err) + policyID, _ := uuid.Parse(policy.ID) + + _, msgA := seedChatMessage(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID) + _, msgB := seedChatMessage(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID) + const sameSecret = "sk-abc123def456" + seedRiskResultWith(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID, policyID, msgA, "gitleaks", "openai-api-key", sameSecret) + seedRiskResultWith(t, ti, *authCtx.ProjectID, authCtx.ActiveOrganizationID, policyID, msgB, "gitleaks", "openai-api-key", sameSecret) + + result, err := ti.service.ListRiskResultsForAgent(ctx, &gen.ListRiskResultsForAgentPayload{ + PolicyID: &policy.ID, + }) + require.NoError(t, err) + require.Len(t, result.Results, 2) + require.Equal(t, result.Results[0].MatchRedacted, result.Results[1].MatchRedacted, + "identical secrets within the same org must produce identical fingerprints so the agent can dedupe") +} + +func TestListRiskResultsForAgent_Unauthorized(t *testing.T) { + t.Parallel() + ctx, ti := newTestRiskService(t) + ctx = withExactAccessGrants(t, ctx, ti.conn) + + _, err := ti.service.ListRiskResultsForAgent(ctx, &gen.ListRiskResultsForAgentPayload{}) + require.Error(t, err) + var oopsErr *oops.ShareableError + require.ErrorAs(t, err, &oopsErr) + require.Equal(t, oops.CodeForbidden, oopsErr.Code) +}