diff --git a/apps/app/src/components/chat/message-list-provider.tsx b/apps/app/src/components/chat/message-list-provider.tsx index acc10532d8..583c783c7d 100644 --- a/apps/app/src/components/chat/message-list-provider.tsx +++ b/apps/app/src/components/chat/message-list-provider.tsx @@ -56,7 +56,7 @@ interface MessageListProviderProps { export interface DispatchAction { target: "settings" action: "open" - section: "commands" | "skills" | "mcps" | "plugins" | "providers" + section: "commands" | "skills" | "mcps" | "plugins" | "providers" | "connect" } export function MessageListProvider({ diff --git a/apps/app/src/components/chat/task-suggestions.tsx b/apps/app/src/components/chat/task-suggestions.tsx index d7f3f9e2f2..f4908f869c 100644 --- a/apps/app/src/components/chat/task-suggestions.tsx +++ b/apps/app/src/components/chat/task-suggestions.tsx @@ -1,5 +1,6 @@ "use client" +import { useEffect, useMemo, useState } from "react" import { DescriptiveButton, DescriptiveButtonContent, @@ -8,9 +9,23 @@ import { DescriptiveButtonTitle, } from "@/components/descriptive-button" import { useMessageList } from "@/components/chat/message-list-provider" +import { createDenClient, readDenSettings } from "@/app/lib/den" +import { t } from "@/i18n" import { cn } from "@/lib/utils" import { useOrgRestrictions } from "@/react-app/domains/cloud/desktop-config-provider" +import { + EMPTY_CONNECT_CAPABILITY_INVENTORY, + listAssignedConnectCapabilities, + type ConnectCapabilityInventory, + type ConnectCapabilityReadiness, +} from "@/react-app/domains/session/surface/connect-capability-inventory" +import { encodeConnectSkillToken } from "@/react-app/domains/session/surface/composer/connect-skill-token" import { BoltIcon, CubeIcon, DocumentChartBarIcon, GlobeAltIcon, SparklesIcon } from "@heroicons/react/24/solid" +import type { + OnboardingPrompt, + OnboardingPromptConnectSkillReference, + OnboardingPromptSkillReference, +} from "@openwork/types/den/desktop-policies" const CSV_PROMPT = "Create a sample CSV file with 20 rows of fake customer data (name, email, company, revenue). Then show me a summary of the data." @@ -20,16 +35,164 @@ const BROWSER_PROMPT = const ORGANIZATION_PROMPT_TITLES = ["Organization prompt 1", "Organization prompt 2", "Organization prompt 3"] +export type OrganizationPromptSkillReadiness = ConnectCapabilityReadiness | "checking" +export type OrganizationPromptCardAction = "fill" | "open_connect" | "blocked" + +const EMPTY_PROMPT_READINESS: Record = {} + +function promptText(prompt: string | OnboardingPrompt) { + return typeof prompt === "string" ? prompt : prompt.prompt +} + +function promptSkill(prompt: string | OnboardingPrompt) { + return typeof prompt === "string" ? undefined : prompt.skill +} + +function skillLabel(skill: OnboardingPromptSkillReference) { + return `/${skill.slug}` +} + +export function organizationPromptSkillKey(skill: OnboardingPromptSkillReference) { + return skill.source === "local" + ? `local:${skill.slug}` + : `connect:${skill.marketplaceId}:${skill.pluginId}:${skill.configObjectId}:${skill.capabilityName}` +} + +function connectSkillPath(skill: OnboardingPromptConnectSkillReference) { + return `openwork-connect://${skill.marketplaceId}/${skill.pluginId}/${skill.configObjectId}` +} + +export function readinessLabel(readiness: OrganizationPromptSkillReadiness) { + switch (readiness) { + case "ready": + return t("connect.group_ready") + case "needs_signin": + return t("connect.group_needs_signin") + case "needs_admin_setup": + return t("connect.group_needs_admin_setup") + case "checking": + return "Checking skill readiness" + } +} + +function promptSkillToken(skill: OnboardingPromptSkillReference) { + if (skill.source === "local") return `[skill ${skill.slug}]` + return encodeConnectSkillToken({ + slug: skill.slug, + name: skill.name, + marketplace: skill.marketplaceName, + capability: skill.capabilityName, + }) +} + +export function selectionPromptForOrganizationPrompt(prompt: string | OnboardingPrompt) { + const text = promptText(prompt) + const skill = promptSkill(prompt) + return skill ? `${promptSkillToken(skill)} ${text}` : text +} + +export function resolveOrganizationPromptCardAction(input: { + skill?: OnboardingPromptSkillReference + readiness: OrganizationPromptSkillReadiness +}): OrganizationPromptCardAction { + if (!input.skill) return "fill" + if (input.readiness === "ready") return "fill" + if (input.readiness === "needs_signin") return "open_connect" + return "blocked" +} + +function readinessRecord( + skills: OnboardingPromptConnectSkillReference[], + readiness: OrganizationPromptSkillReadiness, +) { + const record: Record = {} + for (const skill of skills) { + record[organizationPromptSkillKey(skill)] = readiness + } + return record +} + +export function resolveConnectPromptSkillReadiness(input: { + skill: OnboardingPromptConnectSkillReference + inventory: ConnectCapabilityInventory +}): ConnectCapabilityReadiness { + const path = connectSkillPath(input.skill) + const match = input.inventory.skills.find((skill) => + skill.connectCapabilityName === input.skill.capabilityName || skill.path === path + ) + return match?.connectReadiness ?? "needs_admin_setup" +} + +export function useOrganizationPromptSkillReadiness(prompts: OnboardingPrompt[] | undefined) { + const connectSkills = useMemo(() => prompts?.flatMap((prompt) => + prompt.skill?.source === "connect" ? [prompt.skill] : [] + ) ?? [], [prompts]) + const signature = connectSkills.map(organizationPromptSkillKey).join("\n") + + const [readinessByKey, setReadinessByKey] = useState>(EMPTY_PROMPT_READINESS) + + useEffect(() => { + if (!connectSkills.length) { + setReadinessByKey(EMPTY_PROMPT_READINESS) + return + } + + let cancelled = false + setReadinessByKey(readinessRecord(connectSkills, "checking")) + + const loadReadiness = async () => { + const settings = readDenSettings() + const token = settings.authToken?.trim() ?? "" + const organizationId = settings.activeOrgId?.trim() ?? "" + if (!token || !organizationId) { + if (!cancelled) setReadinessByKey(readinessRecord(connectSkills, "needs_signin")) + return + } + + const client = createDenClient({ baseUrl: settings.baseUrl, token }) + let inventory = EMPTY_CONNECT_CAPABILITY_INVENTORY + try { + inventory = await listAssignedConnectCapabilities({ client, organizationId }) + } catch { + if (!cancelled) setReadinessByKey(readinessRecord(connectSkills, "needs_admin_setup")) + return + } + + const next: Record = {} + for (const skill of connectSkills) { + next[organizationPromptSkillKey(skill)] = resolveConnectPromptSkillReadiness({ skill, inventory }) + } + if (!cancelled) setReadinessByKey(next) + } + + void loadReadiness() + return () => { + cancelled = true + } + }, [signature]) + + return readinessByKey +} + export function resolveOrganizationPromptCardContent(input: { - prompt: string + prompt: string | OnboardingPrompt description?: string index: number + readiness?: OrganizationPromptSkillReadiness }) { + const prompt = promptText(input.prompt) + const skill = promptSkill(input.prompt) + const readiness = skill ? input.readiness ?? "checking" : "ready" const title = input.description?.trim() return { title: title || ORGANIZATION_PROMPT_TITLES[input.index] || "Organization prompt", - description: input.prompt, - selectionPrompt: input.prompt, + description: prompt, + selectionPrompt: selectionPromptForOrganizationPrompt(input.prompt), + skill, + skillLabel: skill ? skillLabel(skill) : undefined, + readiness, + readinessLabel: skill ? readinessLabel(readiness) : undefined, + action: resolveOrganizationPromptCardAction({ skill, readiness }), } } @@ -42,6 +205,7 @@ export function TaskSuggestions({ className }: TaskSuggestionsProps) { const orgRestrictions = useOrgRestrictions() const organizationPrompts = orgRestrictions.onboardingPrompts const organizationPromptDescriptions = orgRestrictions.onboardingPromptDescriptions + const readinessByKey = useOrganizationPromptSkillReadiness(organizationPrompts) if (!displaySuggestions) { return null @@ -86,18 +250,38 @@ export function TaskSuggestions({ className }: TaskSuggestionsProps) { {hasOrganizationPrompts ? ( organizationPrompts.map((prompt, index) => { + const skill = prompt.skill const card = resolveOrganizationPromptCardContent({ prompt, description: organizationPromptDescriptions?.[index], index, + readiness: skill ? readinessByKey[organizationPromptSkillKey(skill)] : undefined, }) + const disabled = card.action === "blocked" + const handleClick = () => { + if (card.action === "open_connect") { + dispatchAction({ + target: "settings", + action: "open", + section: "connect", + }) + return + } + if (card.action === "fill") setPrompt(card.selectionPrompt) + } return ( - setPrompt(card.selectionPrompt)}> + {card.title} + {card.skillLabel || card.readinessLabel ? ( + + {card.skillLabel ? {card.skillLabel} : null} + {card.readinessLabel ? {card.readinessLabel} : null} + + ) : null} {card.description} diff --git a/apps/app/src/react-app/domains/session/chat/session-empty-hero.tsx b/apps/app/src/react-app/domains/session/chat/session-empty-hero.tsx index a52fc16b76..db55abe69b 100644 --- a/apps/app/src/react-app/domains/session/chat/session-empty-hero.tsx +++ b/apps/app/src/react-app/domains/session/chat/session-empty-hero.tsx @@ -2,7 +2,12 @@ import { useState } from "react"; import { Zap } from "lucide-react"; -import { resolveOrganizationPromptCardContent } from "@/components/chat/task-suggestions"; +import { + organizationPromptSkillKey, + resolveOrganizationPromptCardContent, + useOrganizationPromptSkillReadiness, + type OrganizationPromptCardAction, +} from "@/components/chat/task-suggestions"; import { useOrgRestrictions } from "@/react-app/domains/cloud/desktop-config-provider"; import { NewTaskComposer, type NewTaskComposerContext } from "./new-task-composer"; @@ -10,6 +15,10 @@ type HeroSuggestion = { title: string; description: string; prompt: string; + action: OrganizationPromptCardAction; + disabled: boolean; + skillLabel?: string; + readinessLabel?: string; }; const DEFAULT_SUGGESTIONS: HeroSuggestion[] = [ @@ -17,21 +26,29 @@ const DEFAULT_SUGGESTIONS: HeroSuggestion[] = [ title: "Summarize my week", description: "Pull highlights from email and calendar.", prompt: "Summarize my week: pull the highlights from my connected email and calendar and give me a short digest of what happened and what needs my attention.", + action: "fill", + disabled: false, }, { title: "Clean up a spreadsheet", description: "Drop in a CSV and describe the result you want.", prompt: "Create a sample CSV file with 20 rows of fake customer data (name, email, company, revenue). Then show me a summary of the data.", + action: "fill", + disabled: false, }, { title: "Draft a document", description: "Reports, emails, or briefs from a few bullet points.", prompt: "Draft a one-page project brief. Ask me for the bullet points you need, then turn them into a clear, well-structured document.", + action: "fill", + disabled: false, }, { title: "Automate a web task", description: "Use the built-in browser for repetitive steps.", prompt: "Open craigslist.org in the browser and search for couches for sale. Show me the top 5 results with prices.", + action: "fill", + disabled: false, }, ]; @@ -42,6 +59,7 @@ export type SessionEmptyHeroProps = { /** Called with the task prompt; the caller creates the session (and workspace if needed). */ onRunTask: (prompt: string) => void; onOpenProviderAuth?: () => void; + onOpenConnect?: () => void; /** Workspace-scoped wiring for the full composer (skills, agents, models). */ composer?: NewTaskComposerContext | null; }; @@ -57,14 +75,25 @@ export function SessionEmptyHero(props: SessionEmptyHeroProps) { const orgRestrictions = useOrgRestrictions(); const organizationPrompts = orgRestrictions.onboardingPrompts; + const readinessByKey = useOrganizationPromptSkillReadiness(organizationPrompts); const suggestions: HeroSuggestion[] = organizationPrompts !== undefined ? organizationPrompts.map((orgPrompt, index) => { + const skill = orgPrompt.skill; const card = resolveOrganizationPromptCardContent({ prompt: orgPrompt, description: orgRestrictions.onboardingPromptDescriptions?.[index], index, + readiness: skill ? readinessByKey[organizationPromptSkillKey(skill)] : undefined, }); - return { title: card.title, description: card.description, prompt: card.selectionPrompt }; + return { + action: card.action, + description: card.description, + disabled: card.action === "blocked", + prompt: card.selectionPrompt, + readinessLabel: card.readinessLabel, + skillLabel: card.skillLabel, + title: card.title, + }; }) : DEFAULT_SUGGESTIONS; @@ -79,6 +108,14 @@ export function SessionEmptyHero(props: SessionEmptyHeroProps) { window.dispatchEvent(new Event("openwork:focusPrompt")); }; + const handleSuggestionClick = (suggestion: HeroSuggestion) => { + if (suggestion.action === "open_connect") { + props.onOpenConnect?.(); + return; + } + if (suggestion.action === "fill") fillPrompt(suggestion.prompt); + }; + return (
@@ -118,9 +155,16 @@ export function SessionEmptyHero(props: SessionEmptyHeroProps) { key={suggestion.title} type="button" className="rounded-xl border border-border bg-background p-3.5 text-left transition-colors hover:bg-accent" - onClick={() => fillPrompt(suggestion.prompt)} + disabled={suggestion.disabled} + onClick={() => handleSuggestionClick(suggestion)} >
{suggestion.title}
+ {suggestion.skillLabel || suggestion.readinessLabel ? ( +
+ {suggestion.skillLabel ? {suggestion.skillLabel} : null} + {suggestion.readinessLabel ? {suggestion.readinessLabel} : null} +
+ ) : null}
{suggestion.description}
diff --git a/apps/app/src/react-app/domains/session/chat/session-page.tsx b/apps/app/src/react-app/domains/session/chat/session-page.tsx index c52dfe3ca3..1062d359b9 100644 --- a/apps/app/src/react-app/domains/session/chat/session-page.tsx +++ b/apps/app/src/react-app/domains/session/chat/session-page.tsx @@ -203,6 +203,7 @@ export type SessionPageProps = { statusBar?: Partial; notFoundMessage?: string | null; onOpenProviderAuth?: () => void; + onOpenConnect?: () => void; /** Chat-first: create a default workspace and start a task from the empty-state composer. */ onChatFirstTask?: (prompt: string) => void; chatFirstBusy?: boolean; @@ -1316,6 +1317,7 @@ export function SessionPage(props: SessionPageProps) { busy={props.chatFirstBusy} onRunTask={(prompt) => props.onChatFirstTask?.(prompt)} onOpenProviderAuth={props.onOpenProviderAuth} + onOpenConnect={props.onOpenConnect} composer={props.newTaskComposer} /> ) : showSelectedWorkspaceError ? ( @@ -1371,6 +1373,7 @@ export function SessionPage(props: SessionPageProps) { props.sidebar.onCreateTaskWithPrompt?.(props.selectedWorkspaceId, prompt) } onOpenProviderAuth={props.onOpenProviderAuth} + onOpenConnect={props.onOpenConnect} composer={props.newTaskComposer} />
diff --git a/apps/app/src/react-app/domains/session/surface/connect-capability-inventory.ts b/apps/app/src/react-app/domains/session/surface/connect-capability-inventory.ts index 6798a8dd6e..afee5e3b65 100644 --- a/apps/app/src/react-app/domains/session/surface/connect-capability-inventory.ts +++ b/apps/app/src/react-app/domains/session/surface/connect-capability-inventory.ts @@ -26,8 +26,12 @@ export type ConnectCapabilityInventory = { mcpStatuses: McpStatusMap; }; +export type ConnectCapabilityReadiness = "ready" | "needs_signin" | "needs_admin_setup"; + export type ConnectSkillCard = SkillCard & { content?: string; + connectReadiness: ConnectCapabilityReadiness; + connectableConnectionId?: string; }; export const EMPTY_CONNECT_CAPABILITY_INVENTORY: ConnectCapabilityInventory = { @@ -85,7 +89,7 @@ function matchingConnection( ) ?? (spec.url ? connections.find((connection) => connection.url === spec.url) : undefined); } -function remoteMcpStatus( +export function remoteMcpStatus( plugin: DenOrgPlugin, connection: DenPluginCloudReadinessConnection | undefined, ): McpStatus { @@ -105,11 +109,42 @@ function remoteMcpStatus( }; } +function remoteMcpReadiness(status: McpStatus): ConnectCapabilityReadiness { + switch (status.status) { + case "connected": + case "disabled": + return "ready"; + case "needs_auth": + return "needs_signin"; + case "failed": + case "needs_client_registration": + return "needs_admin_setup"; + } +} + +function connectableConnectionId(plugin: DenOrgPlugin) { + return plugin.cloudReadiness?.connections.find((connection) => + connection.id && connection.credentialMode === "per_member" && connection.connectedForMe === false + )?.id ?? undefined; +} + +function remoteSkillReadiness( + plugin: DenOrgPlugin, + object: DenPluginConfigObject, +): ConnectCapabilityReadiness { + if (!plugin.cloudReadiness) return "ready"; + const connection = plugin.cloudReadiness.connections.find((entry) => + entry.configObjectId === object.id + ); + return remoteMcpReadiness(remoteMcpStatus(plugin, connection)); +} + function toSkill( marketplace: DenOrgMarketplace, plugin: DenOrgPlugin, object: DenPluginConfigObject, ): ConnectSkillCard { + const connectionId = connectableConnectionId(plugin); return { name: object.title, path: `openwork-connect://${marketplace.id}/${plugin.id}/${object.id}`, @@ -120,6 +155,8 @@ function toSkill( marketplaceName: marketplace.name, pluginName: plugin.name, connectCapabilityName: marketplaceCapabilityName(plugin.id, object.id), + connectReadiness: remoteSkillReadiness(plugin, object), + ...(connectionId ? { connectableConnectionId: connectionId } : {}), }; } @@ -175,7 +212,7 @@ export async function listAssignedConnectCapabilities(input: { })), ); - const skills: SkillCard[] = []; + const skills: ConnectSkillCard[] = []; const mcpServers: McpServerEntry[] = []; const mcpStatuses: McpStatusMap = {}; for (const { marketplace, resolved } of resolvedPlugins) { diff --git a/apps/app/src/react-app/domains/session/surface/session-surface.tsx b/apps/app/src/react-app/domains/session/surface/session-surface.tsx index c70649e611..d9bda59e1a 100644 --- a/apps/app/src/react-app/domains/session/surface/session-surface.tsx +++ b/apps/app/src/react-app/domains/session/surface/session-surface.tsx @@ -289,7 +289,7 @@ export type SessionSurfaceProps = { onChangeModel?: (model: { providerID: string; modelID: string }) => void; onUploadInboxFiles?: ((files: File[], options?: { notify?: boolean }) => void | Promise) | null; providerConnectedCount?: number; - onOpenSettingsSection?: ((section: "commands" | "skills" | "mcps" | "plugins" | "providers") => void) | undefined; + onOpenSettingsSection?: ((section: "commands" | "skills" | "mcps" | "plugins" | "providers" | "connect") => void) | undefined; onRevertToMessage?: (messageId: string, sessionId: string) => Promise; onForkAtMessage?: (messageId: string | null, sessionId: string) => void; onOpenTarget?: (target: OpenTarget, options?: OpenTargetOptions, sessionId?: string) => void; diff --git a/apps/app/src/react-app/shell/session-route.tsx b/apps/app/src/react-app/shell/session-route.tsx index d37159311f..65e0ba8bd9 100644 --- a/apps/app/src/react-app/shell/session-route.tsx +++ b/apps/app/src/react-app/shell/session-route.tsx @@ -1018,8 +1018,8 @@ export function SessionRoute() { modelPicker.setCompactOpen(false); }, providerConnectedCount: hasUsableModel ? 1 : providerConnectedIds.length, - onOpenSettingsSection: (section: "commands" | "skills" | "mcps" | "plugins" | "providers") => { - handleOpenSettings(section === "skills" ? "/settings/extensions/skills" : section === "mcps" ? "/settings/extensions/mcp" : section === "plugins" ? "/settings/extensions/plugins" : section === "providers" ? "/settings/ai" : "/settings/general"); + onOpenSettingsSection: (section: "commands" | "skills" | "mcps" | "plugins" | "providers" | "connect") => { + handleOpenSettings(section === "skills" ? "/settings/extensions/skills" : section === "mcps" ? "/settings/extensions/mcp" : section === "plugins" ? "/settings/extensions/plugins" : section === "providers" ? "/settings/ai" : section === "connect" ? "/settings/connect" : "/settings/general"); }, onSendDraft: async (draft: ComposerDraft, sessionId: string): Promise => { const targetSessionId = sessionId.trim() || selectedSessionId; @@ -2197,6 +2197,7 @@ export function SessionRoute() { }} onOpenSettings={() => handleOpenSettings("/settings/general")} onOpenProviderAuth={() => sessionProviderAuthStore.openProviderAuthModal({ returnFocusTarget: "composer" })} + onOpenConnect={() => navigate("/settings/connect")} onChatFirstTask={handleChatFirstTask} chatFirstBusy={createWorkspaceBusy} newTaskComposer={newTaskComposerContext} diff --git a/apps/app/tests/den-desktop-config.test.ts b/apps/app/tests/den-desktop-config.test.ts index c52f4c4ff5..bb37e77813 100644 --- a/apps/app/tests/den-desktop-config.test.ts +++ b/apps/app/tests/den-desktop-config.test.ts @@ -10,6 +10,19 @@ import { createDenClient, normalizeDenDesktopConfig } from "../src/app/lib/den"; const originalFetch = globalThis.fetch; +function promptObjects(prompts: string[]) { + return prompts.map((prompt) => ({ prompt })); +} + +function oldShapeOnboardingPrompts(payload: unknown): string[] | undefined { + if (!payload || typeof payload !== "object" || !("onboardingPrompts" in payload)) { + return undefined; + } + const prompts = payload.onboardingPrompts; + if (!Array.isArray(prompts)) return undefined; + return prompts.every((prompt) => typeof prompt === "string") ? prompts : undefined; +} + describe("Den desktop config client", () => { afterEach(() => { Object.defineProperty(globalThis, "fetch", { @@ -65,7 +78,7 @@ describe("Den desktop config client", () => { expect(normalizeDenDesktopConfig({ onboardingPrompts: [" First task ", "Second task", "Third task"], onboardingPromptDescriptions: [" First card ", "Second card", ""], - }).onboardingPrompts).toEqual(["First task", "Second task", "Third task"]); + }).onboardingPrompts).toEqual(promptObjects(["First task", "Second task", "Third task"])); expect(normalizeDenDesktopConfig({ onboardingPrompts: [" First task ", "Second task", "Third task"], onboardingPromptDescriptions: [" First card ", "Second card", ""], @@ -78,6 +91,51 @@ describe("Den desktop config client", () => { onboardingPrompts: ["First task", "Second task", "Third task"], onboardingPromptDescriptions: ["Mismatched", "Descriptions"], }).onboardingPromptDescriptions).toBeUndefined(); + + expect(normalizeDenDesktopConfig({ + onboardingPrompts: [ + { + prompt: "Find what needs attention.", + skill: { + source: "connect", + slug: "attention-review", + name: "Attention Review", + marketplaceId: "marketplace_attention", + marketplaceName: "Workflow Library", + pluginId: "plugin_attention", + pluginName: "Attention Workflows", + configObjectId: "skill_attention_review", + capabilityName: "plugin:plugin_attention:skill_attention_review", + }, + }, + { prompt: "Summarize today's notes." }, + ], + }).onboardingPrompts).toEqual([ + { + prompt: "Find what needs attention.", + skill: { + source: "connect", + slug: "attention-review", + name: "Attention Review", + marketplaceId: "marketplace_attention", + marketplaceName: "Workflow Library", + pluginId: "plugin_attention", + pluginName: "Attention Workflows", + configObjectId: "skill_attention_review", + capabilityName: "plugin:plugin_attention:skill_attention_review", + }, + }, + { prompt: "Summarize today's notes." }, + ]); + }); + + test("old-shape onboarding prompt readers degrade safely on bound prompt payloads", () => { + expect(oldShapeOnboardingPrompts({ + onboardingPrompts: [ + { prompt: "Find what needs attention." }, + { prompt: "Summarize today's notes." }, + ], + })).toBeUndefined(); }); test("normalizes the alpha update desktop policy", () => { @@ -164,7 +222,7 @@ describe("Den desktop config client", () => { }, }], })).toEqual({ - onboardingPrompts: ["Targeted task", "Targeted follow-up"], + onboardingPrompts: promptObjects(["Targeted task", "Targeted follow-up"]), onboardingPromptDescriptions: ["Targeted card", "Targeted follow-up card"], }); }); @@ -182,7 +240,7 @@ describe("Den desktop config client", () => { preserveExistingOnboardingPrompts: true, })).toEqual({ allowZenModel: false, - onboardingPrompts: ["Existing prompt", "Existing follow-up"], + onboardingPrompts: promptObjects(["Existing prompt", "Existing follow-up"]), onboardingPromptDescriptions: ["Existing card", "Existing follow-up card"], }); @@ -196,7 +254,7 @@ describe("Den desktop config client", () => { value: { onboardingPrompts: [" Replacement ", "Replacement follow-up"] }, existingPolicy, preserveExistingOnboardingPrompts: true, - })).toEqual({ onboardingPrompts: ["Replacement", "Replacement follow-up"] }); + })).toEqual({ onboardingPrompts: promptObjects(["Replacement", "Replacement follow-up"]) }); expect(resolveDesktopPolicyDocumentWrite({ value: { @@ -206,7 +264,7 @@ describe("Den desktop config client", () => { existingPolicy, preserveExistingOnboardingPrompts: true, })).toEqual({ - onboardingPrompts: ["Replacement", "Replacement follow-up"], + onboardingPrompts: promptObjects(["Replacement", "Replacement follow-up"]), onboardingPromptDescriptions: ["Replacement card", ""], }); diff --git a/apps/app/tests/task-suggestions.test.ts b/apps/app/tests/task-suggestions.test.ts index 046b95ad08..01a812f3d6 100644 --- a/apps/app/tests/task-suggestions.test.ts +++ b/apps/app/tests/task-suggestions.test.ts @@ -1,26 +1,82 @@ import { describe, expect, test } from "bun:test"; import { resolveOrganizationPromptCardContent } from "../src/components/chat/task-suggestions"; +import type { OnboardingPromptConnectSkillReference } from "@openwork/types/den/desktop-policies"; + +const connectSkill: OnboardingPromptConnectSkillReference = { + source: "connect", + slug: "attention-review", + name: "Attention Review", + marketplaceId: "marketplace_attention", + marketplaceName: "Workflow Library", + pluginId: "plugin_attention", + pluginName: "Attention Workflows", + configObjectId: "skill_attention_review", + capabilityName: "plugin:plugin_attention:skill_attention_review", +}; describe("organization task suggestions", () => { test("uses the saved description as the card title and selects the full prompt", () => { - const prompt = "Analyze the latest churn feedback and summarize the top three risks."; + const prompt = "Analyze the latest project notes and summarize the top three risks."; expect(resolveOrganizationPromptCardContent({ prompt, - description: "Review churn feedback", + description: "Review project notes", index: 0, })).toEqual({ - title: "Review churn feedback", + title: "Review project notes", description: prompt, selectionPrompt: prompt, + skill: undefined, + skillLabel: undefined, + readiness: "ready", + readinessLabel: undefined, + action: "fill", }); }); test("keeps a prompt-only fallback title for older policy data", () => { expect(resolveOrganizationPromptCardContent({ - prompt: "Draft a customer update.", + prompt: "Draft a status update.", index: 1, }).title).toBe("Organization prompt 2"); }); + + test("adds the bound skill token when a skill-backed card fills the composer", () => { + const prompt = "Find what needs attention today."; + + expect(resolveOrganizationPromptCardContent({ + prompt: { prompt, skill: connectSkill }, + description: "Find attention items", + index: 0, + readiness: "ready", + })).toMatchObject({ + action: "fill", + readinessLabel: "Ready to use", + selectionPrompt: `[connect-skill attention-review|Attention Review|Workflow Library|plugin:plugin_attention:skill_attention_review] ${prompt}`, + skillLabel: "/attention-review", + }); + }); + + test("maps readiness states to the card affordance", () => { + const prompt = { prompt: "Find what needs attention today.", skill: connectSkill }; + + expect(resolveOrganizationPromptCardContent({ prompt, index: 0, readiness: "ready" }).action).toBe("fill"); + expect(resolveOrganizationPromptCardContent({ prompt, index: 0, readiness: "needs_signin" })).toMatchObject({ + action: "open_connect", + readinessLabel: "Needs your sign-in", + }); + expect(resolveOrganizationPromptCardContent({ prompt, index: 0, readiness: "needs_admin_setup" })).toMatchObject({ + action: "blocked", + readinessLabel: "Needs admin setup", + }); + }); + + test("leaves unbound cards as composer-fill only", () => { + const prompt = "Summarize today's notes."; + expect(resolveOrganizationPromptCardContent({ prompt, index: 0 })).toMatchObject({ + action: "fill", + selectionPrompt: prompt, + }); + }); }); diff --git a/ee/apps/den-api/test/desktop-policy-json-column-strings.test.ts b/ee/apps/den-api/test/desktop-policy-json-column-strings.test.ts index 91d43fecf0..51ff162c1c 100644 --- a/ee/apps/den-api/test/desktop-policy-json-column-strings.test.ts +++ b/ee/apps/den-api/test/desktop-policy-json-column-strings.test.ts @@ -7,6 +7,10 @@ import { resolveDesktopPolicyDocumentWrite, } from "@openwork/types/den/desktop-policies" +function promptObjects(prompts: string[]) { + return prompts.map((prompt) => ({ prompt })) +} + describe("desktop policy JSON column strings", () => { test("normalizes policy value JSON strings", () => { expect(normalizeDesktopPolicyValue(JSON.stringify({ allowCustomProviders: false }))).toEqual({ @@ -22,7 +26,10 @@ describe("desktop policy JSON column strings", () => { onboardingPromptDescriptions: ["Policy review", "Tool connection"], } - expect(normalizeDesktopPolicyDocument(JSON.stringify(document))).toEqual(document) + expect(normalizeDesktopPolicyDocument(JSON.stringify(document))).toEqual({ + ...document, + onboardingPrompts: promptObjects(document.onboardingPrompts), + }) }) test("preserves onboarding prompts from string existing policies", () => { @@ -40,11 +47,35 @@ describe("desktop policy JSON column strings", () => { })).toEqual({ ...desktopPolicyDefaults, allowCustomProviders: false, - onboardingPrompts: existingPolicy.onboardingPrompts, + onboardingPrompts: promptObjects(existingPolicy.onboardingPrompts), onboardingPromptDescriptions: existingPolicy.onboardingPromptDescriptions, }) }) + test("normalizes bound onboarding prompt documents from JSON strings", () => { + const document = { + onboardingPrompts: [ + { + prompt: "Find what needs attention.", + skill: { + source: "connect", + slug: "attention-review", + name: "Attention Review", + marketplaceId: "marketplace_attention", + marketplaceName: "Workflow Library", + pluginId: "plugin_attention", + pluginName: "Attention Workflows", + configObjectId: "skill_attention_review", + capabilityName: "plugin:plugin_attention:skill_attention_review", + }, + }, + { prompt: "Summarize today's notes." }, + ], + } + + expect(normalizeDesktopPolicyDocument(JSON.stringify(document)).onboardingPrompts).toEqual(document.onboardingPrompts) + }) + test("calculates effective policy the same for object and string policy documents", () => { const defaultPolicy = { allowCustomProviders: false, diff --git a/ee/apps/den-api/test/me-desktop-config.test.ts b/ee/apps/den-api/test/me-desktop-config.test.ts index 6508af1ad9..f4c52d316f 100644 --- a/ee/apps/den-api/test/me-desktop-config.test.ts +++ b/ee/apps/den-api/test/me-desktop-config.test.ts @@ -41,9 +41,9 @@ const highPriorityMemberAssignmentId = createDenTypeId("desktopPolicyMember") const highPriorityTeamAssignmentId = createDenTypeId("desktopPolicyMember") const flatConnectMetadata = { connectEnabled: true, - brandAppName: "Acme Work", - brandLogoUrl: "https://den.example-corp.internal/assets/wordmark.svg", - brandIconUrl: "https://den.example-corp.internal/assets/icon.png", + brandAppName: "Team Work", + brandLogoUrl: "https://desktop-config.test/assets/wordmark.svg", + brandIconUrl: "https://desktop-config.test/assets/icon.png", } const capabilityMetadata = { capabilities: { mcpConnections: true } } const disabledMetadata = { capabilities: { mcpConnections: false } } @@ -53,6 +53,10 @@ const defaultOnboardingPromptDescriptions = ["Default onboarding", "Default foll const highPriorityOnboardingPromptDescriptions = ["High priority onboarding", "High priority follow-up", "High priority optional"] let crudDesktopPolicyId: string | null = null +function promptObjects(prompts: string[]) { + return prompts.map((prompt) => ({ prompt })) +} + beforeAll(async () => { seedRequiredEnv() const [appMod, dbMod, schemaMod, drizzleMod, sessionMod, envMod, rolloutMod] = await Promise.all([ @@ -323,7 +327,7 @@ test("GET /v1/me/desktop-config exposes the effective connectEnabled org flag", test("GET /v1/me/desktop-config returns the effective onboarding prompts", async () => { const body = await requestDesktopConfig(onboardingOrganizationId) - expect(body.onboardingPrompts).toEqual(highPriorityOnboardingPrompts) + expect(body.onboardingPrompts).toEqual(promptObjects(highPriorityOnboardingPrompts)) expect(body.onboardingPromptDescriptions).toEqual(highPriorityOnboardingPromptDescriptions) }) @@ -350,7 +354,7 @@ test("desktop policy CRUD preserves, replaces, and clears onboarding prompts and crudDesktopPolicyId = expectString(created.id, "Created desktop policy was missing id") expect(created.priority).toBe(3) expect(expectRecord(created.policy, "Created desktop policy was missing policy").allowAlphaUpdates).toBe(false) - expect(expectRecord(created.policy, "Created desktop policy was missing policy").onboardingPrompts).toEqual(["CRUD prompt one", "CRUD prompt two"]) + expect(expectRecord(created.policy, "Created desktop policy was missing policy").onboardingPrompts).toEqual(promptObjects(["CRUD prompt one", "CRUD prompt two"])) expect(expectRecord(created.policy, "Created desktop policy was missing policy").onboardingPromptDescriptions).toEqual(["CRUD card one", "CRUD card two"]) const listPayload = await requestDesktopPolicyAdmin({ @@ -363,7 +367,7 @@ test("desktop policy CRUD preserves, replaces, and clears onboarding prompts and expect(definitions.some((definition) => isRecord(definition) && definition.id === "allowAlphaUpdates")).toBe(true) const listed = findListedDesktopPolicy(listPayload, crudDesktopPolicyId) expect(listed.priority).toBe(3) - expect(expectRecord(listed.policy, "Listed desktop policy was missing policy").onboardingPrompts).toEqual(["CRUD prompt one", "CRUD prompt two"]) + expect(expectRecord(listed.policy, "Listed desktop policy was missing policy").onboardingPrompts).toEqual(promptObjects(["CRUD prompt one", "CRUD prompt two"])) expect(expectRecord(listed.policy, "Listed desktop policy was missing policy").onboardingPromptDescriptions).toEqual(["CRUD card one", "CRUD card two"]) const preservedPayload = await requestDesktopPolicyAdmin({ @@ -381,7 +385,7 @@ test("desktop policy CRUD preserves, replaces, and clears onboarding prompts and if (!preservedPayload) throw new Error("Preserve response was empty") const preserved = expectDesktopPolicy(preservedPayload) expect(preserved.priority).toBe(4) - expect(expectRecord(preserved.policy, "Preserved desktop policy was missing policy").onboardingPrompts).toEqual(["CRUD prompt one", "CRUD prompt two"]) + expect(expectRecord(preserved.policy, "Preserved desktop policy was missing policy").onboardingPrompts).toEqual(promptObjects(["CRUD prompt one", "CRUD prompt two"])) expect(expectRecord(preserved.policy, "Preserved desktop policy was missing policy").onboardingPromptDescriptions).toEqual(["CRUD card one", "CRUD card two"]) const replacedPayload = await requestDesktopPolicyAdmin({ @@ -403,16 +407,55 @@ test("desktop policy CRUD preserves, replaces, and clears onboarding prompts and if (!replacedPayload) throw new Error("Replace response was empty") const replaced = expectDesktopPolicy(replacedPayload) expect(replaced.priority).toBe(5) - expect(expectRecord(replaced.policy, "Replaced desktop policy was missing policy").onboardingPrompts).toEqual(["Replacement prompt one", "Replacement prompt two"]) + expect(expectRecord(replaced.policy, "Replaced desktop policy was missing policy").onboardingPrompts).toEqual(promptObjects(["Replacement prompt one", "Replacement prompt two"])) expect(expectRecord(replaced.policy, "Replaced desktop policy was missing policy").onboardingPromptDescriptions).toEqual(["Replacement card one", "Replacement card two"]) + const boundPrompts = [ + { + prompt: "Find what needs attention.", + skill: { + source: "connect", + slug: "attention-review", + name: "Attention Review", + marketplaceId: "marketplace_attention", + marketplaceName: "Workflow Library", + pluginId: "plugin_attention", + pluginName: "Attention Workflows", + configObjectId: "skill_attention_review", + capabilityName: "plugin:plugin_attention:skill_attention_review", + }, + }, + { prompt: "Summarize today's notes." }, + ] + const boundPayload = await requestDesktopPolicyAdmin({ + method: "PATCH", + path: `/v1/desktop-policies/${encodeURIComponent(crudDesktopPolicyId)}`, + expectedStatus: 200, + body: { + policyName: "CRUD onboarding policy bound", + priority: 6, + policy: { + allowZenModel: false, + onboardingPrompts: boundPrompts, + onboardingPromptDescriptions: ["Attention", "Notes"], + }, + memberIds: [], + teamIds: [], + }, + }) + if (!boundPayload) throw new Error("Bound response was empty") + const bound = expectDesktopPolicy(boundPayload) + expect(bound.priority).toBe(6) + expect(expectRecord(bound.policy, "Bound desktop policy was missing policy").onboardingPrompts).toEqual(boundPrompts) + expect(expectRecord(bound.policy, "Bound desktop policy was missing policy").onboardingPromptDescriptions).toEqual(["Attention", "Notes"]) + const clearedPayload = await requestDesktopPolicyAdmin({ method: "PATCH", path: `/v1/desktop-policies/${encodeURIComponent(crudDesktopPolicyId)}`, expectedStatus: 200, body: { policyName: "CRUD onboarding policy cleared", - priority: 6, + priority: 7, policy: { allowZenModel: false, onboardingPrompts: null }, memberIds: [], teamIds: [], @@ -420,7 +463,7 @@ test("desktop policy CRUD preserves, replaces, and clears onboarding prompts and }) if (!clearedPayload) throw new Error("Clear response was empty") const cleared = expectDesktopPolicy(clearedPayload) - expect(cleared.priority).toBe(6) + expect(cleared.priority).toBe(7) expect(expectRecord(cleared.policy, "Cleared desktop policy was missing policy").onboardingPrompts).toBeUndefined() expect(expectRecord(cleared.policy, "Cleared desktop policy was missing policy").onboardingPromptDescriptions).toBeUndefined() diff --git a/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-editor-screen.tsx b/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-editor-screen.tsx index febab3751a..048080a931 100644 --- a/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-editor-screen.tsx +++ b/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-editor-screen.tsx @@ -7,12 +7,16 @@ import { ArrowLeft, Laptop } from "lucide-react"; import { desktopPolicyDefaults, desktopPolicyKeys, + type OnboardingPrompt, + type OnboardingPromptConnectSkillReference, + type OnboardingPromptSkillReference, type DesktopPolicyDocumentWrite, type DesktopPolicyValue, } from "@openwork/types/den/desktop-policies"; import { DashboardPageTemplate } from "../../_components/ui/dashboard-page-template"; import { DenButton } from "../../_components/ui/button"; import { DenInput } from "../../_components/ui/input"; +import { DenSelect } from "../../_components/ui/select"; import { DenTextarea } from "../../_components/ui/textarea"; import { getDesktopPoliciesRoute, getMembersRoute, getOrgAccessFlags } from "../../_lib/den-org"; import { useOrgDashboard } from "../_providers/org-dashboard-provider"; @@ -23,7 +27,9 @@ import { type DenDesktopPolicy, type DesktopPolicyPayload, } from "./desktop-policy-data"; +import { resolveOrganizationPromptPreviewCardContent } from "./desktop-policy-onboarding-preview"; import { EnterprisePlanNotice } from "./enterprise-plan-notice"; +import { usePlugins, type DenPlugin, type PluginMarketplaceRef, type PluginSkill } from "./plugin-data"; type PolicyDraft = { policyName: string; @@ -32,6 +38,7 @@ type PolicyDraft = { onboardingPromptsEnabled: boolean; onboardingPromptTexts: string[]; onboardingPromptDescriptions: string[]; + onboardingPromptSkills: Array; memberIds: string[]; teamIds: string[]; }; @@ -43,6 +50,7 @@ const EMPTY_DRAFT: PolicyDraft = { onboardingPromptsEnabled: false, onboardingPromptTexts: ["", "", ""], onboardingPromptDescriptions: ["", "", ""], + onboardingPromptSkills: [null, null, null], memberIds: [], teamIds: [], }; @@ -53,6 +61,73 @@ const MAX_POLICY_PRIORITY = 1_000_000; const PRIORITY_HELP_ID = "desktop-policy-priority-help"; const PRIORITY_ERROR_ID = "desktop-policy-priority-error"; +type OrganizationSkillOption = { + value: string; + label: string; + description: string; + binding: OnboardingPromptConnectSkillReference; +}; + +function skillTriggerSlug(value: string) { + return value + .trim() + .toLowerCase() + .replace(/[^a-z0-9_-]+/g, "-") + .replace(/^-+|-+$/g, "") || "skill"; +} + +function connectCapabilityName(pluginId: string, configObjectId: string) { + return `plugin:${pluginId}:${configObjectId}`; +} + +function organizationSkillOptionValue(input: { marketplaceId: string; pluginId: string; configObjectId: string }) { + return `${input.marketplaceId}:${input.pluginId}:${input.configObjectId}`; +} + +function createOrganizationSkillOption(input: { + marketplace: PluginMarketplaceRef; + plugin: DenPlugin; + skill: PluginSkill; +}): OrganizationSkillOption { + const binding: OnboardingPromptConnectSkillReference = { + source: "connect", + slug: skillTriggerSlug(input.skill.name), + name: input.skill.name, + marketplaceId: input.marketplace.id, + marketplaceName: input.marketplace.name, + pluginId: input.plugin.id, + pluginName: input.plugin.name, + configObjectId: input.skill.id, + capabilityName: connectCapabilityName(input.plugin.id, input.skill.id), + }; + return { + value: organizationSkillOptionValue(binding), + label: `${input.skill.name} · ${input.marketplace.name}`, + description: input.skill.description, + binding, + }; +} + +function getOrganizationSkillOptions(plugins: DenPlugin[]) { + return plugins + .flatMap((plugin) => (plugin.marketplaces ?? []).flatMap((marketplace) => + plugin.skills.map((skill) => createOrganizationSkillOption({ marketplace, plugin, skill })) + )) + .sort((left, right) => left.label.localeCompare(right.label)); +} + +function promptSkillSelectValue(skill: OnboardingPromptSkillReference | null) { + if (!skill) return ""; + if (skill.source === "local") return `local:${skill.slug}`; + return organizationSkillOptionValue(skill); +} + +function promptSkillDisplayName(skill: OnboardingPromptSkillReference) { + return skill.source === "local" + ? `Local skill /${skill.slug}` + : `${skill.name} · ${skill.marketplaceName}`; +} + function requiredPolicyValue(value: DesktopPolicyValue): Required { return Object.fromEntries( desktopPolicyKeys.map((key) => [key, value[key] === true]), @@ -68,15 +143,20 @@ function draftFromPolicy(policy: DenDesktopPolicy): PolicyDraft { priority: policy.priority, onboardingPromptsEnabled: onboardingPrompts.length > 0, onboardingPromptTexts: [ - onboardingPrompts[0] ?? "", - onboardingPrompts[1] ?? "", - onboardingPrompts[2] ?? "", + onboardingPrompts[0]?.prompt ?? "", + onboardingPrompts[1]?.prompt ?? "", + onboardingPrompts[2]?.prompt ?? "", ], onboardingPromptDescriptions: [ onboardingPromptDescriptions[0] ?? "", onboardingPromptDescriptions[1] ?? "", onboardingPromptDescriptions[2] ?? "", ], + onboardingPromptSkills: [ + onboardingPrompts[0]?.skill ?? null, + onboardingPrompts[1]?.skill ?? null, + onboardingPrompts[2]?.skill ?? null, + ], memberIds: policy.assignments.flatMap((assignment) => (assignment.orgMemberId ? [assignment.orgMemberId] : [])), teamIds: policy.assignments.flatMap((assignment) => (assignment.teamId ? [assignment.teamId] : [])), }; @@ -101,7 +181,15 @@ function updateOnboardingPromptDescription(values: string[], index: number, next return values.map((value, valueIndex) => (valueIndex === index ? nextValue : value)); } -function getOnboardingPrompts(draft: PolicyDraft): string[] | undefined { +function updateOnboardingPromptSkill( + values: Array, + index: number, + nextValue: OnboardingPromptSkillReference | null, +) { + return values.map((value, valueIndex) => (valueIndex === index ? nextValue : value)); +} + +function getOnboardingPrompts(draft: PolicyDraft): OnboardingPrompt[] | undefined { if (!draft.onboardingPromptsEnabled) return undefined; const prompts = draft.onboardingPromptTexts.map((prompt) => prompt.trim()); @@ -109,7 +197,14 @@ function getOnboardingPrompts(draft: PolicyDraft): string[] | undefined { if (requiredPrompts.some((prompt) => prompt.length === 0)) return undefined; if (prompts.some((prompt) => prompt.length > 500)) return undefined; - return prompts[2] ? [...requiredPrompts, prompts[2]] : requiredPrompts; + const promptCount = prompts[2] ? 3 : 2; + return prompts.slice(0, promptCount).map((prompt, index) => { + const skill = draft.onboardingPromptSkills[index] ?? null; + return { + prompt, + ...(skill ? { skill } : {}), + }; + }); } function getOnboardingPromptDescriptions(draft: PolicyDraft, promptCount: number): string[] | undefined { @@ -164,6 +259,76 @@ function getPromptDescriptionErrorId(index: number) { return `desktop-policy-onboarding-prompt-${index}-description-error`; } +function getOnboardingPromptPreviewCards(draft: PolicyDraft) { + const prompts = draft.onboardingPromptTexts.map((prompt) => prompt.trim()); + const descriptions = draft.onboardingPromptDescriptions.map((description) => description.trim()); + + return ONBOARDING_PROMPT_LABELS.flatMap((_, index) => { + const prompt = prompts[index] ?? ""; + if (index === 2 && prompt.length === 0) return []; + const skill = draft.onboardingPromptSkills[index] ?? null; + + return [resolveOrganizationPromptPreviewCardContent({ + prompt: { + prompt, + ...(skill ? { skill } : {}), + }, + description: descriptions[index], + index, + })]; + }); +} + +function DesktopPromptSparklesIcon() { + return ( + + ); +} + +function OnboardingPromptPreviewCard({ card }: { card: ReturnType }) { + return ( + + ); +} + +function OnboardingPromptPreview({ cards }: { cards: ReturnType }) { + return ( +
+

Preview

+
+

Try one of your organization's prompts:

+
+ {cards.map((card, index) => ( + + ))} +
+

Clicking a card fills the composer draft; it does not send the prompt.

+
+
+ ); +} + function getDisabledPromptCopy(isDefault: boolean) { return isDefault ? "When organization prompts are off, OpenWork defaults are used." @@ -194,6 +359,7 @@ export function DesktopPolicyEditorScreen({ desktopPolicyId }: { desktopPolicyId const router = useRouter(); const { orgId, orgSlug, orgContext, runReauthableAction } = useOrgDashboard(); const { definitions, desktopPolicies, busy, error, reloadPolicies } = useOrgDesktopPolicies(orgId); + const { data: plugins = [], isLoading: pluginsLoading, error: pluginsError } = usePlugins(); const policy = useMemo(() => { if (!desktopPolicyId) return null; @@ -231,6 +397,8 @@ export function DesktopPolicyEditorScreen({ desktopPolicyId }: { desktopPolicyId const priorityError = getPriorityError(draft, isDefault); const disabledPromptCopy = getDisabledPromptCopy(isDefault); const formDisabled = saving || togglingEnabled || !canManage; + const onboardingPromptPreviewCards = getOnboardingPromptPreviewCards(draft); + const organizationSkillOptions = useMemo(() => getOrganizationSkillOptions(plugins), [plugins]); const handleSave = async () => { if (!canManage) { @@ -315,6 +483,20 @@ export function DesktopPolicyEditorScreen({ desktopPolicyId }: { desktopPolicyId } }; + const handlePromptSkillChange = (index: number, value: string) => { + const option = organizationSkillOptions.find((entry) => entry.value === value); + if (!value || option) { + setDraft({ + ...draft, + onboardingPromptSkills: updateOnboardingPromptSkill( + draft.onboardingPromptSkills, + index, + option?.binding ?? null, + ), + }); + } + }; + return ( {error}
) : null} + {pluginsError ? ( +
+ Marketplace skills could not be loaded. Existing prompt bindings are preserved, but new skill attachments are unavailable. +
+ ) : null} {initialLoad ? (
Loading desktop policy...
@@ -393,7 +580,9 @@ export function DesktopPolicyEditorScreen({ desktopPolicyId }: { desktopPolicyId }} disabled={formDisabled} /> - Higher wins when multiple targeted policies match. + + Organization prompts are winner-takes-all: highest priority supplies all prompt cards; ties use oldest policy, then ID. Checkbox policies still combine. + {priorityError ? ( {priorityError} ) : null} @@ -456,63 +645,93 @@ export function DesktopPolicyEditorScreen({ desktopPolicyId }: { desktopPolicyId {draft.onboardingPromptsEnabled ? ( -
- {ONBOARDING_PROMPT_LABELS.map((label, index) => { - const promptError = getPromptError(draft, index); - const promptDescriptionError = getPromptDescriptionError(draft, index); - const promptHelpId = getPromptHelpId(index); - const promptErrorId = getPromptErrorId(index); - const promptDescriptionHelpId = getPromptDescriptionHelpId(index); - const promptDescriptionErrorId = getPromptDescriptionErrorId(index); - return ( -
-

{label}

- - -
- ); - })} +
+
+ {ONBOARDING_PROMPT_LABELS.map((label, index) => { + const promptError = getPromptError(draft, index); + const promptDescriptionError = getPromptDescriptionError(draft, index); + const promptHelpId = getPromptHelpId(index); + const promptErrorId = getPromptErrorId(index); + const promptDescriptionHelpId = getPromptDescriptionHelpId(index); + const promptDescriptionErrorId = getPromptDescriptionErrorId(index); + const selectedSkill = draft.onboardingPromptSkills[index] ?? null; + const selectedSkillValue = promptSkillSelectValue(selectedSkill); + const selectedSkillOption = organizationSkillOptions.find((option) => option.value === selectedSkillValue); + return ( +
+

{label}

+ + + +
+ ); + })} +
+ +
) : (

{disabledPromptCopy}

diff --git a/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-onboarding-preview.ts b/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-onboarding-preview.ts new file mode 100644 index 0000000000..457d9a5d93 --- /dev/null +++ b/ee/apps/den-web/app/(den)/dashboard/_components/desktop-policy-onboarding-preview.ts @@ -0,0 +1,50 @@ +import type { OnboardingPrompt, OnboardingPromptSkillReference } from "@openwork/types/den/desktop-policies"; + +const ORGANIZATION_PROMPT_TITLES = ["Organization prompt 1", "Organization prompt 2", "Organization prompt 3"]; +const FIELD_SEPARATOR = "|"; + +function promptText(prompt: string | OnboardingPrompt) { + return typeof prompt === "string" ? prompt : prompt.prompt; +} + +function promptSkill(prompt: string | OnboardingPrompt) { + return typeof prompt === "string" ? undefined : prompt.skill; +} + +function encodeField(value: string) { + return value.replaceAll("%", "%25").replaceAll("|", "%7C").replaceAll("]", "%5D"); +} + +function promptSkillToken(skill: OnboardingPromptSkillReference) { + if (skill.source === "local") return `[skill ${skill.slug}]`; + const fields = [skill.slug, skill.name, skill.marketplaceName, skill.capabilityName].map(encodeField); + return `[connect-skill ${fields.join(FIELD_SEPARATOR)}]`; +} + +function selectionPrompt(prompt: string | OnboardingPrompt) { + const text = promptText(prompt); + const skill = promptSkill(prompt); + return skill ? `${promptSkillToken(skill)} ${text}` : text; +} + +function skillLabel(skill: OnboardingPromptSkillReference) { + return `/${skill.slug}`; +} + +// Keep copied behavior in sync with apps/app/src/components/chat/task-suggestions.tsx +// resolveOrganizationPromptCardContent, which is the desktop member source of truth. +export function resolveOrganizationPromptPreviewCardContent(input: { + prompt: string | OnboardingPrompt; + description?: string; + index: number; +}) { + const prompt = promptText(input.prompt); + const skill = promptSkill(input.prompt); + const title = input.description?.trim(); + return { + title: title || ORGANIZATION_PROMPT_TITLES[input.index] || "Organization prompt", + description: prompt, + selectionPrompt: selectionPrompt(input.prompt), + skillLabel: skill ? skillLabel(skill) : undefined, + }; +} diff --git a/ee/apps/den-web/package.json b/ee/apps/den-web/package.json index cd86307f8c..6e0d300fc0 100644 --- a/ee/apps/den-web/package.json +++ b/ee/apps/den-web/package.json @@ -10,7 +10,7 @@ "start": "next start --hostname 0.0.0.0 --port 3005", "lint": "next lint", "typecheck": "tsc --noEmit --pretty false", - "test": "bun test tests/observability-config.test.ts tests/desktop-version-options.test.ts tests/cloud-super-admins-role-hierarchy.test.ts tests/install-errors.test.ts tests/desktop-handoff.test.ts tests/single-org-signup-ui.test.ts tests/auth-landing-contract.test.ts tests/mcp-connection-smart-add.test.ts tests/mcp-credential-autofill.test.ts tests/org-selection-background.test.ts tests/join-org-invite-clean.test.ts tests/scim-sso-readiness.test.ts app/api/_lib/upstream-proxy.test.mjs", + "test": "bun test tests/observability-config.test.ts tests/desktop-version-options.test.ts tests/desktop-policy-onboarding-preview.test.ts tests/cloud-super-admins-role-hierarchy.test.ts tests/install-errors.test.ts tests/desktop-handoff.test.ts tests/single-org-signup-ui.test.ts tests/auth-landing-contract.test.ts tests/mcp-connection-smart-add.test.ts tests/mcp-credential-autofill.test.ts tests/org-selection-background.test.ts tests/join-org-invite-clean.test.ts tests/scim-sso-readiness.test.ts app/api/_lib/upstream-proxy.test.mjs", "test:observability": "bun test tests/observability-config.test.ts app/api/_lib/upstream-proxy.test.mjs" }, "dependencies": { diff --git a/ee/apps/den-web/tests/desktop-policy-onboarding-preview.test.ts b/ee/apps/den-web/tests/desktop-policy-onboarding-preview.test.ts new file mode 100644 index 0000000000..0458d38a17 --- /dev/null +++ b/ee/apps/den-web/tests/desktop-policy-onboarding-preview.test.ts @@ -0,0 +1,33 @@ +import { describe, expect, test } from "bun:test"; +import { resolveOrganizationPromptPreviewCardContent } from "../app/(den)/dashboard/_components/desktop-policy-onboarding-preview"; + +describe("desktop policy onboarding prompt preview", () => { + test("uses the admin description as the member card title", () => { + const card = resolveOrganizationPromptPreviewCardContent({ + prompt: "Summarize the latest project notes.", + description: "Project summary", + index: 0, + }); + + expect(card.title).toBe("Project summary"); + }); + + test("falls back to the numbered organization prompt title when description is blank", () => { + const card = resolveOrganizationPromptPreviewCardContent({ + prompt: "Draft the follow-up message.", + description: " ", + index: 1, + }); + + expect(card.title).toBe("Organization prompt 2"); + }); + + test("uses the prompt text as the visible body", () => { + const card = resolveOrganizationPromptPreviewCardContent({ + prompt: "Create a launch checklist.", + index: 2, + }); + + expect(card.description).toBe("Create a launch checklist."); + }); +}); diff --git a/packages/docs/openapi.json b/packages/docs/openapi.json index b7179bc158..4376b8cbd3 100644 --- a/packages/docs/openapi.json +++ b/packages/docs/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Den API","description":"OpenAPI spec for the Den control plane API.\n\nAuthentication:\n- Use `Authorization: Bearer ` for user-authenticated routes that require a Den session.\n- Use `x-api-key: ` for API-key-authenticated routes that accept organization API keys.\n- Public routes like health and documentation do not require authentication.\n\nSwagger tip: use the security schemes in the Authorize dialog to set either `bearerAuth` or `denApiKey` before trying protected endpoints.","version":"dev"},"servers":[],"tags":[{"name":"System","description":"Service health and operational routes."},{"name":"Organizations","description":"Top-level organization creation and context routes."},{"name":"Invitations","description":"Invitation preview, acceptance, creation, and cancellation routes."},{"name":"API Keys","description":"Organization API key management routes."},{"name":"SCIM","description":"Organization SCIM connector management routes."},{"name":"SSO","description":"Organization single sign-on connector management routes."},{"name":"Members","description":"Organization member management routes."},{"name":"Roles","description":"Organization custom role management routes."},{"name":"Teams","description":"Organization team management routes."},{"name":"Templates","description":"Organization shared template routes."},{"name":"LLM Providers","description":"Organization LLM provider catalog, configuration, and access routes."},{"name":"Workers","description":"Worker lifecycle, billing, and runtime routes."},{"name":"Worker Runtime","description":"Worker runtime inspection and upgrade routes."},{"name":"Worker Activity","description":"Worker heartbeat and activity reporting routes."},{"name":"Telemetry","description":"Telemetry event ingestion and adoption analytics."},{"name":"Admin","description":"Administrative reporting routes."},{"name":"Users","description":"Current user and membership routes."},{"name":"Bootstrap","description":"Agent-first provisional workspace setup routes."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"session-token","description":"Session token passed as `Authorization: Bearer ` for user-authenticated Den routes."},"denApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key passed as the `x-api-key` header for API-key-authenticated Den routes."}},"schemas":{"DenApiHealthResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"den-api"},"version":{"type":"string"}},"required":["ok","service","version"]},"DenApiReadinessResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string","const":"den-api"},"checks":{"type":"object","properties":{"database":{"type":"string","enum":["ok","error"]}},"required":["database"]}},"required":["ok","service","checks"]},"AdminPageInfo":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"returned":{"type":"number"},"hasMore":{"type":"boolean"},"search":{"type":"string"},"durationMs":{"type":"number"}},"required":["total","limit","offset","returned","hasMore","search","durationMs"]},"AdminUsersPageResponse":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"billing":{"type":"object","properties":{"loaded":{"type":"boolean"},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["loaded","paidUsers","unpaidUsers","billingUnavailableUsers"]},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["users","page","billing","generatedAt"]},"InvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"AdminOrganizationsPageResponse":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["organizations","page","generatedAt"]},"AdminSummary":{"type":"object","properties":{"totalUsers":{"type":"number"},"totalOrganizations":{"type":"number"},"verifiedUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"cloudWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"localWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithoutWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"adminCount":{"type":"number"},"billingLoaded":{"type":"boolean"},"activeUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recurringUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"inviters":{"anyOf":[{"type":"number"},{"type":"null"}]},"medianHoursToFirstInvite":{"anyOf":[{"type":"number"},{"type":"null"}]},"activitySeries":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"activeUsers":{"type":"number"},"realActiveUsers":{"type":"number"},"signups":{"type":"number"}},"required":["day","activeUsers","realActiveUsers","signups"]}}},"required":["totalUsers","totalOrganizations","verifiedUsers","recentUsers7d","recentUsers30d","totalWorkers","cloudWorkers","localWorkers","usersWithWorkers","usersWithoutWorkers","paidUsers","unpaidUsers","billingUnavailableUsers","adminCount","billingLoaded","activeUsers1d","activeUsers7d","activeUsers30d","realActiveUsers1d","realActiveUsers7d","realActiveUsers30d","recurringUsers","inviters","medianHoursToFirstInvite","activitySeries"]},"AdminMetricsResponse":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/AdminSummary"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["summary","generatedAt"]},"AdminOverviewResponse":{"type":"object","properties":{"viewer":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]},"admins":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"summary":{"$ref":"#/components/schemas/AdminSummary"},"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"userPage":{"$ref":"#/components/schemas/AdminPageInfo"},"organizationPage":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["viewer","admins","summary","users","organizations","userPage","organizationPage","generatedAt"]},"ScimManagementForbiddenError":{"type":"object","properties":{"error":{"type":"string","const":"forbidden"},"message":{"type":"string"}},"required":["error","message"]},"ScimAuthRouteError":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"AuthLoginOptionsResponse":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"nextStep":{"anyOf":[{"type":"string","const":"sso"},{"type":"string","const":"google"},{"type":"string","const":"github"},{"type":"string","const":"password"},{"type":"string","const":"new_account"}]},"allowPublicSignup":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["email","nextStep"]},"AuthLoginLockedError":{"type":"object","properties":{"error":{"type":"string","const":"login_locked"},"message":{"type":"string"}},"required":["error","message"]},"AuthPasswordScreeningUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"password_screening_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffGrantResponse":{"type":"object","properties":{"grant":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"openworkUrl":{"type":"string","format":"uri"}},"required":["grant","expiresAt","openworkUrl"]},"DesktopHandoffStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["pending","consumed","unknown"]}},"required":["status"]},"DesktopHandoffRateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffExchangeResponse":{"type":"object","properties":{"token":{"type":"string"},"user":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]}},"required":["token","user"]},"DesktopHandoffGrantNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"grant_not_found"},"message":{"type":"string"}},"required":["error","message"]},"NotFoundError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"DeprecatedSkillHubError":{"type":"object","properties":{"error":{"type":"string","const":"deprecated"},"message":{"type":"string","const":"Skill hubs are deprecated. Use plugins instead."}},"required":["error","message"]},"CurrentUserResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}},"session":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user","session"]},"CurrentUserOrganizationsResponse":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"isActive":{"type":"boolean"}},"required":["id","isActive"],"additionalProperties":{}}},"activeOrgId":{"anyOf":[{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},{"type":"null"}]},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orgs","activeOrgId","activeOrgSlug"]},"SendDownloadLinkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"SendDownloadLinkRateLimitError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"SendDownloadLinkEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"download_link_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateCurrentUserProfileResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user"]},"ActiveOrganizationResponse":{"type":"object","properties":{"activeOrgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activeOrgId","activeOrgSlug"]},"CurrentUserDesktopConfigResponse":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"allowedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},"brandAppName":{"type":"string","minLength":1,"maxLength":64},"brandLogoUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandIconUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandAccentColor":{"type":"string","enum":["blue","crimson","cyan","gold","grass","green","indigo","iris","jade","lime","mint","orange","pink","plum","purple","red","ruby","sky","teal","tomato","violet","yellow"]},"connectEnabled":{"type":"boolean"},"onboardingPrompts":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"onboardingPromptDescriptions":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}}}},"Memory":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","content","tags","source","scope","createdAt","updatedAt"]},"SaveMemoryResponse":{"type":"object","properties":{"memory":{"$ref":"#/components/schemas/Memory"}},"required":["memory"]},"SaveMemoryRequest":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":8000},"tags":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"contexts":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"snippet":{"type":"string","minLength":1,"maxLength":4000},"conversation_id":{"type":"string","minLength":1,"maxLength":128},"message_id":{"type":"string","minLength":1,"maxLength":128},"origin":{"type":"string","enum":["active_conversation","searched_conversation"]}},"required":["snippet"]}}},"required":["content"]},"MemorySearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"score":{"type":"number"}},"required":["id","content","tags","source","scope","createdAt","updatedAt","score"]}}},"required":["results"]},"MemoryContext":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mctx_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":31,"maxLength":31,"pattern":"^mctx_.*"},"snippet":{"type":"string"},"citation":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","snippet","citation","origin","createdAt"]},"MemoryWithContexts":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contexts":{"type":"array","items":{"$ref":"#/components/schemas/MemoryContext"}}},"required":["id","content","tags","source","scope","createdAt","updatedAt","contexts"]},"MemoryListResponse":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryWithContexts"}}},"required":["memories"]},"OrganizationResponse":{"type":"object","properties":{"organization":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]}},"required":["organization"]},"SingleOrgModeError":{"type":"object","properties":{"error":{"type":"string","const":"single_org_mode"},"message":{"type":"string"}},"required":["error","message"]},"InvitationPreviewResponse":{"type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","canceled","expired"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","email","role","status","expiresAt","createdAt"]},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"allowedEmailDomains":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"branding":{"type":"object","properties":{"appName":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]}},"required":["id","name","slug","allowedEmailDomains","branding"]}},"required":["invitation","organization"]},"InvitationAcceptedResponse":{"type":"object","properties":{"accepted":{"type":"boolean","const":true},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"}},"required":["accepted","organizationId","organizationSlug","invitationId"]},"AccountEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"account_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"InvalidEmailDomainError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_email_domain"},"message":{"type":"string"},"invalidDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","invalidDomains"]},"InvalidBrandIconError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_icon"},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateOrganizationBadRequest":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidEmailDomainError"},{"$ref":"#/components/schemas/InvalidBrandIconError"}]},"EnterprisePlanRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"enterprise_plan_required"},"feature":{"type":"string"},"message":{"type":"string"}},"required":["error","feature","message"]},"SingleOrgSsoStatusResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["configured","organizationSlug","signInPath","signInUrl"]},"ResolveOrganizationSsoByEmailResponse":{"type":"object","properties":{"requireSso":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["requireSso","organizationSlug","signInPath","signInUrl"]},"OrganizationOwner":{"type":"object","properties":{"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["memberId","userId","name","email"]},"OrganizationContextResponse":{"type":"object","properties":{"organization":{"type":"object","properties":{"owner":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOwner"},{"type":"null"}]}},"additionalProperties":{}},"currentMember":{"type":"object","properties":{},"additionalProperties":{}},"currentMemberTeams":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["organization","currentMember","currentMemberTeams"],"additionalProperties":{}},"OrganizationApiKeyOwner":{"type":"object","properties":{"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","memberId","name","email","image"]},"OrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"configId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastRequest":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"owner":{"$ref":"#/components/schemas/OrganizationApiKeyOwner"}},"required":["id","configId","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","lastRequest","expiresAt","createdAt","updatedAt","owner"]},"OrganizationApiKeyListResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationApiKey"}}},"required":["apiKeys"]},"OrganizationApiKeyForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"CreatedOrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","expiresAt","createdAt","updatedAt"]},"CreateOrganizationApiKeyResponse":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/CreatedOrganizationApiKey"},"key":{"type":"string","minLength":1}},"required":["apiKey","key"]},"CreateOrganizationApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":64}},"required":["name"]},"OrganizationApiKeyNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"api_key_not_found"}},"required":["error"]},"OrgStripeBillingResponse":{"type":"object","properties":{},"additionalProperties":{}},"OrgStripeCheckoutResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripePortalResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripeCheckoutSyncResponse":{"type":"object","properties":{"synced":{"type":"boolean"}},"required":["synced"]},"ManagedBrandAssetUploadResponse":{"type":"object","properties":{"assets":{"type":"object","properties":{"logo":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]},"icon":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]}}}},"required":["assets"]},"InvalidManagedBrandAssetError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_asset"},"kind":{"anyOf":[{"type":"string","enum":["logo","icon"]},{"type":"null"}]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","kind","reason","message"]},"DesktopPolicyListResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"desktopPolicies":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["definitions","desktopPolicies"]},"DesktopPolicyResponse":{"type":"object","properties":{"desktopPolicy":{"type":"object","properties":{},"additionalProperties":{}}},"required":["desktopPolicy"]},"DenDesktopPolicyDocumentWrite":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"onboardingPrompts":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},{"type":"null"}]},"onboardingPromptDescriptions":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}},{"type":"null"}]}}},"InferenceStatus":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]},"memberCount":{"type":"number"},"proxyBaseUrl":{"type":"string"},"upstreamProviderConfigured":{"type":"boolean"},"subscribed":{"type":"boolean"},"buckets":{"type":"array","items":{"type":"object","properties":{"windowType":{"type":"string","enum":["five_hour","weekly","monthly"]},"windowStartAt":{"type":"string"},"windowEndAt":{"type":"string"},"limitAmount":{"type":"number"},"usedAmount":{"type":"number"}},"required":["windowType","windowStartAt","windowEndAt","limitAmount","usedAmount"]}}},"required":["enabled","tier","memberCount","proxyBaseUrl","upstreamProviderConfigured","buckets"]},"InferenceStatusResponse":{"type":"object","properties":{"inference":{"$ref":"#/components/schemas/InferenceStatus"}},"required":["inference"]},"InferenceProviderMissingError":{"type":"object","properties":{"error":{"type":"string","const":"openrouter_management_api_key_missing"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"organizationId":{"type":"string"},"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","organizationId","groupMappingMode","createdAt","updatedAt"]},"OrganizationScimHealth":{"type":"object","properties":{"unresolvedFailureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastFailureAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastFailureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastSuccessfulSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["unresolvedFailureCount","lastFailureAt","lastFailureAction","lastFailureMessage","nextRetryAt","lastSuccessfulSyncAt"]},"OrganizationScimConnectionResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean"},"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationScimConnection"},{"type":"null"}]},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","health"]},"ScimInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"ScimUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ScimForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"ScimOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"RotateOrganizationScimTokenResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean","const":true},"connection":{"$ref":"#/components/schemas/OrganizationScimConnection"},"scimToken":{"type":"string","minLength":1},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","scimToken","health"]},"ScimSsoRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"sso_required"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimReconciliationResponse":{"type":"object","properties":{"checked":{"type":"integer","minimum":0,"maximum":9007199254740991},"repaired":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["checked","repaired","failures"]},"OrganizationOidcSsoConfig":{"type":"object","properties":{"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"skipDiscovery":{"type":"boolean"},"authorizationEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"jwksEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"userInfoEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpointAuthentication":{"anyOf":[{"type":"string","enum":["client_secret_basic","client_secret_post"]},{"type":"null"}]}},"required":["clientId","scopes","skipDiscovery","authorizationEndpoint","tokenEndpoint","jwksEndpoint","userInfoEndpoint","tokenEndpointAuthentication"]},"OrganizationSamlSsoConfig":{"type":"object","properties":{"entryPoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"audience":{"anyOf":[{"type":"string"},{"type":"null"}]},"wantAssertionsSigned":{"type":"boolean"}},"required":["entryPoint","audience","wantAssertionsSigned"]},"OrganizationSsoConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"kind":{"type":"string","enum":["oidc","saml"]},"issuer":{"type":"string","format":"uri"},"domain":{"type":"string"},"status":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"},"redirectUrl":{"type":"string","format":"uri"},"acsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"metadataUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"domainVerified":{"type":"boolean"},"oidc":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOidcSsoConfig"},{"type":"null"}]},"saml":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSamlSsoConfig"},{"type":"null"}]},"lastTestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","kind","issuer","domain","status","signInPath","signInUrl","redirectUrl","acsUrl","metadataUrl","domainVerified","oidc","saml","lastTestedAt","lastError","createdAt","updatedAt"]},"OrganizationSsoConnectionResponse":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSsoConnection"},{"type":"null"}]},"domainVerificationToken":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connection"]},"SsoInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"SsoUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"SsoForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"SsoOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"OrganizationSsoDomainVerificationResponse":{"type":"object","properties":{"domainVerificationToken":{"type":"string","minLength":1}},"required":["domainVerificationToken"]},"InvitationResponse":{"type":"object","properties":{"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"inviteToken":{"type":"string"}},"required":["invitationId","email","role","expiresAt","inviteToken"]},"InvitePaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"payment_required"},"reason":{"type":"string","const":"seat_subscription_required"},"subscriptionType":{"type":"string","const":"seat"},"currentCount":{"type":"number"},"freeSeatCount":{"type":"number"},"message":{"type":"string"}},"required":["error","reason","subscriptionType","currentCount","freeSeatCount","message"]},"InviteEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"invite_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"InvitationEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"invitation_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"}},"required":["error","reason","message","invitationId"]},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]},"CreateInstallLinkResponse":{"type":"object","properties":{"token":{"type":"string"},"installPageUrl":{"type":"string","format":"uri"}},"required":["token","installPageUrl"]},"CapabilityDisabledError":{"type":"object","properties":{"error":{"type":"string","const":"capability_disabled"},"capability":{"type":"string","enum":["installLinks","mcpConnections"]}},"required":["error","capability"]},"RateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"CreateInstallLinkRequest":{"type":"object","properties":{"rotate":{"default":false,"type":"boolean"}}},"InstallExperienceConfig":{"type":"object","properties":{"appName":{"default":"OpenWork","type":"string","minLength":1,"maxLength":64},"clientName":{"type":"string","minLength":1},"webUrl":{"type":"string","format":"uri"},"apiUrl":{"type":"string","format":"uri"},"requireSignin":{"type":"boolean"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"connectUrl":{"type":"string"},"connectExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["clientName","webUrl","apiUrl","requireSignin","logoUrl","connectUrl","connectExpiresAt"]},"InstallLinkNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"install_link_not_found"}},"required":["error"]},"ConnectLinkClaims":{"type":"object","properties":{"iss":{"type":"string","format":"uri"},"aud":{"type":"string","const":"openwork-desktop-connect"},"iat":{"type":"integer","minimum":0,"maximum":9007199254740991},"exp":{"type":"integer","minimum":0,"maximum":9007199254740991},"jti":{"type":"string","minLength":8},"v":{"type":"number","const":1},"org":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128}},"required":["name"]},"brand":{"type":"object","properties":{"appName":{"type":"string","minLength":1,"maxLength":64},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]},"den":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"apiBaseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["baseUrl"]},"requireSignin":{"type":"boolean"}},"required":["iss","aud","iat","exp","jti","v","org","brand","den","requireSignin"]},"DesktopConnectGrantResponse":{"type":"object","properties":{"claims":{"$ref":"#/components/schemas/ConnectLinkClaims"}},"required":["claims"]},"DesktopConnectGrantFailure":{"type":"object","properties":{"error":{"type":"string","enum":["connect_grant_invalid","connect_grant_expired","connect_grant_replayed"]}},"required":["error"]},"LlmProviderTestConnectionResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"ok":{"type":"boolean"},"vendor":{"type":"string","enum":["azure","openai-compatible"]},"normalizedApi":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempted":{"type":"array","items":{"type":"string"}},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["ok","vendor","normalizedApi","attempted","models","hint","status"]},"verifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ok","adjusted","failed"]},"npm":{"type":"string","enum":["@ai-sdk/openai-compatible","@ai-sdk/openai"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","npm","message"]}}},"required":["result"]},"LlmProviderCatalogListResponse":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["providers"]},"ProviderCatalogUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"provider_catalog_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"LlmProviderCatalogResponse":{"type":"object","properties":{"provider":{"type":"object","properties":{},"additionalProperties":{}}},"required":["provider"]},"LlmProviderListResponse":{"type":"object","properties":{"llmProviders":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["llmProviders"]},"LlmProviderResponse":{"type":"object","properties":{"llmProvider":{"type":"object","properties":{},"additionalProperties":{}}},"required":["llmProvider"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"OAuthClientConfigResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"providerId":{"type":"string"},"clientId":{"type":"string"},"features":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","providerId","clientId","features","tenantId"]},"UnknownOAuthProviderError":{"type":"object","properties":{"error":{"type":"string","const":"unknown_oauth_provider"},"message":{"type":"string"}},"required":["error","message"]},"OAuthClientConfigDetailResponse":{"type":"object","properties":{"providerId":{"type":"string"},"configured":{"type":"boolean"},"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"redirectUri":{"type":"string"},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["providerId","configured","clientId","features","scopes","redirectUri","tenantId"]},"OAuthConnectStartResponse":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"]},"OAuthClientNotConfiguredError":{"type":"object","properties":{"error":{"type":"string","const":"client_not_configured"},"message":{"type":"string"}},"required":["error","message"]},"NativeProviderConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"OAuthProviderStatusResponse":{"type":"object","properties":{"providerId":{"type":"string"},"connected":{"type":"boolean"},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["providerId","connected","externalAccountId","scopes"]},"GoogleWorkspaceGmailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"}},"required":["id","threadId","from","to","subject","date","snippet"]},"GoogleWorkspaceGmailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageSummary"}}},"required":["ok","messages"]},"GoogleWorkspaceNeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceUpstreamError":{"type":"object","properties":{"error":{"type":"string","const":"google_api_error"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceGmailAttachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["attachmentId","filename","mimeType","size"]},"GoogleWorkspaceGmailMessage":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachment"}}},"required":["id","threadId","from","to","subject","date","snippet","body","attachments"]},"GoogleWorkspaceGmailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessage"}},"required":["ok","message"]},"GoogleWorkspaceGmailAttachmentResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messageId":{"type":"string"},"attachmentId":{"type":"string"},"size":{"type":"number","description":"Attachment size in bytes."},"dataBase64":{"type":"string","description":"Standard base64-encoded attachment bytes; decode locally to reconstruct the file."}},"required":["ok","messageId","attachmentId","size","dataBase64"]},"GoogleWorkspaceCalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"status":{"type":"string"},"htmlLink":{"type":"string"},"attendees":{"type":"array","items":{"type":"string"}},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","summary","description","location","start","end","status","htmlLink","attendees","meetLink"]},"GoogleWorkspaceCalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEvent"}}},"required":["ok","events"]},"GoogleWorkspaceCreateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceCreateCalendarEventBody":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":1000,"description":"Event title."},"description":{"description":"Optional event description.","type":"string","maxLength":20000},"location":{"description":"Optional event location.","type":"string","maxLength":1000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event start date-time."},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event end date-time."},"timeZone":{"description":"Optional IANA time zone for start and end.","type":"string","minLength":1,"maxLength":128},"attendees":{"description":"Optional attendee email addresses.","maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"createMeetLink":{"description":"Set true to create a Google Meet conferencing link for this event; the response returns meetLink when Google creates it.","type":"boolean"}},"required":["summary","start","end"]},"GoogleWorkspaceUpdateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceUpdateCalendarEventBody":{"type":"object","properties":{"createMeetLink":{"type":"boolean","const":true,"description":"Set true to add a Google Meet conferencing link to this existing event."}},"required":["createMeetLink"]},"GoogleWorkspaceDriveFileSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","mimeType","modifiedTime","webViewLink","size"]},"GoogleWorkspaceDriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}}},"required":["ok","files"]},"GoogleWorkspaceUploadDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}},"required":["ok","file"]},"GoogleWorkspaceUploadDriveFileBody":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Filename to create in Google Drive."},"mimeType":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$","description":"File MIME type."},"dataBase64":{"type":"string","minLength":1,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"File bytes as standard base64. The gmail-attachment capability returns dataBase64 in this exact encoding — pass it through directly to save an email attachment to Drive. Maximum decoded size: 10 MiB."},"folderId":{"description":"Optional Google Drive parent folder id.","type":"string","minLength":1,"maxLength":512}},"required":["filename","mimeType","dataBase64"],"additionalProperties":false},"GoogleWorkspaceDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"type":"string"},"truncated":{"type":"boolean"}},"required":["id","name","mimeType","modifiedTime","webViewLink","size","content","truncated"]}},"required":["ok","file"]},"GoogleWorkspaceShareDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"fileId":{"type":"string"},"permissionId":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"}},"required":["ok","fileId","permissionId","type","role"]},"GoogleWorkspaceShareDriveFileBody":{"type":"object","properties":{"type":{"type":"string","enum":["user","domain"],"description":"Use type=user to share with one person, or type=domain to share with the entire organization."},"emailAddress":{"description":"Required when type=user; pass the person's email address, for example raghav@openworklabs.com.","type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"domain":{"description":"Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.","type":"string","minLength":1,"maxLength":255},"role":{"default":"reader","description":"Drive permission role to grant.","type":"string","enum":["reader","commenter","writer"]},"sendNotificationEmail":{"default":true,"description":"Whether Google should email the recipient about the new access.","type":"boolean"}},"required":["type"],"additionalProperties":false},"GoogleWorkspaceDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draftId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the ready-to-send draft. Always share draftUrl with the user so they can open the draft in Gmail for review and send."},"threadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the conversation thread when this draft is a threaded reply."},"to":{"type":"string"},"subject":{"type":"string"},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quotedHistoryIncluded":{"type":"boolean","description":"True when quoted conversation history was included by the server or already present in the request body."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","mimeType","size"]}}},"required":["ok","draftId","messageId","draftUrl","threadUrl","to","subject","threadId","quotedHistoryIncluded"]},"GoogleWorkspaceMissingThreadIdError":{"type":"object","properties":{"error":{"type":"string","const":"missing_thread_id"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365EmailAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"]},"Microsoft365MailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments"]},"Microsoft365MailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365MailMessageSummary"}}},"required":["ok","messages"]},"Microsoft365NeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365GraphError":{"type":"object","properties":{"error":{"type":"string","const":"microsoft_graph_error"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365MailMessage":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"body":{"type":"string"},"bodyContentType":{"type":"string"},"bodyTruncated":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments","cc","body","bodyContentType","bodyTruncated"]},"Microsoft365MailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","message"]},"Microsoft365CalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"preview":{"type":"string"},"start":{"type":"string"},"startTimeZone":{"type":"string"},"end":{"type":"string"},"endTimeZone":{"type":"string"},"isAllDay":{"type":"boolean"},"location":{"type":"string"},"organizer":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"onlineMeetingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","subject","preview","start","startTimeZone","end","endTimeZone","isAllDay","location","organizer","attendees","webLink","onlineMeetingUrl"]},"Microsoft365CalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}}},"required":["ok","events"]},"Microsoft365DriveItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind"]},"Microsoft365DriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365DriveItem"}}},"required":["ok","files"]},"Microsoft365DriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"truncated":{"type":"boolean"},"contentUnavailableReason":{"anyOf":[{"type":"string","enum":["folder","file_too_large","unsupported_content_type"]},{"type":"null"}]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind","content","contentType","truncated","contentUnavailableReason"]}},"required":["ok","file"]},"Microsoft365MailDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draft":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","draft"]},"Microsoft365MailDraftBody":{"type":"object","properties":{"to":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"type":"string","minLength":1,"maxLength":998},"body":{"type":"string","maxLength":200000}},"required":["to","subject","body"]},"Microsoft365CalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"event":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}},"required":["ok","event"]},"Microsoft365CalendarEventBody":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","maxLength":20000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timeZone":{"default":"UTC","type":"string","minLength":1,"maxLength":100},"location":{"type":"string","maxLength":255},"attendees":{"maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["subject","start","end"]},"Microsoft365DriveFileWriteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/Microsoft365DriveItem"}},"required":["ok","file"]},"Microsoft365DriveFileWriteBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512},"content":{"type":"string","maxLength":200000}},"required":["path","content"]},"Microsoft365TeamsChat":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"chatType":{"type":"string"},"webUrl":{"type":"string"},"lastUpdatedDateTime":{"type":"string"}},"required":["id","topic","chatType","webUrl","lastUpdatedDateTime"]},"Microsoft365TeamsChatsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"chats":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsChat"}}},"required":["ok","chats"]},"Microsoft365TeamsMessage":{"type":"object","properties":{"id":{"type":"string"},"createdDateTime":{"type":"string"},"content":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"webUrl":{"type":"string"}},"required":["id","createdDateTime","content","from","webUrl"]},"Microsoft365TeamsMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}}},"required":["ok","messages"]},"Microsoft365TeamsMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}},"required":["ok","message"]},"Microsoft365TeamsMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["content"]},"ExternalMcpClientMetadata":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":"string","const":"OpenWork"},"application_type":{"type":"string","const":"web"},"redirect_uris":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","prefixItems":[{"type":"string","const":"authorization_code"},{"type":"string","const":"refresh_token"}]},"response_types":{"type":"array","prefixItems":[{"type":"string","const":"code"}]},"token_endpoint_auth_method":{"type":"string","const":"none"}},"required":["client_id","client_name","application_type","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]},"ExternalMcpRequirementsDiscovery":{"type":"object","properties":{"status":{"type":"string","enum":["ready","manual_action_required","unsupported","unreachable"]},"server":{"type":"object","properties":{"url":{"type":"string"},"protocolVersion":{"type":"string"},"initialize":{"type":"string","enum":["succeeded","authentication_required","failed"]}},"required":["url","initialize"]},"authentication":{"type":"object","properties":{"kind":{"type":"string","enum":["none","oauth","manual_bearer","unknown"]},"resource":{"type":"string"},"protectedResourceMetadataUrl":{"type":"string"},"authorizationServers":{"type":"array","items":{"type":"object","properties":{"issuer":{"type":"string"},"authorizationEndpoint":{"type":"string"},"tokenEndpoint":{"type":"string"},"registrationEndpoint":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"},"scopesSupported":{"type":"array","items":{"type":"string"}},"grantTypesSupported":{"type":"array","items":{"type":"string"}},"codeChallengeMethodsSupported":{"type":"array","items":{"type":"string"}},"tokenEndpointAuthMethodsSupported":{"type":"array","items":{"type":"string"}}},"required":["issuer","clientIdMetadataDocumentSupported"]}},"requiredScopes":{"type":"array","items":{"type":"string"}},"recommendedScopes":{"type":"array","items":{"type":"string"}},"refreshSupport":{"type":"string","enum":["supported","not_advertised","unknown"]},"availableRegistrationMethods":{"type":"array","items":{"type":"string","enum":["pre_registered","client_metadata","dynamic"]}},"recommendedRegistrationMethod":{"type":"string","enum":["client_metadata","dynamic","pre_registered"]}},"required":["kind","authorizationServers","requiredScopes","recommendedScopes","refreshSupport","availableRegistrationMethods","recommendedRegistrationMethod"]},"tools":{"type":"object","properties":{"visibility":{"type":"string","enum":["available_without_auth","requires_auth","unavailable"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}},"required":["name"]}}},"required":["visibility"]},"manualRequirements":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"required":{"type":"boolean"}},"required":["code","label","reason","required"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["status","server","authentication","tools","manualRequirements","warnings"]},"ExternalMcpRequirementsDiscoveryFailedError":{"type":"object","properties":{"error":{"type":"string","const":"requirements_discovery_failed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpRequirementsDiscoveryInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["url"]},"ExternalMcpIssuerReviewResponse":{"type":"object","properties":{"currentIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"advertisedIssuers":{"type":"array","items":{"type":"string"}},"reviewRequired":{"type":"boolean"},"issuerChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["currentIssuer","advertisedIssuers","reviewRequired"]},"ExternalMcpConnectionNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_found"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionConflictError":{"type":"object","properties":{"error":{"type":"string","const":"connection_conflict"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpIssuerReviewInput":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"preview"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"confirm"},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"authorizationServerIssuer":{"type":"string","format":"uri"}},"required":["action","expectedUpdatedAt","authorizationServerIssuer"]}]},"ExternalMcpPresetResponse":{"type":"object","properties":{"presetId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"requiresOAuthClient":{"type":"boolean"}},"required":["presetId","displayName","description","url","authType"]},"ExternalMcpPresetListResponse":{"type":"object","properties":{"presets":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"}}},"required":["presets"]},"ExternalMcpResolveResult":{"type":"object","properties":{"resolution":{"type":"string","enum":["preset","discovered","not_found"]},"attempted":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"preset":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"},"match":{"type":"object","properties":{"url":{"type":"string"},"suggestedName":{"type":"string"},"discovery":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}},"required":["url","suggestedName","discovery"]}},"required":["resolution","attempted"]},"ExternalMcpResolveInput":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200}},"required":["query"]},"ExternalMcpConnectionRequiredBy":{"type":"object","properties":{"pluginId":{"type":"string"},"name":{"type":"string"}},"required":["pluginId","name"]},"ExternalMcpConnectionAccessSummary":{"type":"object","properties":{"orgWide":{"type":"boolean"},"memberIds":{"type":"array","items":{"type":"string"}},"teamIds":{"type":"array","items":{"type":"string"}}},"required":["orgWide","memberIds","teamIds"]},"ExternalMcpConnectionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access"]},"ExternalMcpConnectionListResponse":{"type":"object","properties":{"connections":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}},"required":["connections"]},"ExternalMcpConnectionToolAnnotations":{"type":"object","properties":{"title":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"idempotentHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}}},"ExternalMcpConnectionTool":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"annotations":{"$ref":"#/components/schemas/ExternalMcpConnectionToolAnnotations"}},"required":["name","inputSchema"]},"ExternalMcpConnectionToolListResponse":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionTool"}}},"required":["tools"]},"ExternalMcpConnectionNotReadyError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_ready"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpDiagnostic":{"type":"object","properties":{"referenceId":{"type":"string"},"phase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"category":{"type":"string"},"code":{"type":"string"},"highestPassed":{"type":"string","enum":["configured","reachable","authorized","protocol_ready","catalog_ready","operation_ready"]},"retryable":{"type":"boolean"},"actionOwner":{"type":"string","enum":["openwork","network_admin","provider_admin","organization_admin","member"]},"operatorAction":{"type":"string"},"message":{"type":"string"},"httpStatus":{"type":"integer","minimum":100,"maximum":599},"operationPhase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"outbound":{"type":"object","properties":{"origin":{"type":"string"},"pathHash":{"type":"string"}},"required":["origin","pathHash"]},"providerRequestId":{"type":"string"},"providerStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerCode":{"type":"string"},"payloadBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jsonRpcCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"connectUrl":{"type":"string","format":"uri"}},"required":["referenceId","phase","category","code","highestPassed","retryable","actionOwner","operatorAction","message"]},"ExternalMcpConnectionToolListFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_catalog_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionToolInspectionHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"redacted":{"type":"boolean"}},"required":["name","value","redacted"]},"ExternalMcpConnectionToolInspectionBody":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"type":"boolean"},"unavailable":{"type":"boolean"}},"required":["text","bytes","truncated"]},"ExternalMcpConnectionToolInspectionRequest":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["method","url","startedAt","headers","body"]},"ExternalMcpConnectionToolInspectionResponse":{"type":"object","properties":{"status":{"type":"integer","minimum":100,"maximum":599},"statusText":{"type":"string"},"durationMs":{"type":"number","minimum":0},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["status","statusText","durationMs","headers","body"]},"ExternalMcpConnectionToolInspectionDiagnosis":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"layer":{"type":"string","enum":["openwork","network","mcp_connection","remote_http","mcp_tool"]},"summary":{"type":"string"}},"required":["status","layer","summary"]},"ExternalMcpConnectionToolInspection":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionRequest"},"response":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionResponse"},"diagnosis":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionDiagnosis"}},"required":["diagnosis"]},"ExternalMcpConnectionToolRunResponse":{"type":"object","properties":{"referenceId":{"type":"string"},"durationMs":{"type":"number","minimum":0},"result":{},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["referenceId","durationMs","result","inspection"]},"ExternalMcpConnectionToolRequestTooLargeError":{"type":"object","properties":{"error":{"type":"string","const":"payload_too_large"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionToolRunFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_execution_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["error","message","diagnostic","inspection"]},"ExternalMcpConnectionToolRunInput":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"maxLength":255},"arguments":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["toolName","arguments"]},"ExternalMcpConnectionCreatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"links":{"type":"object","properties":{"yourConnections":{"type":"string"},"oauthCallback":{"type":"string"}},"required":["yourConnections","oauthCallback"]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access","links"]},"ExternalMcpConnectionValidationFailedError":{"type":"object","properties":{"error":{"type":"string","const":"connection_validation_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionAccessInput":{"type":"object","properties":{"orgWide":{"default":false,"type":"boolean"},"memberIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"teamIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}}},"ExternalMcpConnectionUpdatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"identityChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","updatedAt","connectedForMe","requiredBy","identityManagedBy","access","identityChanged","reconnectionRequired"]},"ExternalMcpConnectionMarketplaceManagedError":{"type":"object","properties":{"error":{"type":"string","const":"marketplace_managed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionUpdateConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"},{"$ref":"#/components/schemas/ExternalMcpConnectionMarketplaceManagedError"}]},"ExternalMcpConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"ExternalMcpOAuthConfigurationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_configuration_required"},"message":{"type":"string"},"callbackUrl":{"type":"string"},"clientMetadataUrl":{"type":"string"},"manualRequirements":{"type":"array","items":{"type":"string"}}},"required":["error","message","callbackUrl","clientMetadataUrl","manualRequirements"]},"ExternalMcpOAuthIssuerMismatchError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_issuer_mismatch"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectStartConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpOAuthConfigurationRequiredError"},{"$ref":"#/components/schemas/ExternalMcpOAuthIssuerMismatchError"}]},"ExternalMcpConnectStartFailedError":{"type":"object","properties":{"error":{"type":"string","const":"oauth_handshake_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"PluginArchGithubInstallStartResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"},"state":{"type":"string","minLength":1}},"required":["redirectUrl","state"]}},"required":["ok","item"]},"PluginArchConnectorAccount":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","inactive","disconnected","error"]},"createdByName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","organizationId","connectorType","remoteId","externalAccountRef","displayName","status","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchGithubRepository":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fullName":{"type":"string","minLength":1},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hasPluginManifest":{"type":"boolean"},"manifestKind":{"anyOf":[{"type":"string","enum":["marketplace","plugin"]},{"type":"null"}]},"marketplacePluginCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"private":{"type":"boolean"}},"required":["id","fullName","defaultBranch","private"]},"PluginArchGithubInstallCompleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}}},"required":["connectorAccount","repositories"]}},"required":["ok","item"]},"PluginArchConfigObjectVersion":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cov_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"schemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"normalizedPayloadJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"rawSourceText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdVia":{"type":"string","enum":["cloud","import","connector","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"connectorSyncEventId":{"anyOf":[{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"isDeletedVersion":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","configObjectId","schemaVersion","normalizedPayloadJson","rawSourceText","createdVia","createdByOrgMembershipId","connectorSyncEventId","sourceRevisionRef","isDeletedVersion","createdAt"]},"PluginArchConfigObject":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"searchText":{"anyOf":[{"type":"string","minLength":1,"maxLength":65535},{"type":"null"}]},"currentFileName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"currentFileExtension":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]},"currentRelativePath":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"connectorInstanceId":{"anyOf":[{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"latestVersion":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"},{"type":"null"}]}},"required":["id","organizationId","objectType","sourceMode","title","description","searchText","currentFileName","currentFileExtension","currentRelativePath","status","createdByOrgMembershipId","connectorInstanceId","createdAt","updatedAt","deletedAt","latestVersion"]},"PluginArchConfigObjectListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["ok","item"]},"PluginArchConfigObjectDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["item"]},"PluginArchConfigObjectVersionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectVersionDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"required":["item"]},"PluginArchPluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pco_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pco_.*"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"connectorMappingId":{"anyOf":[{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},{"type":"null"}]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"configObject":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["id","pluginId","configObjectId","membershipSource","connectorMappingId","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchPluginMembershipListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMembershipMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"required":["ok","item"]},"PluginArchAccessGrant":{"type":"object","properties":{"id":{"anyOf":[{"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^coa_.*"},{"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pag_.*"},{"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mag_.*"},{"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cia_.*"}]},"orgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"teamId":{"anyOf":[{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},{"type":"null"}]},"orgWide":{"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","orgMembershipId","teamId","orgWide","role","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchAccessGrantListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchAccessGrantMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"required":["ok","item"]},"OpenWorkExtensionManifest":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":2048},"source":{"type":"object","properties":{"format":{"type":"string","enum":["openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"trusted":{"type":"boolean"},"origin":{"type":"string","enum":["builtin","den","workspace","local"]},"reference":{"type":"string","minLength":1,"maxLength":512}},"required":["format","trusted"]},"resources":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"contributions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"setup":{"type":"object","properties":{},"additionalProperties":{}},"lifecycle":{"type":"object","properties":{},"additionalProperties":{}}},"required":["schemaVersion","id","name","description","source","resources"],"additionalProperties":{}},"PluginArchExtensionProjection":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceFormat":{"type":"string","enum":["openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"manifest":{"anyOf":[{"$ref":"#/components/schemas/OpenWorkExtensionManifest"},{"type":"null"}]}},"required":["id","name","description","sourceFormat","manifest"]},"PluginArchPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchPluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["ok","item"]},"PluginArchPluginDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["item"]},"PluginArchPluginMcpRequirementConfigureResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"binding":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pmr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pmr_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"externalMcpConnectionId":{"type":"string"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"serverName":{"type":"string"}},"required":["id","configObjectId","externalMcpConnectionId","pluginId","serverName"]},"connection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt"]},"links":{"type":"object","properties":{"yourConnections":{"type":"string"}},"required":["yourConnections"]}},"required":["binding","connection","links"]}},"required":["ok","item"]},"GithubPluginMcpImportServer":{"type":"object","properties":{"authType":{"anyOf":[{"type":"string","const":"oauth"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"serverKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["missing_url","local_unsupported","invalid_url","unsupported_auth"]},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["authType","connectionId","name","pluginKey","pluginName","serverKey","skippedReason","sourcePath","supported","url"]},"GithubPluginMcpImportPlan":{"type":"object","properties":{"branch":{"type":"string"},"classification":{"type":"string","enum":["claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"marketplace":{"anyOf":[{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["description","name","owner","version"]},{"type":"null"}]},"plugins":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"mcpCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string"},"skillCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["description","key","mcpCount","name","skillCount"]}},"repositoryFullName":{"type":"string"},"rootPath":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/GithubPluginMcpImportServer"}},"skills":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"skillKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["invalid_skill"]},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"}},"required":["description","name","pluginKey","pluginName","skillKey","skippedReason","sourcePath","supported"]}},"sourceRevisionRef":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["branch","classification","marketplace","plugins","repositoryFullName","rootPath","servers","skills","sourceRevisionRef","warnings"]},"GithubPluginMcpImportPreviewResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/GithubPluginMcpImportPlan"}},"required":["ok","item"]},"GithubPluginMcpImportResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"imported":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["connectionId","name","url"]}},"importedSkills":{"type":"array","items":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"name":{"type":"string"},"sourcePath":{"type":"string"}},"required":["configObjectId","name","sourcePath"]}},"marketplaceId":{"anyOf":[{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"},"skipped":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["missing_url","local_unsupported","invalid_url","unsupported_auth"]}},"required":["name","reason"]}},"skippedSkills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["invalid_skill"]},"sourcePath":{"type":"string"}},"required":["name","reason","sourcePath"]}}},"required":["imported","importedSkills","marketplaceId","plugin","skipped","skippedSkills"]}},"required":["ok","item"]},"PluginArchMarketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchMarketplaceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchMarketplaceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["ok","item"]},"PluginArchMarketplaceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["item"]},"PluginArchMarketplaceConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"PluginArchMarketplacePluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkp_.*"},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["id","marketplaceId","pluginId","membershipSource","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchMarketplacePluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginCloudReadiness":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_signin","needs_admin_setup","desktop_only","not_synced"]},"hasInstructional":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"authType":{"type":"string","enum":["oauth","apikey","none"]},"authTypeMismatch":{"type":"boolean"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"serverName":{"type":"string"},"url":{"type":"string"},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connectedForMe":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"requiredAuthType":{"type":"string","enum":["oauth","apikey","none"]}},"required":["configObjectId","id","name","serverName","url"]}}},"required":["state","hasInstructional","connections"]},"PluginArchMarketplaceResolvedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"canDelete":{"type":"boolean"}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","canDelete"]},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"cloudReadiness":{"$ref":"#/components/schemas/PluginArchPluginCloudReadiness"}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]}},"source":{"anyOf":[{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"accountLogin":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryFullName":{"type":"string","minLength":1},"branch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connectorAccountId","connectorInstanceId","accountLogin","repositoryFullName","branch"]},{"type":"null"}]}},"required":["marketplace","plugins","source"]}},"required":["ok","item"]},"PluginArchMarketplacePluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"required":["ok","item"]},"PluginArchConnectorAccountListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorAccountMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["ok","item"]},"PluginArchConnectorAccountDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["item"]},"PluginArchConnectorAccountDisconnectResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorInstanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"disconnectedAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["deletedConfigObjectCount","deletedConnectorInstanceCount","deletedConnectorMappingCount","disconnectedAccountId","reason"]}},"required":["ok","item"]},"PluginArchConnectorInstance":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"instanceConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastSyncStatus":{"anyOf":[{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},{"type":"null"}]},"lastSyncCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","organizationId","connectorAccountId","connectorType","remoteId","name","status","instanceConfigJson","lastSyncedAt","lastSyncStatus","lastSyncCursor","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchConnectorInstanceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorInstanceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["ok","item"]},"PluginArchConnectorInstanceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["item"]},"PluginArchConnectorInstanceConfiguredPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"rootPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","rootPath"]},"PluginArchConnectorInstanceConfigurationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"configuredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfiguredPlugin"}},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"importedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"mappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["autoImportNewPlugins","configuredPlugins","connectorInstance","importedConfigObjectCount","mappingCount"]}},"required":["ok","item"]},"PluginArchConnectorInstanceRemoveResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"removedConnectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"}},"required":["deletedConfigObjectCount","deletedConnectorMappingCount","removedConnectorInstanceId"]}},"required":["ok","item"]},"PluginArchConnectorTarget":{"type":"object","properties":{"id":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"targetConfigJson":{"type":"object","properties":{},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorType","remoteId","targetKind","externalTargetRef","targetConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveredPlugin":{"type":"object","properties":{"key":{"type":"string","minLength":1},"sourceKind":{"type":"string","enum":["marketplace_entry","plugin_manifest","standalone_claude","folder_inference"]},"rootPath":{"type":"string"},"displayName":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"selectedByDefault":{"type":"boolean"},"supported":{"type":"boolean"},"manifestPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string","minLength":1}},"componentKinds":{"type":"array","items":{"type":"string","enum":["skill","command","agent","hook","mcp_server","lsp_server","monitor","settings"]}},"componentPaths":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"string","minLength":1}},"commands":{"type":"array","items":{"type":"string","minLength":1}},"hooks":{"type":"array","items":{"type":"string","minLength":1}},"lspServers":{"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"type":"array","items":{"type":"string","minLength":1}},"monitors":{"type":"array","items":{"type":"string","minLength":1}},"settings":{"type":"array","items":{"type":"string","minLength":1}},"skills":{"type":"array","items":{"type":"string","minLength":1}}},"required":["agents","commands","hooks","lspServers","mcpServers","monitors","settings","skills"]},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["key","sourceKind","rootPath","displayName","description","selectedByDefault","supported","manifestPath","warnings","componentKinds","componentPaths","metadata"]},"PluginArchGithubDiscoveryStep":{"type":"object","properties":{"id":{"type":"string","enum":["read_repository_structure","check_marketplace_manifest","check_plugin_manifests","prepare_discovered_plugins"]},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["completed","running","warning"]}},"required":["id","label","status"]},"PluginArchGithubDiscoveryTreeSummary":{"type":"object","properties":{"scannedEntryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["git-tree-recursive"]},"truncated":{"type":"boolean"}},"required":["scannedEntryCount","strategy","truncated"]},"PluginArchGithubConnectorDiscoveryResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"classification":{"type":"string","enum":["claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"discoveredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveredPlugin"}},"repositoryFullName":{"type":"string","minLength":1},"sourceRevisionRef":{"type":"string","minLength":1},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryStep"}},"treeSummary":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeSummary"},"warnings":{"type":"array","items":{"type":"string","minLength":1}}},"required":["autoImportNewPlugins","classification","connectorInstance","connectorTarget","discoveredPlugins","repositoryFullName","sourceRevisionRef","steps","treeSummary","warnings"]}},"required":["ok","item"]},"PluginArchGithubDiscoveryTreeEntry":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["blob","tree"]},"path":{"type":"string","minLength":1},"sha":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","path","sha","size"]},"PluginArchGithubDiscoveryTreeResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMapping":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorTargetId":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"mappingConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorTargetId","connectorType","remoteId","mappingKind","selector","objectType","pluginId","autoAddToPlugin","mappingConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveryApplyResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"createdMarketplace":{"anyOf":[{"$ref":"#/components/schemas/PluginArchMarketplace"},{"type":"null"}]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"createdPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"createdMappings":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"materializedConfigObjects":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"sourceRevisionRef":{"type":"string","minLength":1}},"required":["autoImportNewPlugins","connectorInstance","connectorTarget","createdPlugins","createdMappings","materializedConfigObjects","sourceRevisionRef"]}},"required":["ok","item"]},"PluginArchConnectorTargetListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorTargetMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["ok","item"]},"PluginArchConnectorTargetDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["item"]},"PluginArchConnectorSyncAsyncResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"queued":{"type":"boolean","const":true},"job":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"}},"required":["id"]}},"required":["ok","queued","job"]},"PluginArchConnectorMappingListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMappingMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"required":["ok","item"]},"PluginArchConnectorSyncSummary":{"type":"object","properties":{"createdCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"additionalProperties":{}},"PluginArchConnectorSyncEvent":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorTargetId":{"anyOf":[{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},{"type":"null"}]},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"eventType":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]},"externalEventRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"status":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},"summaryJson":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConnectorSyncSummary"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","connectorInstanceId","connectorTargetId","connectorType","remoteId","eventType","externalEventRef","sourceRevisionRef","status","summaryJson","startedAt","completedAt"]},"PluginArchConnectorSyncEventListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorSyncEventDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"required":["item"]},"PluginArchGithubSetupResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["connectorAccount","connectorInstance","connectorTarget"]}},"required":["ok","item"]},"PluginArchGithubRepositoryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchGithubValidateTargetResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"branchExists":{"type":"boolean"},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryAccessible":{"type":"boolean"}},"required":["branchExists","defaultBranch","repositoryAccessible"]}},"required":["ok","item"]},"ResourceSnapshotResponse":{"type":"object","properties":{"organizationId":{"type":"string"},"orgMemberId":{"type":"string"},"teamIds":{"type":"array","items":{"type":"string"}},"resources":{"type":"object","properties":{"llmProviders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"marketplaces":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"plugins":{"type":"array","items":{"type":"object","properties":{"pluginId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"configItems":{"type":"array","items":{"type":"object","properties":{"configItemId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["configItemId","lastUpdatedAt"]}}},"required":["pluginId","lastUpdatedAt","configItems"]}}},"required":["lastUpdatedAt","plugins"]}}},"required":["llmProviders","marketplaces"]}},"required":["organizationId","orgMemberId","teamIds","resources"]},"TeamResponse":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"managedByScim":{"type":"boolean"}},"required":["id","organizationId","name","createdAt","updatedAt","memberIds","managedByScim"]}},"required":["team"]},"TelegramConnection":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","error"]},"connected":{"type":"boolean"},"bot":{"type":"object","properties":{"id":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"}},"required":["id","username","displayName"]},"worker":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]},"webhook":{"type":"object","properties":{"registered":{"type":"boolean"},"lastReceivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["registered","lastReceivedAt","lastError"]},"pairing":{"type":"object","properties":{"paired":{"type":"boolean"},"chat":{"anyOf":[{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"type":"string"},"pairedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["username","firstName","pairedAt"]},{"type":"null"}]}},"required":["paired","chat"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","status","connected","bot","worker","webhook","pairing","createdAt","updatedAt"]},"TelegramConnectionResponse":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/TelegramConnection"},{"type":"null"}]}},"required":["connection"]},"TelegramConnectionError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"TelegramPairingResponse":{"type":"object","properties":{"pairing":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"code":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["url","code","expiresAt"]}},"required":["pairing"]},"TelegramDeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"webhookDeleted":{"type":"boolean"}},"required":["ok","webhookDeleted"]},"TelegramCapabilityStatus":{"type":"object","properties":{"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","error"]},"connected":{"type":"boolean"},"bot":{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"}},"required":["username","displayName"]},"worker":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]},"webhook":{"type":"object","properties":{"registered":{"type":"boolean"},"lastReceivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["registered","lastReceivedAt"]},"pairing":{"type":"object","properties":{"paired":{"type":"boolean"}},"required":["paired"]}},"required":["id","status","connected","bot","worker","webhook","pairing"]},{"type":"null"}]}},"required":["connection"]},"TelegramSendResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messageIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["ok","messageIds"]},"DenAppVersionResponse":{"type":"object","properties":{"minAppVersion":{"type":"string"},"latestAppVersion":{"type":"string","minLength":1},"publishedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1}}},"required":["minAppVersion","latestAppVersion","publishedDesktopVersions"]},"PluginArchGithubWebhookIgnoredResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":false},"reason":{"type":"string","minLength":1}},"required":["ok","accepted","reason"]},"PluginArchGithubWebhookAcceptedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":true},"event":{"type":"string","enum":["push","installation","installation_repositories","repository"]},"deliveryId":{"type":"string","minLength":1},"queued":{"type":"boolean"}},"required":["ok","accepted","event","deliveryId","queued"]},"PluginArchGithubWebhookUnauthorizedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"invalid signature"}},"required":["ok","error"]},"StripeWebhookResponse":{"type":"object","properties":{"received":{"type":"boolean","const":true},"type":{"type":"string"}},"required":["received","type"]},"TelegramWebhookResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean"},"reason":{"type":"string"}},"required":["ok","accepted"]},"TelegramWebhookUnauthorized":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"invalid secret"}},"required":["ok","error"]},"TelegramWebhookPayloadTooLarge":{"type":"object","properties":{"error":{"type":"string","const":"payload_too_large"}},"required":["error"]},"WorkerHeartbeatResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"workerId":{"type":"string"},"isActiveRecently":{"type":"boolean"},"openSessionCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["ok","workerId","isActiveRecently","openSessionCount","lastHeartbeatAt","lastActiveAt"]},"WorkerBillingRetiredError":{"type":"object","properties":{"error":{"type":"string","const":"worker_billing_retired"},"message":{"type":"string"}},"required":["error","message"]},"WorkerInstance":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["provider","region","url","status","createdAt","updatedAt"]},{"type":"null"}]},"WorkerListResponse":{"type":"object","properties":{"workers":{"type":"array","items":{"type":"object","properties":{"instance":{"$ref":"#/components/schemas/WorkerInstance"},"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["instance","id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]}}},"required":["workers"]},"Worker":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]},"WorkerCreateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"instance":{"$ref":"#/components/schemas/WorkerInstance"},"launch":{"type":"object","properties":{"mode":{"type":"string"},"pollAfterMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mode","pollAfterMs"]}},"required":["worker","tokens","instance","launch"]},"OrganizationUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"organization_unavailable"}},"required":["error"]},"WorkspacePathRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"workspace_path_required"}},"required":["error"]},"WorkerUserEmailRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"user_email_required"}},"required":["error"]},"WorkerPaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"cloud_worker_billing_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"WorkerOrgLimitReachedError":{"type":"object","properties":{"error":{"type":"string","const":"org_limit_reached"},"limitType":{"type":"string","const":"workers"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"}},"required":["error","limitType","limit","currentCount","message"]},"WorkerResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"instance":{"$ref":"#/components/schemas/WorkerInstance"}},"required":["worker","instance"]},"WorkerUpdateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"}},"required":["worker"]},"WorkerTokensResponse":{"type":"object","properties":{"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"connect":{"anyOf":[{"type":"object","properties":{"openworkUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["openworkUrl","workspaceId"]},{"type":"null"}]}},"required":["tokens","connect"]},"WorkerConnectionError":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","const":"worker_tokens_unavailable"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","const":"worker_runtime_unavailable"},"message":{"type":"string"}},"required":["error","message"]}]},"WorkerRuntimeResponse":{"type":"object","properties":{},"additionalProperties":{}},"McpTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"string"}},"required":["token","expiresAt","organizationId","scopes","resource"]},"McpTokenOrganizationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"organization_required"},"message":{"type":"string"}},"required":["error","message"]},"TelemetryDimensionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"label":{"type":"string"},"sessionCount":{"type":"number"},"lastSeenAt":{"type":"string"}},"required":["type","value","label","sessionCount","lastSeenAt"]}}},"required":["items"]},"TelemetryAdoptionResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"weeklyTrend":{"type":"array","items":{"type":"number"}}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","weeklyTrend"]},"TelemetryAnalyticsResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"sessions7d":{"type":"number"},"sessions30d":{"type":"number"},"tasksCompleted7d":{"type":"number"},"tasksFailed7d":{"type":"number"},"tasksCompleted30d":{"type":"number"},"tasksFailed30d":{"type":"number"},"avgTaskDurationMs30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"weekly":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string"},"activeMembers":{"type":"number"},"sessions":{"type":"number"},"tasksCompleted":{"type":"number"},"tasksFailed":{"type":"number"}},"required":["weekStart","activeMembers","sessions","tasksCompleted","tasksFailed"]}}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","sessions7d","sessions30d","tasksCompleted7d","tasksFailed7d","tasksCompleted30d","tasksFailed30d","avgTaskDurationMs30d","weekly"]},"OpenApiDocument":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"}},"required":["title","version"],"additionalProperties":{}},"paths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"components":{"type":"object","properties":{},"additionalProperties":{}}},"required":["openapi","info","paths"],"additionalProperties":{}}}},"paths":{"/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Check den-api health","description":"Returns a lightweight health payload for den-api.","responses":{"200":{"description":"den-api is reachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiHealthResponse"}}}}}}},"/ready":{"get":{"operationId":"getReady","tags":["System"],"summary":"Check den-api readiness","description":"Verifies den-api can reach its database dependency.","responses":{"200":{"description":"den-api is ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}},"503":{"description":"den-api is not ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}}}}},"/v1/admin/users/{userId}":{"delete":{"operationId":"deleteV1AdminUsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/plan":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdPlan","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/free-seats":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdFreeSeats","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/capabilities":{"get":{"operationId":"getV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users":{"get":{"operationId":"getV1AdminUsers","tags":["Admin"],"summary":"Get a bounded admin user page","description":"Returns one bounded page of users plus required pagination metadata. Search runs across the global user set and optional billing enrichment stays page-scoped.","responses":{"200":{"description":"Admin user page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsersPageResponse"}}}},"400":{"description":"The admin user page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/organizations":{"get":{"operationId":"getV1AdminOrganizations","tags":["Admin"],"summary":"Get a bounded admin organization page","description":"Returns one bounded page of organizations plus required pagination metadata. Search runs across the global organization set without changing the global overview totals.","responses":{"200":{"description":"Admin organization page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationsPageResponse"}}}},"400":{"description":"The admin organization page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/metrics":{"get":{"operationId":"getV1AdminMetrics","tags":["Admin"],"summary":"Load deferred admin analytics","description":"Calculates analytics that are intentionally deferred from the initial admin page: verified users, worker totals, activity, recurrence, invites, and chart series.","responses":{"200":{"description":"Deferred admin analytics returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMetricsResponse"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/admin/overview":{"get":{"operationId":"getV1AdminOverview","tags":["Admin"],"summary":"Get admin overview","description":"Returns the initial admin overview with bounded user data, global totals, and required pagination metadata. Expensive analytics are loaded separately from /v1/admin/metrics.","responses":{"200":{"description":"Administrative overview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverviewResponse"}}}},"400":{"description":"The admin overview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be an authenticated admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/api/auth/scim/v2/Schemas":{"get":{"operationId":"getApiAuthScimV2Schemas","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes/Group":{"get":{"operationId":"getApiAuthScimV2ResourceTypesGroup","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes":{"get":{"operationId":"getApiAuthScimV2ResourceTypes","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups":{"get":{"operationId":"getApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}},"post":{"operationId":"postApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups/{groupId}":{"get":{"operationId":"getApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"delete":{"operationId":"deleteApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users/{userId}":{"put":{"operationId":"putApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users":{"post":{"operationId":"postApiAuthScimV2Users","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/oauth-authorization-server":{"get":{"operationId":"getApiAuthWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/openid-configuration":{"get":{"operationId":"getApiAuthWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server/api/auth":{"get":{"operationId":"getWellKnownOauthAuthorizationServerApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration/api/auth":{"get":{"operationId":"getWellKnownOpenidConfigurationApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"getWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration":{"get":{"operationId":"getWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/register":{"post":{"operationId":"postRegister","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/register":{"post":{"operationId":"postApiAuthOauth2Register","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/authorize":{"get":{"operationId":"getApiAuthOauth2Authorize","responses":{"200":{"description":"OK"}}}},"/v1/auth/login-options":{"get":{"operationId":"getV1AuthLoginOptions","tags":["Authentication"],"summary":"Resolve deterministic login option","description":"Returns the deterministic next authentication step for an email address. SSO is preferred before Google, password, GitHub compatibility, and new account creation.","responses":{"200":{"description":"Login option resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginOptionsResponse"}}}},"400":{"description":"The login option query parameters were invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"email","schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"required":true}]}},"/v1/bootstrap/workspace":{"post":{"operationId":"postV1BootstrapWorkspace","tags":["Bootstrap"],"summary":"Create a provisional workspace for agent-first setup","description":"Creates a provisional workspace, setup member, starter skill, and short-lived claim links without requiring an email account first.","responses":{"200":{"description":"Workspace bootstrap completed.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","const":"provisional"}},"required":["id","name","slug","status"]},"setup":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wbt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wbt_.*"},"expiresAt":{"type":"string"}},"required":["id","expiresAt"]},"skill":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"title":{"type":"string"},"output":{"type":"string","const":"OPENWORK_BOOTSTRAP_SKILL_TRIGGERED"}},"required":["id","title","output"]},"claimLinks":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wcl_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wcl_.*"},"role":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","role","token","url","expiresAt"]}}},"required":["ok","organization","setup","skill","claimLinks"]}}}},"400":{"description":"The bootstrap request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceName":{"type":"string","minLength":2,"maxLength":120},"skillName":{"default":"First OpenWork Skill","type":"string","minLength":1,"maxLength":120},"devicePublicKey":{"type":"string","minLength":16,"maxLength":4096},"claimRoles":{"default":["owner"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["owner","admin","member"]}},"ownerEmail":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"teammateEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["workspaceName"]}}}}}},"/v1/bootstrap/claims/accept":{"post":{"operationId":"postV1BootstrapClaimsAccept","tags":["Bootstrap"],"summary":"Claim a provisional workspace","description":"Lets a signed-in human claim ownership or membership of a provisional agent-created workspace.","responses":{"200":{"description":"Workspace claim accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string"}},"required":["id","name","slug","role"]}},"required":["ok","organization"]}}}},"400":{"description":"The claim request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to claim a workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller cannot accept this claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The claim token was missing, expired, or already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":24,"maxLength":255}},"required":["token"]}}}}}},"/v1/skill-hubs":{"post":{"operationId":"postV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"Create skill hub","description":"Create skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}},"get":{"operationId":"getV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"List skill hubs","description":"List skill hubs. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}}},"/v1/skill-hubs/{skillHubId}":{"patch":{"operationId":"patchV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Update skill hub","description":"Update skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]},"delete":{"operationId":"deleteV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Delete skill hub","description":"Delete skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills":{"post":{"operationId":"postV1SkillHubsBySkillHubIdSkills","tags":["Deprecated"],"deprecated":true,"summary":"Add skill to skill hub","description":"Add skill to skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills/{skillId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdSkillsBySkillId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill from skill hub","description":"Remove skill from skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"skillId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access":{"post":{"operationId":"postV1SkillHubsBySkillHubIdAccess","tags":["Deprecated"],"deprecated":true,"summary":"Grant skill hub access","description":"Grant skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access/{accessId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdAccessByAccessId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill hub access","description":"Remove skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"accessId","required":true}]}},"/v1/dev/emails":{"get":{"operationId":"getV1DevEmails","responses":{"200":{"description":"OK"}}}},"/v1/dev/emails/last":{"get":{"operationId":"getV1DevEmailsLast","responses":{"200":{"description":"OK"}}}},"/v1/me":{"get":{"operationId":"getV1Me","tags":["Users"],"summary":"Get current user","description":"Returns the currently authenticated user and active session details for the caller.","responses":{"200":{"description":"Current user and session returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserResponse"}}}},"401":{"description":"The caller must be signed in to read profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/me/orgs":{"get":{"operationId":"getV1MeOrgs","tags":["Users"],"summary":"List current user's organizations","description":"Lists the organizations visible to the current user and marks which organization is currently active.","responses":{"200":{"description":"Current user organizations returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserOrganizationsResponse"}}}}}}},"/v1/me/send-download-link":{"post":{"operationId":"postV1MeSendDownloadLink","tags":["Users"],"summary":"Send current user the OpenWork desktop download link","description":"Emails the authenticated user a link to download the OpenWork desktop app.","responses":{"200":{"description":"Download link email sent successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkResponse"}}}},"400":{"description":"The signed-in account is missing an email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request a download link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"429":{"description":"The user has requested too many download links recently.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkRateLimitError"}}}},"502":{"description":"The download link email provider rejected or failed to deliver the email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkEmailFailedError"}}}}}}},"/v1/me/profile":{"patch":{"operationId":"patchV1MeProfile","tags":["Users"],"summary":"Update current user profile","description":"Updates the signed-in user's display name.","responses":{"200":{"description":"Current user profile updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCurrentUserProfileResponse"}}}},"400":{"description":"The profile update request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","maxLength":120},"lastName":{"type":"string","maxLength":120}},"required":["firstName","lastName"]}}}}}},"/v1/me/desktop-config":{"get":{"operationId":"getV1MeDesktopConfig","tags":["Users"],"summary":"Get current user's desktop config","description":"Returns the authenticated desktop app restrictions for the caller's active organization.","responses":{"200":{"description":"Current user desktop config returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserDesktopConfigResponse"}}}},"401":{"description":"The caller must be signed in to read desktop config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/memory":{"post":{"operationId":"postV1Memory","tags":["Memory"],"summary":"Save a memory to the memory bank. Body: { content: string (required); tags?: string[]; contexts?: Array<{ snippet: string (required); conversation_id?: string; message_id?: string; origin?: \"active_conversation\" | \"searched_conversation\" }> }.","description":"Persists a human-confirmed memory for the calling user. The server sets the source and always stores it as a personal ('user') memory regardless of any scope sent by the client.","responses":{"201":{"description":"Memory saved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMemoryResponse"}}}},"400":{"description":"The save payload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to save a memory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The caller has no active organization they are a member of to save the memory to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMemoryRequest"}}}}},"get":{"operationId":"getV1Memory","tags":["Memory"],"summary":"List your saved memories with their provenance.","description":"Returns the caller's own memories, newest first, each with its captured context (citations + snippets).","responses":{"200":{"description":"Memories returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"400":{"description":"The list query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/memory/search":{"get":{"operationId":"getV1MemorySearch","tags":["Memory"],"summary":"Search your memories with a natural-language query.","description":"Runs a relevance-ranked full-text search over the caller's own memories. Returns an empty result set (not an error) when nothing matches.","responses":{"200":{"description":"Search results returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchResponse"}}}},"400":{"description":"The search query was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to search memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":512},"required":true},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]}},"/v1/memory/{id}":{"delete":{"operationId":"deleteV1MemoryById","tags":["Memory"],"summary":"Delete one of your saved memories.","description":"Hard-deletes a memory and its captured context rows. Returns 404 for an id the caller does not own.","responses":{"204":{"description":"Memory deleted successfully."},"400":{"description":"The memory id path parameter was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The memory could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/v1/org":{"patch":{"operationId":"patchV1Org","tags":["Organizations"],"summary":"Update organization","description":"Updates organization fields. Workspace owners and super-admins can change settings. The slug is immutable to avoid breaking dashboard URLs.","responses":{"200":{"description":"Organization updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"400":{"description":"The organization update request body was invalid, contained malformed email domains, or contained an invalid brand icon URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationBadRequest"}}}},"401":{"description":"The caller must be signed in to update an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Enabling enforced SSO or desktop version controls requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"The caller does not have permission to update the requested organization fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"allowedEmailDomains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"allowedDesktopVersions":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},{"type":"null"}]},"requireSso":{"type":"boolean"},"brandAppName":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"brandLogoUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandIconUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandAccentColor":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]}}}}}}},"get":{"operationId":"getV1Org","tags":["Organizations"],"summary":"Get active organization","description":"Returns the active organization from the current session, including its owner, the current member record, and their team memberships.","responses":{"200":{"description":"Organization context returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}},"401":{"description":"The caller must be signed in to load organization context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/orgs/invitations/preview":{"get":{"operationId":"getV1OrgsInvitationsPreview","tags":["Invitations"],"summary":"Preview organization invitation","description":"Returns invitation preview details so a user can inspect an organization invite before accepting it.","responses":{"200":{"description":"Invitation preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"400":{"description":"The invitation preview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"query","name":"id","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/orgs/invitations/accept":{"post":{"operationId":"postV1OrgsInvitationsAccept","tags":["Invitations"],"summary":"Accept organization invitation","description":"Accepts an organization invitation for the current signed-in user and switches their active organization to the accepted workspace.","responses":{"200":{"description":"Invitation accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptedResponse"}}}},"400":{"description":"The invitation acceptance request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to accept an invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot accept invitations, or the deployment requires a verified account email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The current account email is not allowed to join this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEmailDomainNotAllowedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255}},"required":["id"]}}}}}},"/v1/api-keys":{"get":{"operationId":"getV1ApiKeys","tags":["API Keys"],"summary":"List organization API keys","description":"Returns the API keys that belong to the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}}},"post":{"operationId":"postV1ApiKeys","tags":["API Keys"],"summary":"Create an organization API key","description":"Creates a new API key for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyRequest"}}}}}},"/v1/brand-assets/{organizationId}/{kind}/{version}":{"get":{"operationId":"getV1BrandAssetsByOrganizationIdByKindByVersion","tags":["Organizations"],"summary":"Read an immutable organization brand asset","description":"Serves a capability-signed, content-addressed organization logo or app icon from this Den deployment.","responses":{"200":{"description":"Immutable brand image bytes."},"404":{"description":"The managed brand asset could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"kind","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/v1/org/brand-assets":{"post":{"operationId":"postV1OrgBrandAssets","tags":["Organizations"],"summary":"Upload organization brand assets","description":"Validates and stores owner-supplied wordmark and app icon files inside the Den deployment.","responses":{"200":{"description":"Managed brand assets were saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBrandAssetUploadResponse"}}}},"400":{"description":"A supplied brand asset was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can upload brand assets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"413":{"description":"The upload exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}}}}},"/v1/desktop-policies":{"get":{"operationId":"getV1DesktopPolicies","tags":["Desktop Policies"],"summary":"List desktop policies","responses":{"200":{"description":"Desktop policies returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyListResponse"}}}},"401":{"description":"The caller must be signed in to list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DesktopPolicies","tags":["Desktop Policies"],"summary":"Create desktop policy","responses":{"201":{"description":"Desktop policy created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"A referenced member or team was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["policyName","policy"]}}}}}},"/v1/desktop-policies/{desktopPolicyId}":{"patch":{"operationId":"patchV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Update desktop policy","responses":{"200":{"description":"Desktop policy updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy or a referenced resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^dpo_.*"},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["policyName","policy"]}}}}},"delete":{"operationId":"deleteV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Delete desktop policy","responses":{"204":{"description":"Desktop policy deleted successfully."},"401":{"description":"The caller must be signed in to delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^dpo_.*"},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}]}},"/v1/diagnostics/egress":{"get":{"operationId":"getV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Describe the controlled Den egress diagnostic","description":"Reports whether the operator-configured public Diagnostics target is available. The target cannot be supplied by the browser.","responses":{"200":{"description":"Egress diagnostic configuration returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"targetOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["available","targetOrigin","missingConfiguration"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can inspect egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Run the controlled Den egress diagnostic","description":"Runs fixed HTTP, redirect, OAuth-shaped, and MCP probes from the Den process to the operator-configured public Diagnostics origin.","responses":{"200":{"description":"The completed diagnostic run, including a failed result when a layer did not pass.","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetOrigin":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"overallStatus":{"type":"string","enum":["passed","failed"]},"highestPassingStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"failedStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"steps":{"minItems":6,"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},"label":{"type":"string","minLength":1,"maxLength":120},"category":{"type":"string","enum":["connectivity","http","oauth","mcp"]},"status":{"type":"string","enum":["passed","failed","skipped"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"httpStatuses":{"maxItems":16,"type":"array","items":{"type":"integer","minimum":100,"maximum":599}},"diagnosticIds":{"maxItems":16,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"code":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"message":{"type":"string","minLength":1,"maxLength":500},"owner":{"type":"string","enum":["den-operator","network-administrator","openwork-support"]},"action":{"type":"string","minLength":1,"maxLength":500}},"required":["id","label","category","status","startedAt","completedAt","durationMs","httpStatuses","diagnosticIds","code","message","owner","action"]}}},"required":["runId","targetOrigin","supportUrl","startedAt","completedAt","overallStatus","highestPassingStep","failedStep","steps"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can run egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"503":{"description":"The Den operator has not configured the Diagnostics target.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"egress_diagnostics_not_configured"},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["error","missingConfiguration"]}}}}}}},"/v1/diagnostics/egress/token":{"put":{"operationId":"putV1DiagnosticsEgressToken","tags":["Diagnostics"],"summary":"Set the organization egress diagnostic bearer token","description":"Stores the synthetic Diagnostics bearer token encrypted for this organization. The token is never returned by the API.","responses":{"204":{"description":"The diagnostic token was stored."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can configure egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/inference":{"get":{"operationId":"getV1Inference","tags":["Inference"],"summary":"Get inference settings","description":"Returns OpenWork Models enablement and limit context for the active organization.","responses":{"200":{"description":"Inference settings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"401":{"description":"The caller must be signed in to read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"patch":{"operationId":"patchV1Inference","tags":["Inference"],"summary":"Update inference settings","description":"Enables or disables OpenWork Models for the active organization.","responses":{"200":{"description":"Inference settings updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"400":{"description":"The inference settings request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InferenceProviderMissingError"}]}}}},"401":{"description":"The caller must be signed in to update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]}},"required":["enabled"]}}}}}},"/v1/scim":{"get":{"operationId":"getV1Scim","tags":["SCIM"],"summary":"Get organization SCIM connection","description":"Returns the SCIM provisioning base URL, group-to-team mapping mode, and current connector metadata for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}},"patch":{"operationId":"patchV1Scim","tags":["SCIM"],"summary":"Update organization SCIM settings","description":"Controls whether provisioned SCIM Groups remain metadata or create and manage organization teams.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Only workspace owners and super-admins can manage SCIM."},"404":{"description":"SCIM connection not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]}},"required":["groupMappingMode"]}}}}},"delete":{"operationId":"deleteV1Scim","tags":["SCIM"],"summary":"Delete an organization SCIM connection","description":"Deletes the organization SCIM connection and invalidates the current bearer token.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SCIM connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/scim/token":{"post":{"operationId":"postV1ScimToken","tags":["SCIM"],"summary":"Create or rotate an organization SCIM token","description":"Creates the organization SCIM provisioning connector if needed and returns a freshly rotated bearer token.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SCIM token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateOrganizationScimTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}},"409":{"description":"An enabled SSO connection is required before creating or rotating a SCIM token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimSsoRequiredError"}}}}}}},"/v1/scim/reconcile":{"post":{"operationId":"postV1ScimReconcile","tags":["SCIM"],"summary":"Run organization SCIM drift reconciliation","description":"Checks local SCIM-managed identities for inconsistent organization membership or provider-account state and records unresolved drift for retry or manual review.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SCIM reconciliation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimReconciliationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/sso":{"get":{"operationId":"getV1Sso","tags":["SSO"],"summary":"Get organization SSO connection","description":"Returns the current organization SSO connection and setup URLs.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SSO configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}},"delete":{"operationId":"deleteV1Sso","tags":["SSO"],"summary":"Delete organization SSO connection","description":"Deletes the active organization SSO connection.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/saml":{"post":{"operationId":"postV1SsoSaml","tags":["SSO"],"summary":"Register organization SAML SSO","description":"Registers or replaces the active organization SAML SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/oidc":{"post":{"operationId":"postV1SsoOidc","tags":["SSO"],"summary":"Register organization OIDC SSO","description":"Registers or replaces the active organization OIDC SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/metadata":{"get":{"operationId":"getV1SsoMetadata","tags":["SSO"],"summary":"Get organization SAML SP metadata","description":"Returns the generated Service Provider metadata for the current organization's SAML connection.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SAML metadata document"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/request-domain-verification":{"post":{"operationId":"postV1SsoRequestDomainVerification","tags":["SSO"],"summary":"Request an SSO domain verification token","description":"Returns the DNS TXT verification token for the current organization's SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Domain verification token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoDomainVerificationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/verify-domain":{"post":{"operationId":"postV1SsoVerifyDomain","tags":["SSO"],"summary":"Verify the organization SSO domain","description":"Checks the provider's DNS TXT record and marks the domain as verified when present.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO domain verified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/invitations":{"post":{"operationId":"postV1Invitations","tags":["Invitations"],"summary":"Create organization invitation","description":"Creates or refreshes a pending organization invitation for an email address and sends the invite email. Returns 502 when the invitation row is persisted but the configured email provider failed to send; the client should surface the error and give the user a retry affordance.","responses":{"200":{"description":"Existing invitation refreshed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"201":{"description":"Invitation created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"400":{"description":"The invitation request body or path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to invite organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"A seat subscription is required before inviting more members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePaymentRequiredError"}}}},"403":{"description":"Only workspace owners and admins can create invitations. Admins can only invite members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The email address is outside this workspace's allowed domains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteEmailDomainNotAllowedError"}}}},"502":{"description":"The invitation was saved but the email provider rejected or failed to deliver it. Retry by submitting the same email again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationEmailFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","minLength":1,"maxLength":64}},"required":["email","role"]}}}}}},"/v1/invitations/{invitationId}/cancel":{"post":{"operationId":"postV1InvitationsByInvitationIdCancel","tags":["Invitations"],"summary":"Cancel organization invitation","description":"Cancels a pending organization invitation so the invite link can no longer be used.","responses":{"200":{"description":"Invitation cancelled successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The invitation cancellation path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"invitationId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"required":true,"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix."}]}},"/v1/orgs/{organizationId}/install-links":{"post":{"operationId":"postV1OrgsByOrganizationIdInstallLinks","tags":["Organizations"],"summary":"Create organization install link","description":"Mints a shareable OpenWork desktop install link for a signed-in organization member. Older active links remain valid unless an owner or admin explicitly requests rotation.","responses":{"200":{"description":"Install link created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkResponse"}}}},"400":{"description":"The install-link request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The organization needs the installLinks capability enabled, and only workspace owners and admins can rotate existing links.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/CapabilityDisabledError"}]}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"The member has created too many install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkRequest"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}]}},"/v1/install-config":{"get":{"operationId":"getV1InstallConfig","tags":["Organizations"],"summary":"Resolve install-link configuration","description":"Returns organization setup details and a fresh desktop connection handoff for a valid install link token.","responses":{"200":{"description":"Install configuration resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallExperienceConfig"}}}},"400":{"description":"The install-link token was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many install-link attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true}]}},"/v1/install-connect/preview":{"post":{"operationId":"postV1InstallConnectPreview","tags":["Organizations"],"summary":"Preview desktop connection","description":"Resolves a short-lived organization connection code without consuming it.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install-connect/exchange":{"post":{"operationId":"postV1InstallConnectExchange","tags":["Organizations"],"summary":"Accept desktop connection","description":"Consumes a short-lived organization connection code exactly once.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install/{platform}":{"get":{"operationId":"getV1InstallByPlatform","tags":["Organizations"],"summary":"Download OpenWork installer","description":"Always serves the OpenWork installer for the requested platform. By default Den redirects to the public release asset; operators can optionally mount installer artifacts for an air-gapped mirror.","responses":{"200":{"description":"Installer artifact returned successfully.","content":{"text/plain":{"schema":{"type":"string"}}}},"302":{"description":"Den redirected the browser to the public OpenWork installer release asset."},"400":{"description":"The install-link token or platform was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many installer download attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true},{"schema":{"type":"string"},"in":"path","name":"platform","required":true}]}},"/v1/llm-providers/test-connection":{"post":{"operationId":"postV1LlmProvidersTestConnection","tags":["LLM Providers"],"summary":"Test a custom LLM provider endpoint","description":"Probes an OpenAI-compatible endpoint (Azure AI Foundry, LiteLLM, vLLM, gateways) with the given credential: normalizes common base-URL mistakes, calls GET /models, and returns the model ids the endpoint actually serves — on Azure these are the deployment names. Nothing is stored.","responses":{"200":{"description":"Probe completed (ok=false carries a human hint).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderTestConnectionResponse"}}}},"400":{"description":"The probe request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to test provider endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"api":{"type":"string","minLength":1,"maxLength":2048},"apiKey":{"type":"string","maxLength":65535},"modelIds":{"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["api"]}}}}}},"/v1/llm-provider-catalog":{"get":{"operationId":"getV1LlmProviderCatalog","tags":["LLM Providers"],"summary":"List LLM provider catalog","description":"Lists the provider catalog from models.dev so an organization can choose which LLM providers to configure.","responses":{"200":{"description":"Provider catalog returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogListResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to browse the provider catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}}}},"/v1/llm-provider-catalog/{providerId}":{"get":{"operationId":"getV1LlmProviderCatalogByProviderId","tags":["LLM Providers"],"summary":"Get LLM provider catalog entry","description":"Returns the full models.dev catalog record for one provider, including its config template and model list.","responses":{"200":{"description":"Provider catalog entry returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect provider catalog entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The requested provider catalog entry could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/llm-providers":{"get":{"operationId":"getV1LlmProviders","tags":["LLM Providers"],"summary":"List organization LLM providers","description":"Lists usable providers by default. Pass scope=manageable to list providers the current member can administer in Den.","responses":{"200":{"description":"Accessible organization LLM providers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderListResponse"}}}},"400":{"description":"The provider list path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1LlmProviders","tags":["LLM Providers"],"summary":"Create organization LLM provider","description":"Creates a new organization-scoped LLM provider from either a models.dev provider template, pasted JSON/JSONC custom configuration, or MCP-supplied customConfig object.","responses":{"201":{"description":"Organization LLM provider created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"A referenced provider, model, member, or team could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["name","source"]}}}}}},"/v1/llm-providers/{llmProviderId}/connect":{"get":{"operationId":"getV1LlmProvidersByLlmProviderIdConnect","tags":["LLM Providers"],"summary":"Get LLM provider connect payload","description":"Returns one accessible organization LLM provider with the concrete model configuration needed to connect to it.","responses":{"200":{"description":"Provider connection payload returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider connect path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect to an organization LLM provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only members with explicit member or team access grants can connect to this provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}":{"patch":{"operationId":"patchV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Update organization LLM provider","description":"Updates an existing organization LLM provider, including its provider config, selected models, secret, and access grants. Custom providers accept JSON/JSONC text or an MCP-supplied customConfig object.","responses":{"200":{"description":"Organization LLM provider updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can update providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or a referenced resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["name","source"]}}}}},"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Delete organization LLM provider","description":"Deletes an organization LLM provider and removes its models and access rules.","responses":{"204":{"description":"Organization LLM provider deleted successfully."},"400":{"description":"The provider deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can delete providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/access/{accessId}":{"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderIdAccessByAccessId","tags":["LLM Providers"],"summary":"Remove LLM provider access grant","description":"Removes one explicit member or team access grant from an organization LLM provider.","responses":{"204":{"description":"Organization LLM provider access removed successfully."},"400":{"description":"The provider access deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The request tried to remove a protected provider access entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."},{"in":"path","name":"accessId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpa_.*"},"required":true,"description":"Den TypeID with 'lpa_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}/role":{"post":{"operationId":"postV1MembersByMemberIdRole","tags":["Members"],"summary":"Update member role","description":"Changes the role assigned to a specific organization member.","responses":{"200":{"description":"Member role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The member role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":64}},"required":["role"]}}}}}},"/v1/members/{memberId}/transfer-ownership":{"post":{"operationId":"postV1MembersByMemberIdTransferOwnership","tags":["Members"],"summary":"Transfer workspace ownership","description":"Transfers the protected workspace owner role to another active super-admin member.","responses":{"200":{"description":"Workspace ownership transferred successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The ownership transfer request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners can transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The target member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}":{"delete":{"operationId":"deleteV1MembersByMemberId","tags":["Members"],"summary":"Remove organization member","description":"Removes a member from an organization while protecting the owner role from deletion.","responses":{"204":{"description":"Member removed successfully."},"400":{"description":"The member removal request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can remove members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/oauth-providers/{providerId}/client":{"post":{"operationId":"postV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Save an org's OAuth client for a provider","description":"Admin-only. Lets an org bring its own OAuth app (client id + secret) for a native provider such as google-workspace, instead of relying on an OpenWork-owned client.","responses":{"200":{"description":"OAuth client saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigResponse"}}}},"400":{"description":"The request body or providerId was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure an OAuth client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"tenantId":{"type":"string","minLength":1,"maxLength":253}}}}}}},"get":{"operationId":"getV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Get an org's OAuth client configuration for a provider","description":"Admin-only. Returns setup status, the saved OAuth client id when configured, selected permission features, the callback redirect URI, and the full scope list members will be asked to approve. Never returns the client secret.","responses":{"200":{"description":"OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigDetailResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can view an OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/connect/start":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member's account for a provider","description":"Returns an authorize URL to redirect the member's browser to. Requires the org to have already saved an OAuth client for this provider.","responses":{"200":{"description":"Authorize URL to redirect to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConnectStartResponse"}}}},"400":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/mcp-connections/google-workspace/connect/start":{"get":{"operationId":"getV1McpConnectionsGoogleWorkspaceConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Google Workspace","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/mcp-connections/microsoft-365/connect/start":{"get":{"operationId":"getV1McpConnectionsMicrosoft365ConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Microsoft 365","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/oauth-providers/{providerId}/connect/callback":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for a provider","description":"The provider redirects here with code+state after the member consents. Identity is carried entirely by the signed state token, not a session cookie, since the redirect may arrive in a fresh browser context. Serves a small static HTML page that deep-links back to OpenWork.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/status":{"get":{"operationId":"getV1OauthProvidersByProviderIdStatus","tags":["Capability Sources"],"summary":"Check whether the calling member has connected a provider","description":"Read-only. Never returns a token — only whether a connection exists and which scopes/account it covers. Safe to expose to a harness so it can detect \"not connected\" and tell the human what to do.","responses":{"200":{"description":"Connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProviderStatusResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/disconnect":{"post":{"operationId":"postV1OauthProvidersByProviderIdDisconnect","tags":["Capability Sources"],"summary":"Disconnect the calling member's account for a provider","description":"Removes the stored credential. Mutation — intentionally kept out of the agent-callable MCP surface (see policy.ts BLOCKED_OPERATION_IDS).","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/capabilities/google-workspace/gmail-messages":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessages","tags":["Capability Sources"],"summary":"List or search Gmail messages as the calling member","description":"Reads and searches inbox mail in the calling member's Gmail mailbox, using the Google account they connected through the org Google Workspace connection. Returns needs_connection when the member has not connected their Google account yet or the connection lacks Gmail read permission.","responses":{"200":{"description":"Gmail messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Gmail search query, using Gmail's search syntax."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/google-workspace/gmail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessageByMessageId","tags":["Capability Sources"],"summary":"Read a Gmail message with its plain-text body as the calling member","description":"Reads one Gmail message, including decoded plain-text body content and attachment metadata, using the calling member's connected Google Workspace account. To download an attachment's bytes, pass its attachmentId to the gmail-attachment capability.","responses":{"200":{"description":"Gmail message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id."}]}},"/v1/capabilities/google-workspace/gmail-attachment/{messageId}/{attachmentId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailAttachmentByMessageIdByAttachmentId","tags":["Capability Sources"],"summary":"Download a Gmail attachment's bytes as the calling member","description":"Downloads one Gmail attachment (file) as base64-encoded bytes, using the messageId and the attachmentId from the gmail-message capability's attachments metadata. Decode dataBase64 locally to reconstruct the file, e.g. a PDF or spreadsheet, then extract its contents.","responses":{"200":{"description":"Gmail attachment returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachmentResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id that contains the attachment."},{"in":"path","name":"attachmentId","schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"description":"Attachment id from the gmail-message capability's attachments metadata."}]}},"/v1/capabilities/google-workspace/calendar-events":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"List Google Calendar events in a time range as the calling member","description":"Lists primary-calendar events for the calling member in a requested ISO time range, using their connected Google Workspace account.","responses":{"200":{"description":"Google Calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"Create a Google Calendar event as the calling member","description":"Creates an event on the calling member's primary Google Calendar, using their connected Google Workspace account. Set createMeetLink to true to request a Google Meet conferencing link and return meetLink.","responses":{"200":{"description":"Google Calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/calendar-event/{eventId}":{"patch":{"operationId":"patchV1CapabilitiesGoogleWorkspaceCalendarEventByEventId","tags":["Capability Sources"],"summary":"Add a Google Meet link to a Calendar event","description":"Updates one primary-calendar event by id to request Google Meet conferencing, using the calling member's connected Google Workspace account. Use this for an existing event that needs a Meet link without creating a duplicate.","responses":{"200":{"description":"Google Calendar event updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"eventId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Calendar event id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/drive-files":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFiles","tags":["Capability Sources"],"summary":"Search Google Drive files as the calling member","description":"Searches the calling member's Google Drive files by name and full text, using their connected Google Workspace account.","responses":{"200":{"description":"Google Drive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in Drive file names and full text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]},"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceDriveFiles","tags":["Capability Sources"],"summary":"Upload file bytes to Google Drive as the calling member","description":"Creates a file in the calling member's Google Drive using standard base64 bytes. The gmail-attachment capability returns dataBase64 in this exact encoding — pass it through directly to save an email attachment to Drive. The response file.webViewLink is the user-facing link — share it with the user.","responses":{"200":{"description":"Google Drive file uploaded. The file.webViewLink is the user-facing link — share it with the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUploadDriveFileResponse"}}}},"400":{"description":"The upload request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUploadDriveFileBody"}}}}}},"/v1/capabilities/google-workspace/drive-file/{fileId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFileByFileId","tags":["Capability Sources"],"summary":"Read a Google Drive file's text content as the calling member","description":"Reads text from one Google Drive file, exporting Google Docs editors files as plain text and downloading other files as UTF-8 text with truncation.","responses":{"200":{"description":"Google Drive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}]}},"/v1/capabilities/google-workspace/drive-file-share/{fileId}":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceDriveFileShareByFileId","tags":["Capability Sources"],"summary":"Share a Google Drive file with a person or the organization","description":"Creates a Drive permission for one file using the calling member's Google Workspace account. To share with one person pass type=user plus emailAddress; to share with the entire organization pass type=domain plus the org's Google Workspace domain (e.g. openworklabs.com). Sharing files not created through OpenWork needs the Full Drive access feature enabled by an admin.","responses":{"200":{"description":"Google Drive file shared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileResponse"}}}},"400":{"description":"The share request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileBody"}}}}}},"/v1/capabilities/google-workspace/gmail-drafts":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceGmailDrafts","tags":["Capability Sources"],"summary":"Create a Gmail draft or threaded reply draft; attach workspace files with body.attachments: [{ filename, mimeType, dataBase64 }], where dataBase64 is each attachment's file bytes encoded as standard base64","description":"Creates a plain-text Gmail draft in the calling member own mailbox, with optional Cc/Bcc recipients and files read from the active workspace. Set threadId to attach the draft to an existing Gmail thread as a reply using the thread's matching subject; threadId is required for replies and forwards. For threaded drafts, OpenWork appends the quoted conversation automatically. Always share the returned draftUrl with the user because it opens the ready-to-send draft in Gmail for review and send. Returns needs_connection when the member has not connected their Google account yet or when a threaded reply needs Gmail read permission.","responses":{"200":{"description":"Draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDraftResponse"}}}},"400":{"description":"The draft request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/GoogleWorkspaceMissingThreadIdError"}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":3,"maxLength":320,"description":"Recipient email address."},"cc":{"description":"Optional comma-separated Cc email addresses.","type":"string","minLength":3,"maxLength":1000},"bcc":{"description":"Optional comma-separated Bcc email addresses.","type":"string","minLength":3,"maxLength":1000},"subject":{"type":"string","minLength":1,"maxLength":500,"description":"Draft subject line. For replies or forwards, include threadId; subjects starting with Re: or Fwd: are rejected without threadId so the draft stays on the existing conversation."},"body":{"type":"string","minLength":1,"maxLength":50000,"description":"Plain-text draft body. Write plain prose with no markdown syntax, separate paragraphs with blank lines, and do not hard-wrap prose. For threaded drafts, the server appends the quoted conversation automatically; do not include quoted history."},"threadId":{"description":"Gmail thread id to reply on. Required for replies and forwards; get it from the gmail-messages capability. When set, the draft is attached to that thread as a reply — keep the thread's subject (e.g. 'Re: …').","type":"string","minLength":1,"maxLength":512},"attachments":{"description":"Optional files from the active workspace to attach to this draft.","minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Filename to show in Gmail."},"mimeType":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$","description":"Attachment MIME type."},"dataBase64":{"type":"string","minLength":1,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"File bytes encoded as standard base64. Read the file from the active workspace and base64-encode it. Maximum decoded size: 10 MiB per file and 20 MiB total."}},"required":["filename","mimeType","dataBase64"],"additionalProperties":false}}},"required":["to","subject","body"],"additionalProperties":false}}}}}},"/v1/capabilities/microsoft-365/mail-messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessages","tags":["Capability Sources"],"summary":"List or search Outlook mail as the calling member","description":"Reads recent Outlook messages from the calling member's connected Microsoft 365 account. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Outlook message search text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/microsoft-365/mail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessageByMessageId","tags":["Capability Sources"],"summary":"Read an Outlook message as the calling member","description":"Reads one Outlook message and requests its body as plain text, using the calling member's delegated Microsoft 365 connection.","responses":{"200":{"description":"Outlook message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph message id."}]}},"/v1/capabilities/microsoft-365/calendar-events":{"get":{"operationId":"getV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"List Microsoft 365 calendar events as the calling member","description":"Lists the calling member's Outlook calendar events in a requested time range. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"Create an Outlook calendar event as the calling member","description":"Creates an event in the calling member's default calendar. Adding attendees can send Microsoft calendar invitations.","responses":{"200":{"description":"Outlook calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventBody"}}}}}},"/v1/capabilities/microsoft-365/drive-files":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Search OneDrive files as the calling member","description":"Searches the calling member's OneDrive by name and content, returning source links. This capability is delegated and read-only.","responses":{"200":{"description":"OneDrive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in OneDrive file names and content."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]},"put":{"operationId":"putV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Create or replace a OneDrive text file as the calling member","description":"Creates or replaces a bounded UTF-8 text file at a path in the calling member's OneDrive.","responses":{"200":{"description":"OneDrive file written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteBody"}}}}}},"/v1/capabilities/microsoft-365/drive-file/{itemId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFileByItemId","tags":["Capability Sources"],"summary":"Read a OneDrive text file as the calling member","description":"Returns OneDrive metadata, source link, and bounded UTF-8 text content. Folders, large files, and binary Office files return metadata with an explicit contentUnavailableReason instead of decoding unsafe binary data.","responses":{"200":{"description":"OneDrive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"itemId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph drive item id."}]}},"/v1/capabilities/microsoft-365/mail-drafts":{"post":{"operationId":"postV1CapabilitiesMicrosoft365MailDrafts","tags":["Capability Sources"],"summary":"Create an Outlook draft as the calling member","description":"Creates a draft in the calling member's mailbox. It never sends the message. Microsoft requires delegated Mail.ReadWrite for draft creation.","responses":{"200":{"description":"Outlook draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftBody"}}}}}},"/v1/capabilities/microsoft-365/teams-chats":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChats","tags":["Capability Sources"],"summary":"List Microsoft Teams chats as the calling member","description":"Lists the calling member's Microsoft Teams chats using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chats returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsChatsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]}},"/v1/capabilities/microsoft-365/teams-chats/{chatId}/messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"List messages in a Microsoft Teams chat as the calling member","description":"Reads recent messages from one Teams chat using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chat messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true},{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"Send a message to an existing Microsoft Teams chat as the calling member","description":"Sends one message to an existing Teams chat. The operation cannot create a new chat.","responses":{"200":{"description":"Teams chat message sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageBody"}}}}}},"/v1/mcp-connections/discover":{"post":{"operationId":"postV1McpConnectionsDiscover","tags":["Authentication"],"summary":"Discover external MCP connection requirements","description":"Admin-only, side-effect-free requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Requirements discovery result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can discover MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"Requirements discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryInput"}}}}}},"/v1/mcp-connections/{connectionId}/oauth/issuer-review":{"post":{"operationId":"postV1McpConnectionsByConnectionIdOauthIssuerReview","tags":["Authentication"],"summary":"Review a changed External MCP OAuth issuer","description":"Organization-admin-only. Repeats live OAuth discovery and either previews the issuers currently advertised by the MCP resource or explicitly confirms one. Confirmation never trusts an unadvertised issuer. Changing issuers invalidates issuer-bound OAuth clients and credentials so members reconnect cleanly.","responses":{"200":{"description":"Issuer review result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewResponse"}}}},"400":{"description":"Invalid issuer review request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can review OAuth issuers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection changed or the requested issuer is not currently advertised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"}}}},"502":{"description":"Live OAuth discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewInput"}}}}}},"/v1/mcp-connections/presets":{"get":{"operationId":"getV1McpConnectionsPresets","tags":["Capability Sources"],"summary":"List predefined External MCP Connection presets","description":"Common third-party MCP servers (Notion, Linear, Stripe, Slack, ...) an admin can add with one click, prefilled with a real name and URL.","responses":{"200":{"description":"Presets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpPresetListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/mcp-connections/resolve":{"post":{"operationId":"postV1McpConnectionsResolve","tags":["Authentication"],"summary":"Resolve a free-form query to an MCP server","description":"Admin-only, side-effect-free smart resolution for the add-connection flow. Accepts a URL, a bare host, or a product name (\"vercel\"), matches curated presets, probes bounded well-known endpoint candidates through the SSRF-guarded discovery fetch, and returns the winning URL with its requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Resolution result (not_found is a successful outcome).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveResult"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can resolve MCP servers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveInput"}}}}}},"/v1/mcp-connections":{"get":{"operationId":"getV1McpConnections","tags":["Capability Sources"],"summary":"List External MCP Connections","description":"scope=usable (default): connections the calling member has been granted (org-wide, direct, or via a team), with per-member connection status. scope=manageable: every org connection with access summaries — workspace owners and admins only.","responses":{"200":{"description":"Connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"scope=manageable requires a workspace owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1McpConnections","tags":["Capability Sources"],"summary":"Register a new External MCP Connection for the org","description":"Admin-only. Registers a third-party MCP server by name + URL and grants access (org-wide, teams, or members). Use GET /v1/mcp-connections/presets for known server URLs (Notion, Linear, Stripe, Sentry, Slack, Context7). For credentialMode per_member, each member connects their own account afterwards — share links.yourConnections from the response so teammates know where to sign in. For servers with pre-registered OAuth apps, whitelist links.oauthCallback. API-key and OAuth-client credentials cannot be created through the agent surface; use the dashboard.","responses":{"200":{"description":"Connection created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionCreatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can add MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"The upstream MCP server could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"default":"shared","type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["name","url","authType"]}}}}}},"/v1/mcp-connections/{connectionId}/tools":{"get":{"operationId":"getV1McpConnectionsByConnectionIdTools","tags":["Capability Sources"],"summary":"List tools exposed by an External MCP Connection","description":"Uses the Den-managed credential available to the calling member to read the live MCP tools/list catalog. Granted members can inspect connections available under Your Connections; workspace owners and admins can also inspect connections they manage. Credentials and tool calls are never returned.","responses":{"200":{"description":"External MCP tool catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller has not been granted access to this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"502":{"description":"The upstream MCP tool catalog could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/tools/call":{"post":{"operationId":"postV1McpConnectionsByConnectionIdToolsCall","tags":["Authentication"],"summary":"Manually run a tool from an External MCP Connection","description":"Workspace owner/admin diagnostic runner. Executes one named MCP tool with caller-supplied JSON arguments using the Den-managed shared credential or the calling admin's connected credential. Returns an ephemeral inspection of the actual tools/call HTTP request and response with credential and session headers redacted. The caller must already be granted access to the connection. Credentials, arguments, results, and inspection payloads are never written to logs.","responses":{"200":{"description":"The MCP tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunResponse"}}}},"400":{"description":"Invalid tool name or arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller must be a workspace owner/admin and have access to this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"413":{"description":"The tool arguments exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRequestTooLargeError"}}}},"502":{"description":"The upstream MCP tool call failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunInput"}}}}}},"/v1/mcp-connections/{connectionId}":{"put":{"operationId":"putV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Edit an External MCP Connection","description":"Organization-admin-only. Name and direct access changes preserve credentials. URL, authentication type, or credential-mode changes invalidate the old identity atomically. Secret fields are write-only optional replacements and are never returned. expectedUpdatedAt prevents stale edits.","responses":{"200":{"description":"Connection updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can edit MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The edit is stale or changes marketplace-owned identity fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdateConflictError"}}}},"502":{"description":"The proposed API-key or no-auth configuration could not be validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["expectedUpdatedAt","name","url","authType","credentialMode","access"]}}}}},"delete":{"operationId":"deleteV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Remove an External MCP Connection","responses":{"200":{"description":"Removed."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can remove MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/access":{"put":{"operationId":"putV1McpConnectionsByConnectionIdAccess","tags":["Capability Sources"],"summary":"Replace who can use an External MCP Connection","description":"Admin-only. Full-replace semantics: send the complete desired access set (orgWide, or memberIds + teamIds). Team and member ids come from GET /v1/org.","responses":{"200":{"description":"Access updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can change connection access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["access"]}}}}}},"/v1/mcp-connections/{connectionId}/disconnect":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnect","tags":["Authentication"],"summary":"Disconnect (clear credentials for) an External MCP Connection without removing it","description":"Admin-only. Signs out every shared or per-member account stored for this connection, while preserving the connection row, access grants, OAuth client configuration, and plugin bindings.","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can disconnect MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/disconnect-my-account":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnectMyAccount","tags":["Authentication"],"summary":"Disconnect the calling member's account for a per-member External MCP Connection","description":"Removes only the caller's connected account for this MCP connection. The org-level connection, access grants, OAuth client configuration, and other members' accounts are preserved.","responses":{"200":{"description":"Disconnected."},"400":{"description":"This connection does not use per-member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection or nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/connect/start":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectStart","tags":["Authentication"],"summary":"Begin the OAuth handshake for an External MCP Connection","description":"Runs RFC 9728 discovery, dynamic client registration if needed, and returns an authorize URL to redirect the admin's browser to.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The OAuth connection requires provider or issuer configuration before connecting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartConflictError"}}}},"502":{"description":"OAuth handshake failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/oauth/callback":{"get":{"operationId":"getV1McpConnectionsOauthCallback","tags":["Authentication"],"summary":"Shared OAuth callback for External MCP Connections","description":"Deployment-wide callback. Organization, member, and connection routing are derived exclusively from signed state.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}}}},"/v1/mcp-connections/{connectionId}/connect/callback":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for an External MCP Connection","description":"The external MCP server redirects here with code+state after the admin consents. Serves a small static HTML page — the admin's Den tab in the background polls connection status and never needs this response body.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/connectors/github/install/start":{"post":{"operationId":"postV1ConnectorsGithubInstallStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnPath":{"type":"string","minLength":1,"maxLength":1024}},"required":["returnPath"]}}}},"tags":["GitHub"],"summary":"Start GitHub install","description":"Builds a GitHub App install redirect URL for the current organization.","responses":{"200":{"description":"GitHub install redirect returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallStartResponse"}}}},"400":{"description":"The GitHub install request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/install/complete":{"post":{"operationId":"postV1ConnectorsGithubInstallComplete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","minLength":1,"maxLength":4096}},"required":["installationId","state"]}}}},"tags":["GitHub"],"summary":"Complete GitHub install","description":"Completes a GitHub App installation for the current organization and returns visible repositories.","responses":{"200":{"description":"GitHub installation completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallCompleteResponse"}}}},"400":{"description":"The GitHub install completion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects":{"get":{"operationId":"getV1ConfigObjects","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"type","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]}},{"in":"query","name":"sourceMode","schema":{"type":"string","enum":["cloud","import","connector"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Config Objects"],"summary":"List config objects","description":"Lists current config object projections visible to the current organization member.","responses":{"200":{"description":"Config objects returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectListResponse"}}}},"400":{"description":"The config object query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConfigObjects","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"pluginIds":{"maxItems":100,"type":"array","items":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"}},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","sourceMode","input"]}}}},"tags":["Config Objects"],"summary":"Create config object","description":"Creates a new private config object and initial immutable version.","responses":{"201":{"description":"Config object created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects/{configObjectId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object","description":"Returns one config object detail when the caller can view it.","responses":{"200":{"description":"Config object returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectDetailResponse"}}}},"400":{"description":"The config object path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}},"reason":{"type":"string","minLength":1,"maxLength":255}},"required":["input"]}}}},"tags":["Config Objects"],"summary":"Create config object version","description":"Creates a new immutable config object version.","responses":{"201":{"description":"Config object version created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object version request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}}],"tags":["Config Objects"],"summary":"List config object versions","description":"Returns immutable versions for one config object.","responses":{"200":{"description":"Config object versions returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionListResponse"}}}},"400":{"description":"The version list request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/{versionId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsByVersionId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"versionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cov_.*"},"required":true,"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object version","description":"Returns one immutable config object version.","responses":{"200":{"description":"Config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/latest":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsLatest","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get latest config object version","description":"Returns the latest config object version by created_at and id ordering.","responses":{"200":{"description":"Latest config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The latest-version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/archive":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdArchive","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"archive config object","description":"archive a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/delete":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdDelete","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"delete config object","description":"delete a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/restore":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdRestore","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"restore config object","description":"restore a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object plugins","description":"Lists plugins that currently include the config object.","responses":{"200":{"description":"Config object plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The config object plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Config Objects"],"summary":"Attach config object to plugin","description":"Adds a config object to a plugin when the caller can edit the target plugin.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdPluginsByPluginId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Remove config object from plugin","description":"Removes one active plugin membership from a config object.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object access grants","description":"Lists direct, team, and org-wide grants for one config object.","responses":{"200":{"description":"Config object access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Config Objects"],"summary":"Grant config object access","description":"Creates or reactivates one access grant for a config object.","responses":{"201":{"description":"Config object access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The access grant request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdAccessByGrantId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^coa_.*"},"required":true,"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Revoke config object access","description":"Soft-revokes one config object access grant.","responses":{"204":{"description":"Config object access revoked successfully."},"400":{"description":"The access grant path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins":{"get":{"operationId":"getV1Plugins","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Plugins"],"summary":"List plugins","description":"Lists plugins visible to the current organization member.","responses":{"200":{"description":"Plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginListResponse"}}}},"400":{"description":"The plugin query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Plugins","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"components":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","input"]}},"orgWide":{"type":"boolean"},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"}},"required":["name"]}}}},"tags":["Plugins"],"summary":"Create plugin","description":"Creates a plugin and can also create components, share org-wide, and publish to a marketplace in one request.","responses":{"201":{"description":"Plugin created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}":{"get":{"operationId":"getV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get plugin","description":"Returns one plugin detail when the caller can view it.","responses":{"200":{"description":"Plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginDetailResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"tags":["Plugins"],"summary":"Update plugin","description":"Updates plugin metadata.","responses":{"200":{"description":"Plugin updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/archive":{"post":{"operationId":"postV1PluginsByPluginIdArchive","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"archive plugin","description":"archive a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/restore":{"post":{"operationId":"postV1PluginsByPluginIdRestore","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"restore plugin","description":"restore a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects":{"get":{"operationId":"getV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin config objects","description":"Lists plugin memberships and resolved config object projections.","responses":{"200":{"description":"Plugin memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["configObjectId"]}}}},"tags":["Plugins"],"summary":"Add plugin config object","description":"Adds a config object to a plugin.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin or config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects/{configObjectId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Remove plugin config object","description":"Removes one config object from a plugin.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/resolved":{"get":{"operationId":"getV1PluginsByPluginIdResolved","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get resolved plugin","description":"Lists active plugin memberships with the current config object projection for each item.","responses":{"200":{"description":"Resolved plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view resolved plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/mcp-connections":{"post":{"operationId":"postV1PluginsByPluginIdMcpConnections","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"serverName":{"type":"string","minLength":1,"maxLength":255},"authType":{"default":"oauth","type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096}},"required":["clientId"]}},"required":["configObjectId","serverName"]}}}},"tags":["Plugins"],"summary":"Configure plugin MCP requirement","description":"Admin-only privileged setup for one declared remote MCP server. The server name and URL are derived from the active plugin config object; the request never supplies a URL and does not start OAuth.","responses":{"200":{"description":"Plugin MCP requirement configured successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMcpRequirementConfigureResponse"}}}},"400":{"description":"The plugin MCP requirement request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin MCP requirement could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url/preview":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrlPreview","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Preview GitHub plugin marketplace import","description":"Reads a public GitHub plugin URL and returns skills and remote MCP servers that can be imported into an organization marketplace.","responses":{"200":{"description":"GitHub plugin MCP import preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportPreviewResponse"}}}},"400":{"description":"The GitHub plugin MCP import preview request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to preview plugin MCP imports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The GitHub plugin path could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrl","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"},"access":{"type":"object","properties":{"orgWide":{"default":true,"type":"boolean"},"memberIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}}},"authType":{"default":"oauth","type":"string","enum":["oauth","none"]},"credentialMode":{"default":"per_member","type":"string","enum":["shared","per_member"]},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}]},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"selectedSkillKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerNames":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Create a plugin from GitHub","description":"Creates one plugin from selected skills and remote MCP servers in a public GitHub plugin URL, applies the requested access grants, and optionally publishes it into an organization marketplace. Declared and known-server authentication requirements take precedence over the request-wide auth fallback.","responses":{"200":{"description":"GitHub plugin MCPs imported successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportResponse"}}}},"400":{"description":"The GitHub plugin MCP import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The GitHub plugin path or marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access":{"get":{"operationId":"getV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin access grants","description":"Lists direct, team, and org-wide grants for a plugin.","responses":{"200":{"description":"Plugin access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Plugins"],"summary":"Grant plugin access","description":"Creates or reactivates one access grant for a plugin.","responses":{"201":{"description":"Plugin access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The plugin access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access/{grantId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdAccessByGrantId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pag_.*"},"required":true,"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Revoke plugin access","description":"Soft-revokes one plugin access grant.","responses":{"204":{"description":"Plugin access revoked successfully."},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces":{"get":{"operationId":"getV1Marketplaces","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Marketplaces"],"summary":"List marketplaces","description":"Lists marketplaces visible to the current organization member.","responses":{"200":{"description":"Marketplaces returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceListResponse"}}}},"400":{"description":"The marketplace query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Marketplaces","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}},"required":["name"]}}}},"tags":["Marketplaces"],"summary":"Create marketplace","description":"Creates a new private marketplace and grants the creator manager access.","responses":{"201":{"description":"Marketplace created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/marketplaces/{marketplaceId}":{"get":{"operationId":"getV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get marketplace","description":"Returns one marketplace detail when the caller can view it.","responses":{"200":{"description":"Marketplace returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceDetailResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}}}}}},"tags":["Marketplaces"],"summary":"Update marketplace","description":"Updates marketplace metadata.","responses":{"200":{"description":"Marketplace updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/archive":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdArchive","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"archive marketplace","description":"archive a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/delete":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdDelete","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"delete marketplace","description":"Permanently deletes a custom marketplace and its relationships.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"A built-in or connector-managed marketplace cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceConflictError"}}}}}}},"/v1/marketplaces/{marketplaceId}/restore":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdRestore","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"restore marketplace","description":"restore a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace plugins","description":"Lists marketplace memberships and resolved plugin projections.","responses":{"200":{"description":"Marketplace memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginListResponse"}}}},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Marketplaces"],"summary":"Add marketplace plugin","description":"Adds a plugin to a marketplace.","responses":{"201":{"description":"Marketplace membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMutationResponse"}}}},"400":{"description":"The marketplace membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/resolved":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdResolved","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get resolved marketplace plugin readiness","description":"Returns marketplace detail with plugins, derived source info, and each plugin's cloud readiness or required setup state.","responses":{"200":{"description":"Marketplace resolved detail returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceResolvedResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdPluginsByPluginId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Remove marketplace plugin","description":"Removes one plugin from a marketplace.","responses":{"204":{"description":"Marketplace membership removed successfully."},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace access grants","description":"Lists direct, team, and org-wide grants for a marketplace.","responses":{"200":{"description":"Marketplace access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Marketplaces"],"summary":"Grant marketplace access","description":"Creates or reactivates one access grant for a marketplace.","responses":{"201":{"description":"Marketplace access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The marketplace access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access/{grantId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdAccessByGrantId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mag_.*"},"required":true,"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Revoke marketplace access","description":"Soft-revokes one marketplace access grant.","responses":{"204":{"description":"Marketplace access revoked successfully."},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts":{"get":{"operationId":"getV1ConnectorAccounts","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","disconnected","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector accounts","description":"Lists connector accounts for the organization.","responses":{"200":{"description":"Connector accounts returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountListResponse"}}}},"400":{"description":"The connector account query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","displayName"]}}}},"tags":["Connectors"],"summary":"Create connector account","description":"Creates a connector account such as a GitHub App installation binding.","responses":{"201":{"description":"Connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The connector account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}":{"get":{"operationId":"getV1ConnectorAccountsByConnectorAccountId","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector account","description":"Returns one connector account detail.","responses":{"200":{"description":"Connector account returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDetailResponse"}}}},"400":{"description":"The connector account path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}/disconnect":{"post":{"operationId":"postV1ConnectorAccountsByConnectorAccountIdDisconnect","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":255}}}}}},"tags":["Connectors"],"summary":"Disconnect connector account","description":"Disconnects a connector account and cleans up all associated connector-managed records.","responses":{"200":{"description":"Connector account disconnected and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDisconnectResponse"}}}},"400":{"description":"The connector account disconnect request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances":{"get":{"operationId":"getV1ConnectorInstances","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"status","schema":{"type":"string","enum":["active","disabled","archived","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector instances","description":"Lists connector instances visible to the current member.","responses":{"200":{"description":"Connector instances returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceListResponse"}}}},"400":{"description":"The connector instance query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorInstances","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorAccountId","connectorType","name"]}}}},"tags":["Connectors"],"summary":"Create connector instance","description":"Creates a new connector instance.","responses":{"201":{"description":"Connector instance created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance","description":"Returns one connector instance detail.","responses":{"200":{"description":"Connector instance returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceDetailResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector instance","description":"Updates one connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/archive":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdArchive","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"archive connector instance","description":"archive a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/disable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDisable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"disable connector instance","description":"disable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/enable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdEnable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"enable connector instance","description":"enable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/configuration":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdConfiguration","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance configuration","description":"Returns the currently configured plugins and import stats for a connector instance.","responses":{"200":{"description":"Connector instance configuration returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/remove":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdRemove","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Remove connector instance","description":"Removes a connector instance and deletes the plugins, mappings, config objects, and bindings associated with it.","responses":{"200":{"description":"Connector instance removed and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceRemoveResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to remove this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/auto-import":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAutoImport","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"}},"required":["autoImportNewPlugins"]}}}},"tags":["Connectors"],"summary":"Set connector instance auto-import","description":"Enables or disables auto-import of new plugins on future push webhooks for a connector instance.","responses":{"200":{"description":"Connector instance auto-import updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The auto-import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to configure this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscovery","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["GitHub"],"summary":"Get GitHub connector discovery","description":"Analyzes a GitHub connector target and returns discovered plugin candidates.","responses":{"200":{"description":"GitHub connector discovery returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubConnectorDiscoveryResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/tree":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscoveryTree","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","exclusiveMinimum":0,"maximum":500}},{"in":"query","name":"prefix","schema":{"type":"string","minLength":1,"maxLength":1024}}],"tags":["GitHub"],"summary":"List GitHub discovery tree entries","description":"Pages through the normalized GitHub repository tree used during discovery.","responses":{"200":{"description":"GitHub discovery tree returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeResponse"}}}},"400":{"description":"The discovery tree request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery tree entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/apply":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDiscoveryApply","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"default":false,"type":"boolean"},"selectedKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["selectedKeys"]}}}},"tags":["GitHub"],"summary":"Apply GitHub discovery selection","description":"Creates OpenWork plugins and connector mappings from selected discovery candidates.","responses":{"200":{"description":"GitHub discovery selection applied successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryApplyResponse"}}}},"400":{"description":"The discovery apply request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to apply discovery selections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"List connector instance access grants","description":"Lists direct, team, and org-wide grants for a connector instance.","responses":{"200":{"description":"Connector instance access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Connectors"],"summary":"Grant connector instance access","description":"Creates or reactivates one access grant for a connector instance.","responses":{"201":{"description":"Connector instance access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The connector instance access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConnectorInstancesByConnectorInstanceIdAccessByGrantId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cia_.*"},"required":true,"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Revoke connector instance access","description":"Soft-revokes one connector instance access grant.","responses":{"204":{"description":"Connector instance access revoked successfully."},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/targets":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"targetKind","schema":{"type":"string","enum":["repository_branch"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector targets","description":"Lists connector targets for one connector instance.","responses":{"200":{"description":"Connector targets returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetListResponse"}}}},"400":{"description":"The connector target query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","targetKind","config"]}}}},"tags":["Connectors"],"summary":"Create connector target","description":"Creates a connector target under a connector instance.","responses":{"201":{"description":"Connector target created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector target","description":"Returns one connector target detail.","responses":{"200":{"description":"Connector target returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetDetailResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector target","description":"Updates one connector target.","responses":{"200":{"description":"Connector target updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/resync":{"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdResync","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Resync connector target","description":"Queues a manual resync for a connector target.","responses":{"202":{"description":"Connector target resync queued successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to resync connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/mappings":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"mappingKind","schema":{"type":"string","enum":["path","api","custom"]}},{"in":"query","name":"objectType","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector mappings","description":"Lists mappings under a connector target.","responses":{"200":{"description":"Connector mappings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingListResponse"}}}},"400":{"description":"The connector mapping query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}}},"tags":["Connectors"],"summary":"Create connector mapping","description":"Creates a connector mapping.","responses":{"201":{"description":"Connector mapping created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-mappings/{connectorMappingId}":{"patch":{"operationId":"patchV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector mapping","description":"Updates one connector mapping.","responses":{"200":{"description":"Connector mapping updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"delete":{"operationId":"deleteV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Delete connector mapping","description":"Deletes one connector mapping.","responses":{"204":{"description":"Connector mapping deleted successfully."},"400":{"description":"The connector mapping path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events":{"get":{"operationId":"getV1ConnectorSyncEvents","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"eventType","schema":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector sync events","description":"Lists connector sync events visible to the current member.","responses":{"200":{"description":"Connector sync events returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventListResponse"}}}},"400":{"description":"The connector sync event query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}":{"get":{"operationId":"getV1ConnectorSyncEventsByConnectorSyncEventId","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector sync event","description":"Returns one connector sync event detail.","responses":{"200":{"description":"Connector sync event returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventDetailResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}/retry":{"post":{"operationId":"postV1ConnectorSyncEventsByConnectorSyncEventIdRetry","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Retry connector sync event","description":"Re-queues one connector sync event.","responses":{"202":{"description":"Connector sync event retried successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to retry connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/accounts":{"post":{"operationId":"postV1ConnectorsGithubAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accountLogin":{"type":"string","minLength":1,"maxLength":255},"accountType":{"type":"string","enum":["Organization","User"]},"displayName":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","accountLogin","accountType","displayName"]}}}},"tags":["GitHub"],"summary":"Create GitHub connector account","description":"Persists one GitHub App installation as a connector account.","responses":{"201":{"description":"GitHub connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The GitHub account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/setup":{"post":{"operationId":"postV1ConnectorsGithubSetup","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorInstanceName":{"type":"string","minLength":1,"maxLength":255},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255},"mappings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}},"required":["installationId","connectorInstanceName","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Setup GitHub connector","description":"Creates a GitHub connector account, instance, target, and initial mappings in one flow.","responses":{"201":{"description":"GitHub connector setup created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubSetupResponse"}}}},"400":{"description":"The GitHub setup request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/accounts/{connectorAccountId}/repositories":{"get":{"operationId":"getV1ConnectorsGithubAccountsByConnectorAccountIdRepositories","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["GitHub"],"summary":"List GitHub repositories","description":"Lists repositories visible to one GitHub connector account.","responses":{"200":{"description":"GitHub repositories returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubRepositoryListResponse"}}}},"400":{"description":"The GitHub repository query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list GitHub repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/validate-target":{"post":{"operationId":"postV1ConnectorsGithubValidateTarget","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Validate GitHub target","description":"Validates one repository-branch target before persisting it.","responses":{"200":{"description":"GitHub target validated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubValidateTargetResponse"}}}},"400":{"description":"The GitHub target validation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to validate GitHub targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/roles":{"post":{"operationId":"postV1Roles","tags":["Roles"],"summary":"Create organization role","description":"Creates a custom organization role with a named permission map.","responses":{"201":{"description":"Organization role created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["roleName","permission"]}}}}}},"/v1/roles/{roleId}":{"patch":{"operationId":"patchV1RolesByRoleId","tags":["Roles"],"summary":"Update organization role","description":"Updates a custom organization role and propagates role name changes to members and pending invitations.","responses":{"200":{"description":"Organization role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^orl_.*"},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}},"delete":{"operationId":"deleteV1RolesByRoleId","tags":["Roles"],"summary":"Delete organization role","description":"Deletes a custom organization role after confirming that no members or pending invitations still depend on it.","responses":{"204":{"description":"Organization role deleted successfully."},"400":{"description":"The role deletion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^orl_.*"},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}]}},"/v1/resources":{"get":{"operationId":"getV1Resources","tags":["Resources"],"summary":"Get accessible resource snapshot","description":"Returns IDs and update timestamps for cloud resources visible to the current organization member.","responses":{"200":{"description":"Accessible resource snapshot returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSnapshotResponse"}}}},"401":{"description":"The caller must be signed in to list resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/teams":{"post":{"operationId":"postV1Teams","tags":["Teams"],"summary":"Create team","description":"Creates a team inside an organization and can optionally attach existing organization members to it.","responses":{"201":{"description":"Team created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}}},"required":["name"]}}}}}},"/v1/teams/{teamId}":{"patch":{"operationId":"patchV1TeamsByTeamId","tags":["Teams"],"summary":"Update team","description":"Updates a team's name and-or membership list within an organization.","responses":{"200":{"description":"Team updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team, organization, or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}}}}}}}},"delete":{"operationId":"deleteV1TeamsByTeamId","tags":["Teams"],"summary":"Delete team","description":"Deletes a team and removes its related team-membership records.","responses":{"204":{"description":"Team deleted successfully."},"400":{"description":"The team deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}]}},"/v1/telegram/connection":{"get":{"operationId":"getV1TelegramConnection","tags":["Authentication"],"summary":"Get the organization Telegram connection","description":"Returns redacted bot, worker, webhook, and private-chat pairing status. Bot tokens and webhook secrets are never returned.","responses":{"200":{"description":"Telegram connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"put":{"operationId":"putV1TelegramConnection","tags":["Authentication"],"summary":"Connect an organization Telegram bot","description":"Admin-only. Validates a BotFather token, binds it to one organization worker, encrypts it at rest, and registers a secret-protected webhook.","responses":{"200":{"description":"Telegram bot connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionResponse"}}}},"400":{"description":"The request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"409":{"description":"The selected worker is unavailable or bot is already connected elsewhere.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}},"502":{"description":"Telegram rejected the token or webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botToken":{"type":"string","minLength":1,"maxLength":512},"workerId":{"type":"string","minLength":1,"maxLength":64}},"required":["botToken","workerId"]}}}}},"delete":{"operationId":"deleteV1TelegramConnection","tags":["Authentication"],"summary":"Disconnect the organization Telegram bot","description":"Admin-only. Removes the Telegram webhook and permanently deletes the encrypted bot token, secret, pairing, and delivery state.","responses":{"200":{"description":"Telegram disconnected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramDeleteResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Telegram is not connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}}}},"/v1/telegram/connection/pairing":{"post":{"operationId":"postV1TelegramConnectionPairing","tags":["Authentication"],"summary":"Create a one-time Telegram pairing link","description":"Admin-only. Rotates any prior private-chat binding and returns a ten-minute one-time Telegram deep link.","responses":{"200":{"description":"Pairing link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramPairingResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Telegram is not connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}}}},"/v1/capabilities/telegram/status":{"get":{"operationId":"getV1CapabilitiesTelegramStatus","tags":["Capability Sources"],"summary":"Check the organization Telegram connection","description":"Returns redacted Telegram connection and pairing status without any credential material.","responses":{"200":{"description":"Telegram connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramCapabilityStatus"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/capabilities/telegram/send-message":{"post":{"operationId":"postV1CapabilitiesTelegramSendMessage","tags":["Capability Sources"],"summary":"Send a message to the paired Telegram chat","description":"Sends text only to the organization connection's paired private chat. The caller cannot supply an arbitrary Telegram chat id.","responses":{"200":{"description":"Telegram message sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramSendResponse"}}}},"400":{"description":"The message was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"Telegram is not connected or paired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}},"502":{"description":"Telegram rejected the message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32000}},"required":["text"]}}}}}},"/v1/app-version":{"get":{"operationId":"getV1AppVersion","tags":["System"],"summary":"Get desktop app version metadata","description":"Returns the supported desktop app range and stable published desktop releases from GitHub.","responses":{"200":{"description":"Desktop app version metadata returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenAppVersionResponse"}}}}}}},"/v1/webhooks/connectors/github":{"post":{"operationId":"postV1WebhooksConnectorsGithub","tags":["Webhooks"],"summary":"GitHub webhook ingress","description":"Verifies a GitHub App webhook signature against the raw request body, then records any relevant sync work.","responses":{"200":{"description":"Ignored but valid GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookIgnoredResponse"}}}},"202":{"description":"Accepted GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookAcceptedResponse"}}}},"401":{"description":"Invalid GitHub webhook signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookUnauthorizedResponse"}}}},"503":{"description":"GitHub webhook secret is not configured."}}}},"/v1/webhooks/telegram/{connectionId}":{"post":{"operationId":"postV1WebhooksTelegramByConnectionId","tags":["Webhooks"],"summary":"Telegram bot webhook ingress","description":"Verifies Telegram's per-connection secret header, durably claims update_id, and acknowledges before queued worker processing begins.","responses":{"200":{"description":"Telegram update accepted or already processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookResponse"}}}},"400":{"description":"Invalid Telegram update or connection id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Invalid Telegram webhook secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookUnauthorized"}}}},"404":{"description":"Telegram connection not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookResponse"}}}},"413":{"description":"Telegram update body exceeds 256 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookPayloadTooLarge"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/v1/workers/{id}/activity-heartbeat":{"post":{"operationId":"postV1WorkersByIdActivityHeartbeat","tags":["Workers","Worker Activity"],"summary":"Record worker heartbeat","description":"Accepts signed heartbeat and recent-activity updates from a worker so Den can track worker health and recent usage.","responses":{"200":{"description":"Worker heartbeat accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeatResponse"}}}},"400":{"description":"The heartbeat payload or worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The worker heartbeat token was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"isActiveRecently":{"type":"boolean"},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"openSessionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["isActiveRecently"]}}}}}},"/v1/workers":{"get":{"operationId":"getV1Workers","tags":["Workers"],"summary":"List workers","description":"Lists the workers that belong to the caller's active organization, including each worker's latest known instance state.","responses":{"200":{"description":"Workers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerListResponse"}}}},"400":{"description":"The worker list query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1Workers","tags":["Workers"],"summary":"Create worker","description":"Creates a local worker or cloud worker for the active organization and returns the initial tokens needed to connect to it.","responses":{"201":{"description":"Local worker created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"202":{"description":"Cloud worker creation started successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"400":{"description":"The worker creation payload was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/OrganizationUnavailableError"},{"$ref":"#/components/schemas/WorkspacePathRequiredError"},{"$ref":"#/components/schemas/WorkerUserEmailRequiredError"}]}}}},"401":{"description":"The caller must be signed in to create workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"The caller needs an active cloud plan before launching a cloud worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerPaymentRequiredError"}}}},"409":{"description":"The organization has reached its worker limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerOrgLimitReachedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"destination":{"type":"string","enum":["local","cloud"]},"workspacePath":{"type":"string"},"sandboxBackend":{"type":"string"},"imageVersion":{"type":"string"}},"required":["name","destination"]}}}}}},"/v1/workers/{id}":{"get":{"operationId":"getV1WorkersById","tags":["Workers"],"summary":"Get worker","description":"Returns one worker from the active organization together with its latest provisioned instance details.","responses":{"200":{"description":"Worker returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerResponse"}}}},"400":{"description":"The worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]},"patch":{"operationId":"patchV1WorkersById","tags":["Workers"],"summary":"Update worker","description":"Renames a worker, but only when the caller is the user who originally created that worker.","responses":{"200":{"description":"Worker updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUpdateResponse"}}}},"400":{"description":"The worker update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the worker owner can rename this worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}}},"delete":{"operationId":"deleteV1WorkersById","tags":["Workers"],"summary":"Delete worker","description":"Deletes a worker and cascades cleanup for its tokens, runtime records, and provider-specific resources.","responses":{"204":{"description":"Worker deleted successfully."},"400":{"description":"The worker deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/tokens":{"post":{"operationId":"postV1WorkersByIdTokens","tags":["Workers"],"summary":"Get worker connection tokens","description":"Returns connection tokens and the resolved OpenWork connect URL for an existing worker.","responses":{"200":{"description":"Worker connection tokens returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerTokensResponse"}}}},"400":{"description":"The worker token path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request worker tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The worker is not ready to return connection tokens yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerConnectionError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime":{"get":{"operationId":"getV1WorkersByIdRuntime","tags":["Workers","Worker Runtime"],"summary":"Get worker runtime status","description":"Fetches runtime version and status information from a specific worker's runtime endpoint.","responses":{"200":{"description":"Worker runtime information returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The worker runtime path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker runtime information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime/upgrade":{"post":{"operationId":"postV1WorkersByIdRuntimeUpgrade","tags":["Workers","Worker Runtime"],"summary":"Upgrade worker runtime","description":"Forwards a runtime upgrade request to a specific worker and returns the worker runtime's response.","responses":{"200":{"description":"Worker runtime upgrade request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The runtime upgrade request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to upgrade a worker runtime.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"/v1/mcp/token":{"post":{"operationId":"postV1McpToken","tags":["Authentication"],"summary":"Mint MCP access token","description":"Mints an org-scoped MCP access token for the caller's active organization so first-party clients can connect to the Den MCP server without a separate browser OAuth flow.","responses":{"200":{"description":"MCP access token minted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpTokenResponse"}}}},"400":{"description":"The token request was invalid or no active organization is selected.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/McpTokenOrganizationRequiredError"}]}}}},"401":{"description":"The caller must be signed in to mint an MCP token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot mint MCP tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["mcp:read","mcp:write"]}}}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcp","responses":{"200":{"description":"OK"}}}},"/mcp/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/agent":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAgent","responses":{"200":{"description":"OK"}}}},"/mcp/agent/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAgentWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/admin":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAdmin","responses":{"200":{"description":"OK"}}}},"/mcp/admin/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAdminWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/v1/telemetry/ingest":{"post":{"operationId":"postV1TelemetryIngest","tags":["Telemetry"],"summary":"Ingest telemetry events","description":"Receives a batch of telemetry events from the OpenWork app or workers. Auth provides org and member identity. Unknown event types and disallowed fields are dropped. Always returns 204.","responses":{"204":{"description":"Events accepted."},"400":{"description":"Invalid event payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"source":{"type":"string","maxLength":32},"sessionId":{"type":"string","maxLength":128},"durationMs":{"type":"integer","minimum":0,"maximum":86400000},"success":{"type":"boolean"},"dimensions":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","label"]}}},"required":["type","timestamp"]}}},"required":["events"]}}}}}},"/v1/telemetry/dimensions":{"get":{"operationId":"getV1TelemetryDimensions","tags":["Telemetry"],"summary":"List telemetry dimension values","description":"Returns unique analytics dimension values for the active organization, such as project labels for the project selector.","responses":{"200":{"description":"Telemetry dimensions returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryDimensionListResponse"}}}},"400":{"description":"Invalid dimension query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"type","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/v1/telemetry/adoption":{"get":{"operationId":"getV1TelemetryAdoption","tags":["Telemetry"],"summary":"Get adoption metrics","description":"Returns org adoption metrics: member count, pending invites, active members in 7d and 30d windows, and a 12-week weekly active member trend.","responses":{"200":{"description":"Adoption metrics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAdoptionResponse"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/telemetry/analytics":{"get":{"operationId":"getV1TelemetryAnalytics","tags":["Telemetry"],"summary":"Get usage analytics","description":"Returns Layer 1 (who is using AI) and Layer 2 (how often) analytics for the active org: member counts, active members, session and task volume in 7d/30d windows, average task duration, and a 12-week trend of active members, sessions, and tasks.","responses":{"200":{"description":"Analytics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAnalyticsResponse"}}}},"400":{"description":"Invalid analytics query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Usage analytics requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}}},"parameters":[{"in":"query","name":"dimensionType","schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"query","name":"dimensionValue","schema":{"type":"string","minLength":1,"maxLength":128}}]}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Den API","description":"OpenAPI spec for the Den control plane API.\n\nAuthentication:\n- Use `Authorization: Bearer ` for user-authenticated routes that require a Den session.\n- Use `x-api-key: ` for API-key-authenticated routes that accept organization API keys.\n- Public routes like health and documentation do not require authentication.\n\nSwagger tip: use the security schemes in the Authorize dialog to set either `bearerAuth` or `denApiKey` before trying protected endpoints.","version":"dev"},"servers":[],"tags":[{"name":"System","description":"Service health and operational routes."},{"name":"Organizations","description":"Top-level organization creation and context routes."},{"name":"Invitations","description":"Invitation preview, acceptance, creation, and cancellation routes."},{"name":"API Keys","description":"Organization API key management routes."},{"name":"SCIM","description":"Organization SCIM connector management routes."},{"name":"SSO","description":"Organization single sign-on connector management routes."},{"name":"Members","description":"Organization member management routes."},{"name":"Roles","description":"Organization custom role management routes."},{"name":"Teams","description":"Organization team management routes."},{"name":"Templates","description":"Organization shared template routes."},{"name":"LLM Providers","description":"Organization LLM provider catalog, configuration, and access routes."},{"name":"Workers","description":"Worker lifecycle, billing, and runtime routes."},{"name":"Worker Runtime","description":"Worker runtime inspection and upgrade routes."},{"name":"Worker Activity","description":"Worker heartbeat and activity reporting routes."},{"name":"Telemetry","description":"Telemetry event ingestion and adoption analytics."},{"name":"Admin","description":"Administrative reporting routes."},{"name":"Users","description":"Current user and membership routes."},{"name":"Bootstrap","description":"Agent-first provisional workspace setup routes."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"session-token","description":"Session token passed as `Authorization: Bearer ` for user-authenticated Den routes."},"denApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key passed as the `x-api-key` header for API-key-authenticated Den routes."}},"schemas":{"DenApiHealthResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"den-api"},"version":{"type":"string"}},"required":["ok","service","version"]},"DenApiReadinessResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string","const":"den-api"},"checks":{"type":"object","properties":{"database":{"type":"string","enum":["ok","error"]}},"required":["database"]}},"required":["ok","service","checks"]},"AdminPageInfo":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"returned":{"type":"number"},"hasMore":{"type":"boolean"},"search":{"type":"string"},"durationMs":{"type":"number"}},"required":["total","limit","offset","returned","hasMore","search","durationMs"]},"AdminUsersPageResponse":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"billing":{"type":"object","properties":{"loaded":{"type":"boolean"},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["loaded","paidUsers","unpaidUsers","billingUnavailableUsers"]},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["users","page","billing","generatedAt"]},"InvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"AdminOrganizationsPageResponse":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"page":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["organizations","page","generatedAt"]},"AdminSummary":{"type":"object","properties":{"totalUsers":{"type":"number"},"totalOrganizations":{"type":"number"},"verifiedUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recentUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"cloudWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"localWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"usersWithoutWorkers":{"anyOf":[{"type":"number"},{"type":"null"}]},"paidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"unpaidUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"billingUnavailableUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"adminCount":{"type":"number"},"billingLoaded":{"type":"boolean"},"activeUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers1d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers7d":{"anyOf":[{"type":"number"},{"type":"null"}]},"realActiveUsers30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"recurringUsers":{"anyOf":[{"type":"number"},{"type":"null"}]},"inviters":{"anyOf":[{"type":"number"},{"type":"null"}]},"medianHoursToFirstInvite":{"anyOf":[{"type":"number"},{"type":"null"}]},"activitySeries":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"activeUsers":{"type":"number"},"realActiveUsers":{"type":"number"},"signups":{"type":"number"}},"required":["day","activeUsers","realActiveUsers","signups"]}}},"required":["totalUsers","totalOrganizations","verifiedUsers","recentUsers7d","recentUsers30d","totalWorkers","cloudWorkers","localWorkers","usersWithWorkers","usersWithoutWorkers","paidUsers","unpaidUsers","billingUnavailableUsers","adminCount","billingLoaded","activeUsers1d","activeUsers7d","activeUsers30d","realActiveUsers1d","realActiveUsers7d","realActiveUsers30d","recurringUsers","inviters","medianHoursToFirstInvite","activitySeries"]},"AdminMetricsResponse":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/AdminSummary"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["summary","generatedAt"]},"AdminOverviewResponse":{"type":"object","properties":{"viewer":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]},"admins":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"summary":{"$ref":"#/components/schemas/AdminSummary"},"users":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"organizations":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"userPage":{"$ref":"#/components/schemas/AdminPageInfo"},"organizationPage":{"$ref":"#/components/schemas/AdminPageInfo"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["viewer","admins","summary","users","organizations","userPage","organizationPage","generatedAt"]},"ScimManagementForbiddenError":{"type":"object","properties":{"error":{"type":"string","const":"forbidden"},"message":{"type":"string"}},"required":["error","message"]},"ScimAuthRouteError":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"AuthLoginOptionsResponse":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"nextStep":{"anyOf":[{"type":"string","const":"sso"},{"type":"string","const":"google"},{"type":"string","const":"github"},{"type":"string","const":"password"},{"type":"string","const":"new_account"}]},"allowPublicSignup":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["email","nextStep"]},"AuthLoginLockedError":{"type":"object","properties":{"error":{"type":"string","const":"login_locked"},"message":{"type":"string"}},"required":["error","message"]},"AuthPasswordScreeningUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"password_screening_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffGrantResponse":{"type":"object","properties":{"grant":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"openworkUrl":{"type":"string","format":"uri"}},"required":["grant","expiresAt","openworkUrl"]},"DesktopHandoffStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["pending","consumed","unknown"]}},"required":["status"]},"DesktopHandoffRateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"DesktopHandoffExchangeResponse":{"type":"object","properties":{"token":{"type":"string"},"user":{"type":"object","properties":{"id":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name"]}},"required":["token","user"]},"DesktopHandoffGrantNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"grant_not_found"},"message":{"type":"string"}},"required":["error","message"]},"NotFoundError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"DeprecatedSkillHubError":{"type":"object","properties":{"error":{"type":"string","const":"deprecated"},"message":{"type":"string","const":"Skill hubs are deprecated. Use plugins instead."}},"required":["error","message"]},"CurrentUserResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}},"session":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user","session"]},"CurrentUserOrganizationsResponse":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"isActive":{"type":"boolean"}},"required":["id","isActive"],"additionalProperties":{}}},"activeOrgId":{"anyOf":[{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},{"type":"null"}]},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orgs","activeOrgId","activeOrgSlug"]},"SendDownloadLinkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"SendDownloadLinkRateLimitError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"SendDownloadLinkEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"download_link_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateCurrentUserProfileResponse":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}}},"required":["user"]},"ActiveOrganizationResponse":{"type":"object","properties":{"activeOrgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"activeOrgSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activeOrgId","activeOrgSlug"]},"CurrentUserDesktopConfigResponse":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"allowedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},"brandAppName":{"type":"string","minLength":1,"maxLength":64},"brandLogoUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandIconUrl":{"type":"string","maxLength":2048,"format":"uri"},"brandAccentColor":{"type":"string","enum":["blue","crimson","cyan","gold","grass","green","indigo","iris","jade","lime","mint","orange","pink","plum","purple","red","ruby","sky","teal","tomato","violet","yellow"]},"connectEnabled":{"type":"boolean"},"onboardingPrompts":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"skill":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"local"},"slug":{"type":"string","minLength":1,"maxLength":120}},"required":["source","slug"]},{"type":"object","properties":{"source":{"type":"string","const":"connect"},"slug":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":200},"marketplaceId":{"type":"string","minLength":1,"maxLength":255},"marketplaceName":{"type":"string","minLength":1,"maxLength":200},"pluginId":{"type":"string","minLength":1,"maxLength":255},"pluginName":{"type":"string","minLength":1,"maxLength":200},"configObjectId":{"type":"string","minLength":1,"maxLength":255},"capabilityName":{"type":"string","minLength":1,"maxLength":255}},"required":["source","slug","name","marketplaceId","marketplaceName","pluginId","configObjectId","capabilityName"]}]}},"required":["prompt"]}},"onboardingPromptDescriptions":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}}}},"Memory":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","content","tags","source","scope","createdAt","updatedAt"]},"SaveMemoryResponse":{"type":"object","properties":{"memory":{"$ref":"#/components/schemas/Memory"}},"required":["memory"]},"SaveMemoryRequest":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":8000},"tags":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"contexts":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"snippet":{"type":"string","minLength":1,"maxLength":4000},"conversation_id":{"type":"string","minLength":1,"maxLength":128},"message_id":{"type":"string","minLength":1,"maxLength":128},"origin":{"type":"string","enum":["active_conversation","searched_conversation"]}},"required":["snippet"]}}},"required":["content"]},"MemorySearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"score":{"type":"number"}},"required":["id","content","tags","source","scope","createdAt","updatedAt","score"]}}},"required":["results"]},"MemoryContext":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mctx_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":31,"maxLength":31,"pattern":"^mctx_.*"},"snippet":{"type":"string"},"citation":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","snippet","citation","origin","createdAt"]},"MemoryWithContexts":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mem_.*"},"content":{"type":"string"},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"source":{"type":"string"},"scope":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"contexts":{"type":"array","items":{"$ref":"#/components/schemas/MemoryContext"}}},"required":["id","content","tags","source","scope","createdAt","updatedAt","contexts"]},"MemoryListResponse":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/MemoryWithContexts"}}},"required":["memories"]},"OrganizationResponse":{"type":"object","properties":{"organization":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]}},"required":["organization"]},"SingleOrgModeError":{"type":"object","properties":{"error":{"type":"string","const":"single_org_mode"},"message":{"type":"string"}},"required":["error","message"]},"InvitationPreviewResponse":{"type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","canceled","expired"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","email","role","status","expiresAt","createdAt"]},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"allowedEmailDomains":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"branding":{"type":"object","properties":{"appName":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]}},"required":["id","name","slug","allowedEmailDomains","branding"]}},"required":["invitation","organization"]},"InvitationAcceptedResponse":{"type":"object","properties":{"accepted":{"type":"boolean","const":true},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"}},"required":["accepted","organizationId","organizationSlug","invitationId"]},"AccountEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"account_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"InvalidEmailDomainError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_email_domain"},"message":{"type":"string"},"invalidDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","invalidDomains"]},"InvalidBrandIconError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_icon"},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","reason","message"]},"UpdateOrganizationBadRequest":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidEmailDomainError"},{"$ref":"#/components/schemas/InvalidBrandIconError"}]},"EnterprisePlanRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"enterprise_plan_required"},"feature":{"type":"string"},"message":{"type":"string"}},"required":["error","feature","message"]},"SingleOrgSsoStatusResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["configured","organizationSlug","signInPath","signInUrl"]},"ResolveOrganizationSsoByEmailResponse":{"type":"object","properties":{"requireSso":{"type":"boolean"},"organizationSlug":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"}},"required":["requireSso","organizationSlug","signInPath","signInUrl"]},"OrganizationOwner":{"type":"object","properties":{"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["memberId","userId","name","email"]},"OrganizationContextResponse":{"type":"object","properties":{"organization":{"type":"object","properties":{"owner":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOwner"},{"type":"null"}]}},"additionalProperties":{}},"currentMember":{"type":"object","properties":{},"additionalProperties":{}},"currentMemberTeams":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["organization","currentMember","currentMemberTeams"],"additionalProperties":{}},"DeleteOrganizationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"}},"required":["id","name"]}},"required":["ok","organization"]},"OrganizationApiKeyOwner":{"type":"object","properties":{"userId":{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},"memberId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","memberId","name","email","image"]},"OrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"configId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastRequest":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"owner":{"$ref":"#/components/schemas/OrganizationApiKeyOwner"}},"required":["id","configId","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","lastRequest","expiresAt","createdAt","updatedAt","owner"]},"OrganizationApiKeyListResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationApiKey"}}},"required":["apiKeys"]},"OrganizationApiKeyForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"CreatedOrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"rateLimitEnabled":{"type":"boolean"},"rateLimitMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rateLimitTimeWindow":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","start","prefix","enabled","rateLimitEnabled","rateLimitMax","rateLimitTimeWindow","expiresAt","createdAt","updatedAt"]},"CreateOrganizationApiKeyResponse":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/CreatedOrganizationApiKey"},"key":{"type":"string","minLength":1}},"required":["apiKey","key"]},"CreateOrganizationApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":64}},"required":["name"]},"OrganizationApiKeyNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"api_key_not_found"}},"required":["error"]},"OrgStripeBillingResponse":{"type":"object","properties":{},"additionalProperties":{}},"OrgStripeCheckoutResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripePortalResponse":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OrgStripeCheckoutSyncResponse":{"type":"object","properties":{"synced":{"type":"boolean"}},"required":["synced"]},"ManagedBrandAssetUploadResponse":{"type":"object","properties":{"assets":{"type":"object","properties":{"logo":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]},"icon":{"type":"object","properties":{"kind":{"type":"string","enum":["logo","icon"]},"version":{"type":"string","pattern":"^[a-f0-9]{64}$"},"extension":{"type":"string","enum":["png","jpg"]},"contentType":{"type":"string","enum":["image/png","image/jpeg"]},"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"byteLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"originalName":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["kind","version","extension","contentType","url","width","height","byteLength","originalName","uploadedAt"]}}}},"required":["assets"]},"InvalidManagedBrandAssetError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_brand_asset"},"kind":{"anyOf":[{"type":"string","enum":["logo","icon"]},{"type":"null"}]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","kind","reason","message"]},"DesktopPolicyListResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"desktopPolicies":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["definitions","desktopPolicies"]},"DesktopPolicyResponse":{"type":"object","properties":{"desktopPolicy":{"type":"object","properties":{},"additionalProperties":{}}},"required":["desktopPolicy"]},"DenDesktopPolicyDocumentWrite":{"type":"object","properties":{"allowCustomProviders":{"type":"boolean"},"allowZenModel":{"type":"boolean"},"allowMultipleWorkspaces":{"type":"boolean"},"allowControlSettings":{"type":"boolean"},"allowManageExtensions":{"type":"boolean"},"allowBuiltInExtensions":{"type":"boolean"},"allowAlphaUpdates":{"type":"boolean"},"showWelcomePage":{"type":"boolean"},"onboardingPrompts":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"skill":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"local"},"slug":{"type":"string","minLength":1,"maxLength":120}},"required":["source","slug"]},{"type":"object","properties":{"source":{"type":"string","const":"connect"},"slug":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":200},"marketplaceId":{"type":"string","minLength":1,"maxLength":255},"marketplaceName":{"type":"string","minLength":1,"maxLength":200},"pluginId":{"type":"string","minLength":1,"maxLength":255},"pluginName":{"type":"string","minLength":1,"maxLength":200},"configObjectId":{"type":"string","minLength":1,"maxLength":255},"capabilityName":{"type":"string","minLength":1,"maxLength":255}},"required":["source","slug","name","marketplaceId","marketplaceName","pluginId","configObjectId","capabilityName"]}]}},"required":["prompt"]}},{"type":"null"}]},"onboardingPromptDescriptions":{"anyOf":[{"minItems":2,"maxItems":3,"type":"array","items":{"type":"string","maxLength":120}},{"type":"null"}]}}},"InferenceStatus":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]},"memberCount":{"type":"number"},"proxyBaseUrl":{"type":"string"},"upstreamProviderConfigured":{"type":"boolean"},"subscribed":{"type":"boolean"},"buckets":{"type":"array","items":{"type":"object","properties":{"windowType":{"type":"string","enum":["five_hour","weekly","monthly"]},"windowStartAt":{"type":"string"},"windowEndAt":{"type":"string"},"limitAmount":{"type":"number"},"usedAmount":{"type":"number"}},"required":["windowType","windowStartAt","windowEndAt","limitAmount","usedAmount"]}}},"required":["enabled","tier","memberCount","proxyBaseUrl","upstreamProviderConfigured","buckets"]},"InferenceStatusResponse":{"type":"object","properties":{"inference":{"$ref":"#/components/schemas/InferenceStatus"}},"required":["inference"]},"InferenceProviderMissingError":{"type":"object","properties":{"error":{"type":"string","const":"openrouter_management_api_key_missing"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"organizationId":{"type":"string"},"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","organizationId","groupMappingMode","createdAt","updatedAt"]},"OrganizationScimHealth":{"type":"object","properties":{"unresolvedFailureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastFailureAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastFailureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastSuccessfulSyncAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["unresolvedFailureCount","lastFailureAt","lastFailureAction","lastFailureMessage","nextRetryAt","lastSuccessfulSyncAt"]},"OrganizationScimConnectionResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean"},"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationScimConnection"},{"type":"null"}]},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","health"]},"ScimInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"ScimUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"ScimForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"ScimOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"RotateOrganizationScimTokenResponse":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"ssoReady":{"type":"boolean","const":true},"connection":{"$ref":"#/components/schemas/OrganizationScimConnection"},"scimToken":{"type":"string","minLength":1},"health":{"$ref":"#/components/schemas/OrganizationScimHealth"}},"required":["baseUrl","ssoReady","connection","scimToken","health"]},"ScimSsoRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"sso_required"},"message":{"type":"string"}},"required":["error","message"]},"OrganizationScimReconciliationResponse":{"type":"object","properties":{"checked":{"type":"integer","minimum":0,"maximum":9007199254740991},"repaired":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["checked","repaired","failures"]},"OrganizationOidcSsoConfig":{"type":"object","properties":{"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"skipDiscovery":{"type":"boolean"},"authorizationEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"jwksEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"userInfoEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"tokenEndpointAuthentication":{"anyOf":[{"type":"string","enum":["client_secret_basic","client_secret_post"]},{"type":"null"}]}},"required":["clientId","scopes","skipDiscovery","authorizationEndpoint","tokenEndpoint","jwksEndpoint","userInfoEndpoint","tokenEndpointAuthentication"]},"OrganizationSamlSsoConfig":{"type":"object","properties":{"entryPoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"audience":{"anyOf":[{"type":"string"},{"type":"null"}]},"wantAssertionsSigned":{"type":"boolean"}},"required":["entryPoint","audience","wantAssertionsSigned"]},"OrganizationSsoConnection":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"kind":{"type":"string","enum":["oidc","saml"]},"issuer":{"type":"string","format":"uri"},"domain":{"type":"string"},"status":{"type":"string"},"signInPath":{"type":"string"},"signInUrl":{"type":"string","format":"uri"},"redirectUrl":{"type":"string","format":"uri"},"acsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"metadataUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"domainVerified":{"type":"boolean"},"oidc":{"anyOf":[{"$ref":"#/components/schemas/OrganizationOidcSsoConfig"},{"type":"null"}]},"saml":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSamlSsoConfig"},{"type":"null"}]},"lastTestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","providerId","kind","issuer","domain","status","signInPath","signInUrl","redirectUrl","acsUrl","metadataUrl","domainVerified","oidc","saml","lastTestedAt","lastError","createdAt","updatedAt"]},"OrganizationSsoConnectionResponse":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSsoConnection"},{"type":"null"}]},"domainVerificationToken":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connection"]},"SsoInvalidRequestError":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":{}}}},"required":["error","details"]},"SsoUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","const":"unauthorized"}},"required":["error"]},"SsoForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","reauth"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"SsoOrganizationNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"organization_not_found"}},"required":["error"]},"OrganizationSsoDomainVerificationResponse":{"type":"object","properties":{"domainVerificationToken":{"type":"string","minLength":1}},"required":["domainVerificationToken"]},"InvitationResponse":{"type":"object","properties":{"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"inviteToken":{"type":"string"}},"required":["invitationId","email","role","expiresAt","inviteToken"]},"InvitePaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"payment_required"},"reason":{"type":"string","const":"seat_subscription_required"},"subscriptionType":{"type":"string","const":"seat"},"currentCount":{"type":"number"},"freeSeatCount":{"type":"number"},"message":{"type":"string"}},"required":["error","reason","subscriptionType","currentCount","freeSeatCount","message"]},"InviteEmailDomainNotAllowedError":{"type":"object","properties":{"error":{"type":"string","const":"invite_email_domain_not_allowed"},"message":{"type":"string"},"emailDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowedEmailDomains":{"type":"array","items":{"type":"string"}}},"required":["error","message","emailDomain","allowedEmailDomains"]},"InvitationEmailFailedError":{"type":"object","properties":{"error":{"type":"string","const":"invitation_email_failed"},"reason":{"type":"string","enum":["email_not_configured","resend_rejected","resend_network","nodemailer_rejected"]},"message":{"type":"string"},"invitationId":{"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"}},"required":["error","reason","message","invitationId"]},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]},"CreateInstallLinkResponse":{"type":"object","properties":{"token":{"type":"string"},"installPageUrl":{"type":"string","format":"uri"}},"required":["token","installPageUrl"]},"CapabilityDisabledError":{"type":"object","properties":{"error":{"type":"string","const":"capability_disabled"},"capability":{"type":"string","enum":["installLinks","mcpConnections"]}},"required":["error","capability"]},"RateLimitedError":{"type":"object","properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"}},"required":["error","message"]},"CreateInstallLinkRequest":{"type":"object","properties":{"rotate":{"default":false,"type":"boolean"}}},"InstallExperienceConfig":{"type":"object","properties":{"appName":{"default":"OpenWork","type":"string","minLength":1,"maxLength":64},"clientName":{"type":"string","minLength":1},"webUrl":{"type":"string","format":"uri"},"apiUrl":{"type":"string","format":"uri"},"requireSignin":{"type":"boolean"},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"connectUrl":{"type":"string","minLength":1},"connectExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"activationUrl":{"type":"string","format":"uri"},"activationExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["clientName","webUrl","apiUrl","requireSignin","logoUrl","connectUrl","connectExpiresAt","activationUrl","activationExpiresAt"]},"InstallLinkNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"install_link_not_found"}},"required":["error"]},"ConnectLinkClaims":{"type":"object","properties":{"iss":{"type":"string","format":"uri"},"aud":{"type":"string","const":"openwork-desktop-connect"},"iat":{"type":"integer","minimum":0,"maximum":9007199254740991},"exp":{"type":"integer","minimum":0,"maximum":9007199254740991},"jti":{"type":"string","minLength":8},"v":{"type":"number","const":1},"org":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128}},"required":["name"]},"brand":{"type":"object","properties":{"appName":{"type":"string","minLength":1,"maxLength":64},"logoUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["appName","logoUrl","iconUrl"]},"den":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"apiBaseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["baseUrl"]},"requireSignin":{"type":"boolean"}},"required":["iss","aud","iat","exp","jti","v","org","brand","den","requireSignin"]},"DesktopConnectGrantStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["pending","connected"]},"claims":{"$ref":"#/components/schemas/ConnectLinkClaims"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["status","claims","expiresAt"]},"DesktopConnectGrantFailure":{"type":"object","properties":{"error":{"type":"string","enum":["connect_grant_invalid","connect_grant_expired","connect_grant_replayed"]}},"required":["error"]},"DesktopConnectGrantResponse":{"type":"object","properties":{"claims":{"$ref":"#/components/schemas/ConnectLinkClaims"}},"required":["claims"]},"LlmProviderTestConnectionResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"ok":{"type":"boolean"},"vendor":{"type":"string","enum":["azure","openai-compatible"]},"normalizedApi":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempted":{"type":"array","items":{"type":"string"}},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["ok","vendor","normalizedApi","attempted","models","hint","status"]},"verifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ok","adjusted","failed"]},"npm":{"type":"string","enum":["@ai-sdk/openai-compatible","@ai-sdk/openai"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","npm","message"]}}},"required":["result"]},"LlmProviderCatalogListResponse":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["providers"]},"ProviderCatalogUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"provider_catalog_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"LlmProviderCatalogResponse":{"type":"object","properties":{"provider":{"type":"object","properties":{},"additionalProperties":{}}},"required":["provider"]},"LlmProviderListResponse":{"type":"object","properties":{"llmProviders":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["llmProviders"]},"LlmProviderResponse":{"type":"object","properties":{"llmProvider":{"type":"object","properties":{},"additionalProperties":{}}},"required":["llmProvider"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"OAuthClientConfigResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"providerId":{"type":"string"},"clientId":{"type":"string"},"features":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","providerId","clientId","features","tenantId"]},"UnknownOAuthProviderError":{"type":"object","properties":{"error":{"type":"string","const":"unknown_oauth_provider"},"message":{"type":"string"}},"required":["error","message"]},"OAuthClientConfigDetailResponse":{"type":"object","properties":{"providerId":{"type":"string"},"configured":{"type":"boolean"},"clientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"redirectUri":{"type":"string"},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["providerId","configured","clientId","features","scopes","redirectUri","tenantId"]},"OAuthConnectStartResponse":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"]},"OAuthClientNotConfiguredError":{"type":"object","properties":{"error":{"type":"string","const":"client_not_configured"},"message":{"type":"string"}},"required":["error","message"]},"NativeProviderConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"OAuthProviderStatusResponse":{"type":"object","properties":{"providerId":{"type":"string"},"connected":{"type":"boolean"},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["providerId","connected","externalAccountId","scopes"]},"GoogleWorkspaceGmailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"}},"required":["id","threadId","from","to","subject","date","snippet"]},"GoogleWorkspaceGmailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageSummary"}}},"required":["ok","messages"]},"GoogleWorkspaceNeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceUpstreamError":{"type":"object","properties":{"error":{"type":"string","const":"google_api_error"},"message":{"type":"string"}},"required":["error","message"]},"GoogleWorkspaceGmailAttachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["attachmentId","filename","mimeType","size"]},"GoogleWorkspaceGmailMessage":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"snippet":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachment"}}},"required":["id","threadId","from","to","subject","date","snippet","body","attachments"]},"GoogleWorkspaceGmailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessage"}},"required":["ok","message"]},"GoogleWorkspaceGmailAttachmentResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messageId":{"type":"string"},"attachmentId":{"type":"string"},"size":{"type":"number","description":"Attachment size in bytes."},"dataBase64":{"type":"string","description":"Standard base64-encoded attachment bytes; decode locally to reconstruct the file."}},"required":["ok","messageId","attachmentId","size","dataBase64"]},"GoogleWorkspaceCalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"status":{"type":"string"},"htmlLink":{"type":"string"},"attendees":{"type":"array","items":{"type":"string"}},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","summary","description","location","start","end","status","htmlLink","attendees","meetLink"]},"GoogleWorkspaceCalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEvent"}}},"required":["ok","events"]},"GoogleWorkspaceCreateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceCreateCalendarEventBody":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":1000,"description":"Event title."},"description":{"description":"Optional event description.","type":"string","maxLength":20000},"location":{"description":"Optional event location.","type":"string","maxLength":1000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event start date-time."},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Event end date-time."},"timeZone":{"description":"Optional IANA time zone for start and end.","type":"string","minLength":1,"maxLength":128},"attendees":{"description":"Optional attendee email addresses.","maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"createMeetLink":{"description":"Set true to create a Google Meet conferencing link for this event; the response returns meetLink when Google creates it.","type":"boolean"}},"required":["summary","start","end"]},"GoogleWorkspaceUpdateCalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"eventId":{"type":"string"},"htmlLink":{"type":"string"},"summary":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"meetLink":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","eventId","htmlLink","summary","start","end","meetLink"]},"GoogleWorkspaceUpdateCalendarEventBody":{"type":"object","properties":{"createMeetLink":{"type":"boolean","const":true,"description":"Set true to add a Google Meet conferencing link to this existing event."}},"required":["createMeetLink"]},"GoogleWorkspaceDriveFileSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","mimeType","modifiedTime","webViewLink","size"]},"GoogleWorkspaceDriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}}},"required":["ok","files"]},"GoogleWorkspaceUploadDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileSummary"}},"required":["ok","file"]},"GoogleWorkspaceUploadDriveFileBody":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Filename to create in Google Drive."},"mimeType":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$","description":"File MIME type."},"dataBase64":{"type":"string","minLength":1,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"File bytes as standard base64. The gmail-attachment capability returns dataBase64 in this exact encoding — pass it through directly to save an email attachment to Drive. Maximum decoded size: 10 MiB."},"folderId":{"description":"Optional Google Drive parent folder id.","type":"string","minLength":1,"maxLength":512}},"required":["filename","mimeType","dataBase64"],"additionalProperties":false},"GoogleWorkspaceDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"modifiedTime":{"type":"string"},"webViewLink":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"type":"string"},"truncated":{"type":"boolean"}},"required":["id","name","mimeType","modifiedTime","webViewLink","size","content","truncated"]}},"required":["ok","file"]},"GoogleWorkspaceShareDriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"fileId":{"type":"string"},"permissionId":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"}},"required":["ok","fileId","permissionId","type","role"]},"GoogleWorkspaceShareDriveFileBody":{"type":"object","properties":{"type":{"type":"string","enum":["user","domain"],"description":"Use type=user to share with one person, or type=domain to share with the entire organization."},"emailAddress":{"description":"Required when type=user; pass the person's email address, for example raghav@openworklabs.com.","type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"domain":{"description":"Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.","type":"string","minLength":1,"maxLength":255},"role":{"default":"reader","description":"Drive permission role to grant.","type":"string","enum":["reader","commenter","writer"]},"sendNotificationEmail":{"default":true,"description":"Whether Google should email the recipient about the new access.","type":"boolean"}},"required":["type"],"additionalProperties":false},"GoogleWorkspaceDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draftId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the ready-to-send draft. Always share draftUrl with the user so they can open the draft in Gmail for review and send."},"threadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail URL for the conversation thread when this draft is a threaded reply."},"to":{"type":"string"},"subject":{"type":"string"},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quotedHistoryIncluded":{"type":"boolean","description":"True when quoted conversation history was included by the server or already present in the request body."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filename","mimeType","size"]}}},"required":["ok","draftId","messageId","draftUrl","threadUrl","to","subject","threadId","quotedHistoryIncluded"]},"GoogleWorkspaceMissingThreadIdError":{"type":"object","properties":{"error":{"type":"string","const":"missing_thread_id"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365EmailAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"]},"Microsoft365MailMessageSummary":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments"]},"Microsoft365MailMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365MailMessageSummary"}}},"required":["ok","messages"]},"Microsoft365NeedsConnectionError":{"type":"object","properties":{"error":{"type":"string","const":"needs_connection"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365GraphError":{"type":"object","properties":{"error":{"type":"string","const":"microsoft_graph_error"},"message":{"type":"string"}},"required":["error","message"]},"Microsoft365MailMessage":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"subject":{"type":"string"},"receivedDateTime":{"type":"string"},"preview":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"hasAttachments":{"type":"boolean"},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"body":{"type":"string"},"bodyContentType":{"type":"string"},"bodyTruncated":{"type":"boolean"}},"required":["id","conversationId","subject","receivedDateTime","preview","from","to","webLink","hasAttachments","cc","body","bodyContentType","bodyTruncated"]},"Microsoft365MailMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","message"]},"Microsoft365CalendarEvent":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"preview":{"type":"string"},"start":{"type":"string"},"startTimeZone":{"type":"string"},"end":{"type":"string"},"endTimeZone":{"type":"string"},"isAllDay":{"type":"boolean"},"location":{"type":"string"},"organizer":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365EmailAddress"}},"webLink":{"type":"string"},"onlineMeetingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","subject","preview","start","startTimeZone","end","endTimeZone","isAllDay","location","organizer","attendees","webLink","onlineMeetingUrl"]},"Microsoft365CalendarEventsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}}},"required":["ok","events"]},"Microsoft365DriveItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind"]},"Microsoft365DriveFilesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365DriveItem"}}},"required":["ok","files"]},"Microsoft365DriveFileResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"modifiedTime":{"type":"string"},"webUrl":{"type":"string"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["file","folder","unknown"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"truncated":{"type":"boolean"},"contentUnavailableReason":{"anyOf":[{"type":"string","enum":["folder","file_too_large","unsupported_content_type"]},{"type":"null"}]}},"required":["id","name","size","modifiedTime","webUrl","mimeType","kind","content","contentType","truncated","contentUnavailableReason"]}},"required":["ok","file"]},"Microsoft365MailDraftResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"draft":{"$ref":"#/components/schemas/Microsoft365MailMessage"}},"required":["ok","draft"]},"Microsoft365MailDraftBody":{"type":"object","properties":{"to":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"maxItems":50,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"type":"string","minLength":1,"maxLength":998},"body":{"type":"string","maxLength":200000}},"required":["to","subject","body"]},"Microsoft365CalendarEventResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"event":{"$ref":"#/components/schemas/Microsoft365CalendarEvent"}},"required":["ok","event"]},"Microsoft365CalendarEventBody":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":255},"body":{"type":"string","maxLength":20000},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timeZone":{"default":"UTC","type":"string","minLength":1,"maxLength":100},"location":{"type":"string","maxLength":255},"attendees":{"maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["subject","start","end"]},"Microsoft365DriveFileWriteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"file":{"$ref":"#/components/schemas/Microsoft365DriveItem"}},"required":["ok","file"]},"Microsoft365DriveFileWriteBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512},"content":{"type":"string","maxLength":200000}},"required":["path","content"]},"Microsoft365TeamsChat":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"chatType":{"type":"string"},"webUrl":{"type":"string"},"lastUpdatedDateTime":{"type":"string"}},"required":["id","topic","chatType","webUrl","lastUpdatedDateTime"]},"Microsoft365TeamsChatsResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"chats":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsChat"}}},"required":["ok","chats"]},"Microsoft365TeamsMessage":{"type":"object","properties":{"id":{"type":"string"},"createdDateTime":{"type":"string"},"content":{"type":"string"},"from":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365EmailAddress"},{"type":"null"}]},"webUrl":{"type":"string"}},"required":["id","createdDateTime","content","from","webUrl"]},"Microsoft365TeamsMessagesResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}}},"required":["ok","messages"]},"Microsoft365TeamsMessageResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"message":{"$ref":"#/components/schemas/Microsoft365TeamsMessage"}},"required":["ok","message"]},"Microsoft365TeamsMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["content"]},"ExternalMcpClientMetadata":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":"string","const":"OpenWork"},"application_type":{"type":"string","const":"web"},"redirect_uris":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","prefixItems":[{"type":"string","const":"authorization_code"},{"type":"string","const":"refresh_token"}]},"response_types":{"type":"array","prefixItems":[{"type":"string","const":"code"}]},"token_endpoint_auth_method":{"type":"string","const":"none"}},"required":["client_id","client_name","application_type","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]},"ExternalMcpRequirementsDiscovery":{"type":"object","properties":{"status":{"type":"string","enum":["ready","manual_action_required","unsupported","unreachable"]},"server":{"type":"object","properties":{"url":{"type":"string"},"protocolVersion":{"type":"string"},"initialize":{"type":"string","enum":["succeeded","authentication_required","failed"]}},"required":["url","initialize"]},"authentication":{"type":"object","properties":{"kind":{"type":"string","enum":["none","oauth","manual_bearer","unknown"]},"resource":{"type":"string"},"protectedResourceMetadataUrl":{"type":"string"},"authorizationServers":{"type":"array","items":{"type":"object","properties":{"issuer":{"type":"string"},"authorizationEndpoint":{"type":"string"},"tokenEndpoint":{"type":"string"},"registrationEndpoint":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"},"scopesSupported":{"type":"array","items":{"type":"string"}},"grantTypesSupported":{"type":"array","items":{"type":"string"}},"codeChallengeMethodsSupported":{"type":"array","items":{"type":"string"}},"tokenEndpointAuthMethodsSupported":{"type":"array","items":{"type":"string"}}},"required":["issuer","clientIdMetadataDocumentSupported"]}},"requiredScopes":{"type":"array","items":{"type":"string"}},"recommendedScopes":{"type":"array","items":{"type":"string"}},"refreshSupport":{"type":"string","enum":["supported","not_advertised","unknown"]},"availableRegistrationMethods":{"type":"array","items":{"type":"string","enum":["pre_registered","client_metadata","dynamic"]}},"recommendedRegistrationMethod":{"type":"string","enum":["client_metadata","dynamic","pre_registered"]}},"required":["kind","authorizationServers","requiredScopes","recommendedScopes","refreshSupport","availableRegistrationMethods","recommendedRegistrationMethod"]},"tools":{"type":"object","properties":{"visibility":{"type":"string","enum":["available_without_auth","requires_auth","unavailable"]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}},"required":["name"]}}},"required":["visibility"]},"manualRequirements":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"required":{"type":"boolean"}},"required":["code","label","reason","required"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["status","server","authentication","tools","manualRequirements","warnings"]},"ExternalMcpRequirementsDiscoveryFailedError":{"type":"object","properties":{"error":{"type":"string","const":"requirements_discovery_failed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpRequirementsDiscoveryInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["url"]},"ExternalMcpIssuerReviewResponse":{"type":"object","properties":{"currentIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"advertisedIssuers":{"type":"array","items":{"type":"string"}},"reviewRequired":{"type":"boolean"},"issuerChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["currentIssuer","advertisedIssuers","reviewRequired"]},"ExternalMcpConnectionNotFoundError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_found"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionConflictError":{"type":"object","properties":{"error":{"type":"string","const":"connection_conflict"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpIssuerReviewInput":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"preview"}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"confirm"},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"authorizationServerIssuer":{"type":"string","format":"uri"}},"required":["action","expectedUpdatedAt","authorizationServerIssuer"]}]},"ExternalMcpPresetResponse":{"type":"object","properties":{"presetId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"requiresOAuthClient":{"type":"boolean"}},"required":["presetId","displayName","description","url","authType"]},"ExternalMcpPresetListResponse":{"type":"object","properties":{"presets":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"}}},"required":["presets"]},"ExternalMcpResolveResult":{"type":"object","properties":{"resolution":{"type":"string","enum":["preset","discovered","not_found"]},"attempted":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"preset":{"$ref":"#/components/schemas/ExternalMcpPresetResponse"},"match":{"type":"object","properties":{"url":{"type":"string"},"suggestedName":{"type":"string"},"discovery":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}},"required":["url","suggestedName","discovery"]}},"required":["resolution","attempted"]},"ExternalMcpResolveInput":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200}},"required":["query"]},"ExternalMcpConnectionRequiredBy":{"type":"object","properties":{"pluginId":{"type":"string"},"name":{"type":"string"}},"required":["pluginId","name"]},"ExternalMcpConnectionAccessSummary":{"type":"object","properties":{"orgWide":{"type":"boolean"},"memberIds":{"type":"array","items":{"type":"string"}},"teamIds":{"type":"array","items":{"type":"string"}}},"required":["orgWide","memberIds","teamIds"]},"ExternalMcpConnectionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access"]},"ExternalMcpConnectionListResponse":{"type":"object","properties":{"connections":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}},"required":["connections"]},"ExternalMcpConnectionToolAnnotations":{"type":"object","properties":{"title":{"type":"string"},"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"idempotentHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}}},"ExternalMcpConnectionTool":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"annotations":{"$ref":"#/components/schemas/ExternalMcpConnectionToolAnnotations"}},"required":["name","inputSchema"]},"ExternalMcpConnectionToolListResponse":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionTool"}}},"required":["tools"]},"ExternalMcpConnectionNotReadyError":{"type":"object","properties":{"error":{"type":"string","const":"connection_not_ready"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpDiagnostic":{"type":"object","properties":{"referenceId":{"type":"string"},"phase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"category":{"type":"string"},"code":{"type":"string"},"highestPassed":{"type":"string","enum":["configured","reachable","authorized","protocol_ready","catalog_ready","operation_ready"]},"retryable":{"type":"boolean"},"actionOwner":{"type":"string","enum":["openwork","network_admin","provider_admin","organization_admin","member"]},"operatorAction":{"type":"string"},"message":{"type":"string"},"httpStatus":{"type":"integer","minimum":100,"maximum":599},"operationPhase":{"type":"string","enum":["CONFIGURATION","NETWORK_DNS","NETWORK_TCP","NETWORK_TLS","HTTP_ROUTING","AUTH_RESOURCE_DISCOVERY","AUTH_ISSUER_DISCOVERY","AUTH_CLIENT_REGISTRATION","AUTH_USER_OR_WORKLOAD","AUTH_TOKEN_ACQUISITION","AUTH_RESOURCE_VALIDATION","MCP_TRANSPORT","MCP_VERSION","MCP_INITIALIZE","MCP_INITIALIZED","MCP_TOOL_DISCOVERY","MCP_TOOL_EXECUTION","PROVIDER_AUTHORIZATION","PROVIDER_EXECUTION","CONTINUITY_REFRESH","CONTINUITY_SESSION","SHUTDOWN"]},"outbound":{"type":"object","properties":{"origin":{"type":"string"},"pathHash":{"type":"string"}},"required":["origin","pathHash"]},"providerRequestId":{"type":"string"},"providerStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerCode":{"type":"string"},"payloadBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jsonRpcCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"connectUrl":{"type":"string","format":"uri"}},"required":["referenceId","phase","category","code","highestPassed","retryable","actionOwner","operatorAction","message"]},"ExternalMcpConnectionToolListFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_catalog_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionToolInspectionHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"redacted":{"type":"boolean"}},"required":["name","value","redacted"]},"ExternalMcpConnectionToolInspectionBody":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"type":"boolean"},"unavailable":{"type":"boolean"}},"required":["text","bytes","truncated"]},"ExternalMcpConnectionToolInspectionRequest":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["method","url","startedAt","headers","body"]},"ExternalMcpConnectionToolInspectionResponse":{"type":"object","properties":{"status":{"type":"integer","minimum":100,"maximum":599},"statusText":{"type":"string"},"durationMs":{"type":"number","minimum":0},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionHeader"}},"body":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionBody"}},"required":["status","statusText","durationMs","headers","body"]},"ExternalMcpConnectionToolInspectionDiagnosis":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed"]},"layer":{"type":"string","enum":["openwork","network","mcp_connection","remote_http","mcp_tool"]},"summary":{"type":"string"}},"required":["status","layer","summary"]},"ExternalMcpConnectionToolInspection":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionRequest"},"response":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionResponse"},"diagnosis":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspectionDiagnosis"}},"required":["diagnosis"]},"ExternalMcpConnectionToolRunResponse":{"type":"object","properties":{"referenceId":{"type":"string"},"durationMs":{"type":"number","minimum":0},"result":{},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["referenceId","durationMs","result","inspection"]},"ExternalMcpConnectionToolRequestTooLargeError":{"type":"object","properties":{"error":{"type":"string","const":"payload_too_large"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionToolRunFailedError":{"type":"object","properties":{"error":{"type":"string","const":"tool_execution_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"},"inspection":{"$ref":"#/components/schemas/ExternalMcpConnectionToolInspection"}},"required":["error","message","diagnostic","inspection"]},"ExternalMcpConnectionToolRunInput":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"maxLength":255},"arguments":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["toolName","arguments"]},"ExternalMcpConnectionCreatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"links":{"type":"object","properties":{"yourConnections":{"type":"string"},"oauthCallback":{"type":"string"}},"required":["yourConnections","oauthCallback"]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","connectedForMe","requiredBy","access","links"]},"ExternalMcpConnectionValidationFailedError":{"type":"object","properties":{"error":{"type":"string","const":"connection_validation_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"ExternalMcpConnectionAccessInput":{"type":"object","properties":{"orgWide":{"default":false,"type":"boolean"},"memberIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"teamIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}}},"ExternalMcpConnectionUpdatedResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"connectedForMe":{"type":"boolean"},"needsReconnect":{"type":"boolean"},"credentialHealth":{"type":"string","enum":["unknown","ready","reconnect_required"]},"credentialHealthReason":{"anyOf":[{"type":"string","enum":["authorization_rejected","credential_expired","post_authorization_validation_failed"]},{"type":"null"}]},"credentialHealthCheckedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"issuerReviewRequired":{"type":"boolean"},"reconnectActionOwner":{"anyOf":[{"type":"string","enum":["member","organization_admin"]},{"type":"null"}]},"missingFeatures":{"type":"array","items":{"type":"string"}},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedScopes":{"type":"array","items":{"type":"string"}},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"identityManagedBy":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMcpConnectionRequiredBy"}},"requiredAuthType":{"anyOf":[{"type":"string","enum":["oauth","apikey","none"]},{"type":"null"}]},"authPolicyConfirmed":{"type":"boolean"},"authTypeMismatch":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"setupRequired":{"type":"boolean"},"access":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionAccessSummary"},{"type":"null"}]},"oauthClientId":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthSharedCallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthClientMetadataUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthCallbackMode":{"anyOf":[{"type":"string","enum":["shared-v1","isolated-v1","legacy-v1"]},{"type":"null"}]},"oauthRegistrationSource":{"anyOf":[{"type":"string","enum":["pre-registered","client-metadata","dynamic"]},{"type":"null"}]},"authorizationServerIssuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"identityChanged":{"type":"boolean"},"reconnectionRequired":{"type":"boolean"}},"required":["id","name","url","authType","credentialMode","connected","connectedAt","updatedAt","connectedForMe","requiredBy","identityManagedBy","access","identityChanged","reconnectionRequired"]},"ExternalMcpConnectionMarketplaceManagedError":{"type":"object","properties":{"error":{"type":"string","const":"marketplace_managed"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectionUpdateConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"},{"$ref":"#/components/schemas/ExternalMcpConnectionMarketplaceManagedError"}]},"ExternalMcpConnectStartResponse":{"type":"object","properties":{"status":{"type":"string","enum":["connected","needs_auth"]},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","authorizeUrl"]},"ExternalMcpOAuthConfigurationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_configuration_required"},"message":{"type":"string"},"callbackUrl":{"type":"string"},"clientMetadataUrl":{"type":"string"},"manualRequirements":{"type":"array","items":{"type":"string"}}},"required":["error","message","callbackUrl","clientMetadataUrl","manualRequirements"]},"ExternalMcpOAuthIssuerMismatchError":{"type":"object","properties":{"error":{"type":"string","const":"mcp_oauth_issuer_mismatch"},"message":{"type":"string"}},"required":["error","message"]},"ExternalMcpConnectStartConflictError":{"anyOf":[{"$ref":"#/components/schemas/ExternalMcpOAuthConfigurationRequiredError"},{"$ref":"#/components/schemas/ExternalMcpOAuthIssuerMismatchError"}]},"ExternalMcpConnectStartFailedError":{"type":"object","properties":{"error":{"type":"string","const":"oauth_handshake_failed"},"message":{"type":"string"},"diagnostic":{"$ref":"#/components/schemas/ExternalMcpDiagnostic"}},"required":["error","message","diagnostic"]},"PluginArchGithubInstallStartResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"},"state":{"type":"string","minLength":1}},"required":["redirectUrl","state"]}},"required":["ok","item"]},"PluginArchConnectorAccount":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","inactive","disconnected","error"]},"createdByName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","organizationId","connectorType","remoteId","externalAccountRef","displayName","status","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchGithubRepository":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fullName":{"type":"string","minLength":1},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hasPluginManifest":{"type":"boolean"},"manifestKind":{"anyOf":[{"type":"string","enum":["marketplace","plugin"]},{"type":"null"}]},"marketplacePluginCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"private":{"type":"boolean"}},"required":["id","fullName","defaultBranch","private"]},"PluginArchGithubInstallCompleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}}},"required":["connectorAccount","repositories"]}},"required":["ok","item"]},"PluginArchConfigObjectVersion":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cov_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"schemaVersion":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"normalizedPayloadJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"rawSourceText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdVia":{"type":"string","enum":["cloud","import","connector","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"connectorSyncEventId":{"anyOf":[{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"isDeletedVersion":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","configObjectId","schemaVersion","normalizedPayloadJson","rawSourceText","createdVia","createdByOrgMembershipId","connectorSyncEventId","sourceRevisionRef","isDeletedVersion","createdAt"]},"PluginArchConfigObject":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"searchText":{"anyOf":[{"type":"string","minLength":1,"maxLength":65535},{"type":"null"}]},"currentFileName":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"currentFileExtension":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]},"currentRelativePath":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"connectorInstanceId":{"anyOf":[{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"latestVersion":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"},{"type":"null"}]}},"required":["id","organizationId","objectType","sourceMode","title","description","searchText","currentFileName","currentFileExtension","currentRelativePath","status","createdByOrgMembershipId","connectorInstanceId","createdAt","updatedAt","deletedAt","latestVersion"]},"PluginArchConfigObjectListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["ok","item"]},"PluginArchConfigObjectDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["item"]},"PluginArchConfigObjectVersionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConfigObjectVersionDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConfigObjectVersion"}},"required":["item"]},"PluginArchPluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pco_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pco_.*"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"connectorMappingId":{"anyOf":[{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},{"type":"null"}]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"configObject":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"required":["id","pluginId","configObjectId","membershipSource","connectorMappingId","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchPluginMembershipListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMembershipMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPluginMembership"}},"required":["ok","item"]},"PluginArchAccessGrant":{"type":"object","properties":{"id":{"anyOf":[{"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^coa_.*"},{"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pag_.*"},{"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mag_.*"},{"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cia_.*"}]},"orgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"teamId":{"anyOf":[{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},{"type":"null"}]},"orgWide":{"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","orgMembershipId","teamId","orgWide","role","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchAccessGrantListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchAccessGrantMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchAccessGrant"}},"required":["ok","item"]},"OpenWorkExtensionManifest":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"id":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":2048},"source":{"type":"object","properties":{"format":{"type":"string","enum":["openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"trusted":{"type":"boolean"},"origin":{"type":"string","enum":["builtin","den","workspace","local"]},"reference":{"type":"string","minLength":1,"maxLength":512}},"required":["format","trusted"]},"resources":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"contributions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"setup":{"type":"object","properties":{},"additionalProperties":{}},"lifecycle":{"type":"object","properties":{},"additionalProperties":{}}},"required":["schemaVersion","id","name","description","source","resources"],"additionalProperties":{}},"PluginArchExtensionProjection":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"sourceFormat":{"type":"string","enum":["openwork-builtin","openwork-extension-manifest","claude-plugin","opencode-plugin","mcp-directory","manual"]},"manifest":{"anyOf":[{"$ref":"#/components/schemas/OpenWorkExtensionManifest"},{"type":"null"}]}},"required":["id","name","description","sourceFormat","manifest"]},"PluginArchPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchPluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["ok","item"]},"PluginArchPluginDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["item"]},"PluginArchPluginMcpRequirementConfigureResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"binding":{"type":"object","properties":{"id":{"description":"Den TypeID with 'pmr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pmr_.*"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"externalMcpConnectionId":{"type":"string"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"serverName":{"type":"string"}},"required":["id","configObjectId","externalMcpConnectionId","pluginId","serverName"]},"connection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connected":{"type":"boolean"},"connectedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","url","authType","credentialMode","connected","connectedAt"]},"links":{"type":"object","properties":{"yourConnections":{"type":"string"}},"required":["yourConnections"]}},"required":["binding","connection","links"]}},"required":["ok","item"]},"GithubPluginMcpImportServer":{"type":"object","properties":{"authType":{"anyOf":[{"type":"string","const":"oauth"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"serverKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["missing_url","local_unsupported","invalid_url","unsupported_auth"]},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["authType","connectionId","name","pluginKey","pluginName","serverKey","skippedReason","sourcePath","supported","url"]},"GithubPluginMcpImportPlan":{"type":"object","properties":{"branch":{"type":"string"},"classification":{"type":"string","enum":["claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"marketplace":{"anyOf":[{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["description","name","owner","version"]},{"type":"null"}]},"plugins":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"mcpCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string"},"skillCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["description","key","mcpCount","name","skillCount"]}},"repositoryFullName":{"type":"string"},"rootPath":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/GithubPluginMcpImportServer"}},"skills":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"pluginKey":{"type":"string"},"pluginName":{"type":"string"},"skillKey":{"type":"string"},"skippedReason":{"anyOf":[{"type":"string","enum":["invalid_skill"]},{"type":"null"}]},"sourcePath":{"type":"string"},"supported":{"type":"boolean"}},"required":["description","name","pluginKey","pluginName","skillKey","skippedReason","sourcePath","supported"]}},"sourceRevisionRef":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["branch","classification","marketplace","plugins","repositoryFullName","rootPath","servers","skills","sourceRevisionRef","warnings"]},"GithubPluginMcpImportPreviewResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/GithubPluginMcpImportPlan"}},"required":["ok","item"]},"GithubPluginMcpImportResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"imported":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["connectionId","name","url"]}},"importedSkills":{"type":"array","items":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"name":{"type":"string"},"sourcePath":{"type":"string"}},"required":["configObjectId","name","sourcePath"]}},"marketplaceId":{"anyOf":[{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"},"skipped":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["missing_url","local_unsupported","invalid_url","unsupported_auth"]}},"required":["name","reason"]}},"skippedSkills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string","enum":["invalid_skill"]},"sourcePath":{"type":"string"}},"required":["name","reason","sourcePath"]}}},"required":["imported","importedSkills","marketplaceId","plugin","skipped","skippedSkills"]}},"required":["ok","item"]},"PluginArchMarketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]},"PluginArchMarketplaceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchMarketplaceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["ok","item"]},"PluginArchMarketplaceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchMarketplace"}},"required":["item"]},"PluginArchMarketplaceConflictError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"PluginArchMarketplacePluginMembership":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkp_.*"},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]},"createdByOrgMembershipId":{"anyOf":[{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"removedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"plugin":{"$ref":"#/components/schemas/PluginArchPlugin"}},"required":["id","marketplaceId","pluginId","membershipSource","createdByOrgMembershipId","createdAt","removedAt"]},"PluginArchMarketplacePluginListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchPluginCloudReadiness":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_signin","needs_admin_setup","desktop_only","not_synced"]},"hasInstructional":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"authType":{"type":"string","enum":["oauth","apikey","none"]},"authTypeMismatch":{"type":"boolean"},"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"serverName":{"type":"string"},"url":{"type":"string"},"credentialMode":{"type":"string","enum":["shared","per_member"]},"connectedForMe":{"type":"boolean"},"oauthClientConfigured":{"type":"boolean"},"oauthClientRequired":{"type":"boolean"},"requiredAuthType":{"type":"string","enum":["oauth","apikey","none"]}},"required":["configObjectId","id","name","serverName","url"]}}},"required":["state","hasInstructional","connections"]},"PluginArchMarketplaceResolvedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"marketplace":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"pluginCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"canDelete":{"type":"boolean"}},"required":["id","organizationId","name","description","logoUrl","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","canDelete"]},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"cloudReadiness":{"$ref":"#/components/schemas/PluginArchPluginCloudReadiness"}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt"]}},"source":{"anyOf":[{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"accountLogin":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryFullName":{"type":"string","minLength":1},"branch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["connectorAccountId","connectorInstanceId","accountLogin","repositoryFullName","branch"]},{"type":"null"}]}},"required":["marketplace","plugins","source"]}},"required":["ok","item"]},"PluginArchMarketplacePluginMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMembership"}},"required":["ok","item"]},"PluginArchConnectorAccountListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorAccountMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["ok","item"]},"PluginArchConnectorAccountDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorAccount"}},"required":["item"]},"PluginArchConnectorAccountDisconnectResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorInstanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"disconnectedAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["deletedConfigObjectCount","deletedConnectorInstanceCount","deletedConnectorMappingCount","disconnectedAccountId","reason"]}},"required":["ok","item"]},"PluginArchConnectorInstance":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"instanceConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastSyncStatus":{"anyOf":[{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},{"type":"null"}]},"lastSyncCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","organizationId","connectorAccountId","connectorType","remoteId","name","status","instanceConfigJson","lastSyncedAt","lastSyncStatus","lastSyncCursor","createdByOrgMembershipId","createdAt","updatedAt"]},"PluginArchConnectorInstanceListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorInstanceMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["ok","item"]},"PluginArchConnectorInstanceDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorInstance"}},"required":["item"]},"PluginArchConnectorInstanceConfiguredPlugin":{"type":"object","properties":{"id":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","deleted","archived"]},"createdByOrgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketplaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["id","name"]}},"extension":{"anyOf":[{"$ref":"#/components/schemas/PluginArchExtensionProjection"},{"type":"null"}]},"componentCounts":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"rootPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","name","description","status","createdByOrgMembershipId","createdAt","updatedAt","deletedAt","rootPath"]},"PluginArchConnectorInstanceConfigurationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"configuredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfiguredPlugin"}},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"importedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"mappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["autoImportNewPlugins","configuredPlugins","connectorInstance","importedConfigObjectCount","mappingCount"]}},"required":["ok","item"]},"PluginArchConnectorInstanceRemoveResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"deletedConfigObjectCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedConnectorMappingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"removedConnectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"}},"required":["deletedConfigObjectCount","deletedConnectorMappingCount","removedConnectorInstanceId"]}},"required":["ok","item"]},"PluginArchConnectorTarget":{"type":"object","properties":{"id":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"targetConfigJson":{"type":"object","properties":{},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorType","remoteId","targetKind","externalTargetRef","targetConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveredPlugin":{"type":"object","properties":{"key":{"type":"string","minLength":1},"sourceKind":{"type":"string","enum":["marketplace_entry","plugin_manifest","standalone_claude","folder_inference"]},"rootPath":{"type":"string"},"displayName":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"selectedByDefault":{"type":"boolean"},"supported":{"type":"boolean"},"manifestPath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string","minLength":1}},"componentKinds":{"type":"array","items":{"type":"string","enum":["skill","command","agent","hook","mcp_server","lsp_server","monitor","settings"]}},"componentPaths":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"string","minLength":1}},"commands":{"type":"array","items":{"type":"string","minLength":1}},"hooks":{"type":"array","items":{"type":"string","minLength":1}},"lspServers":{"type":"array","items":{"type":"string","minLength":1}},"mcpServers":{"type":"array","items":{"type":"string","minLength":1}},"monitors":{"type":"array","items":{"type":"string","minLength":1}},"settings":{"type":"array","items":{"type":"string","minLength":1}},"skills":{"type":"array","items":{"type":"string","minLength":1}}},"required":["agents","commands","hooks","lspServers","mcpServers","monitors","settings","skills"]},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["key","sourceKind","rootPath","displayName","description","selectedByDefault","supported","manifestPath","warnings","componentKinds","componentPaths","metadata"]},"PluginArchGithubDiscoveryStep":{"type":"object","properties":{"id":{"type":"string","enum":["read_repository_structure","check_marketplace_manifest","check_plugin_manifests","prepare_discovered_plugins"]},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["completed","running","warning"]}},"required":["id","label","status"]},"PluginArchGithubDiscoveryTreeSummary":{"type":"object","properties":{"scannedEntryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"strategy":{"type":"string","enum":["git-tree-recursive"]},"truncated":{"type":"boolean"}},"required":["scannedEntryCount","strategy","truncated"]},"PluginArchGithubConnectorDiscoveryResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"classification":{"type":"string","enum":["claude_marketplace_repo","claude_multi_plugin_repo","claude_single_plugin_repo","folder_inferred_repo","unsupported"]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"discoveredPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveredPlugin"}},"repositoryFullName":{"type":"string","minLength":1},"sourceRevisionRef":{"type":"string","minLength":1},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryStep"}},"treeSummary":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeSummary"},"warnings":{"type":"array","items":{"type":"string","minLength":1}}},"required":["autoImportNewPlugins","classification","connectorInstance","connectorTarget","discoveredPlugins","repositoryFullName","sourceRevisionRef","steps","treeSummary","warnings"]}},"required":["ok","item"]},"PluginArchGithubDiscoveryTreeEntry":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["blob","tree"]},"path":{"type":"string","minLength":1},"sha":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","path","sha","size"]},"PluginArchGithubDiscoveryTreeResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMapping":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorTargetId":{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"mappingConfigJson":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","connectorInstanceId","connectorTargetId","connectorType","remoteId","mappingKind","selector","objectType","pluginId","autoAddToPlugin","mappingConfigJson","createdAt","updatedAt"]},"PluginArchGithubDiscoveryApplyResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"},"createdMarketplace":{"anyOf":[{"$ref":"#/components/schemas/PluginArchMarketplace"},{"type":"null"}]},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"},"createdPlugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchPlugin"}},"createdMappings":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"materializedConfigObjects":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConfigObject"}},"sourceRevisionRef":{"type":"string","minLength":1}},"required":["autoImportNewPlugins","connectorInstance","connectorTarget","createdPlugins","createdMappings","materializedConfigObjects","sourceRevisionRef"]}},"required":["ok","item"]},"PluginArchConnectorTargetListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorTargetMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["ok","item"]},"PluginArchConnectorTargetDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["item"]},"PluginArchConnectorSyncAsyncResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"queued":{"type":"boolean","const":true},"job":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"}},"required":["id"]}},"required":["ok","queued","job"]},"PluginArchConnectorMappingListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorMappingMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"$ref":"#/components/schemas/PluginArchConnectorMapping"}},"required":["ok","item"]},"PluginArchConnectorSyncSummary":{"type":"object","properties":{"createdCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"deletedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"additionalProperties":{}},"PluginArchConnectorSyncEvent":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"connectorInstanceId":{"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"connectorTargetId":{"anyOf":[{"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},{"type":"null"}]},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"eventType":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]},"externalEventRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"sourceRevisionRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"status":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]},"summaryJson":{"anyOf":[{"$ref":"#/components/schemas/PluginArchConnectorSyncSummary"},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","connectorInstanceId","connectorTargetId","connectorType","remoteId","eventType","externalEventRef","sourceRevisionRef","status","summaryJson","startedAt","completedAt"]},"PluginArchConnectorSyncEventListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchConnectorSyncEventDetailResponse":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PluginArchConnectorSyncEvent"}},"required":["item"]},"PluginArchGithubSetupResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"connectorAccount":{"$ref":"#/components/schemas/PluginArchConnectorAccount"},"connectorInstance":{"$ref":"#/components/schemas/PluginArchConnectorInstance"},"connectorTarget":{"$ref":"#/components/schemas/PluginArchConnectorTarget"}},"required":["connectorAccount","connectorInstance","connectorTarget"]}},"required":["ok","item"]},"PluginArchGithubRepositoryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PluginArchGithubRepository"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["items","nextCursor"]},"PluginArchGithubValidateTargetResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"item":{"type":"object","properties":{"branchExists":{"type":"boolean"},"defaultBranch":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryAccessible":{"type":"boolean"}},"required":["branchExists","defaultBranch","repositoryAccessible"]}},"required":["ok","item"]},"ResourceSnapshotResponse":{"type":"object","properties":{"organizationId":{"type":"string"},"orgMemberId":{"type":"string"},"teamIds":{"type":"array","items":{"type":"string"}},"resources":{"type":"object","properties":{"llmProviders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"marketplaces":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"plugins":{"type":"array","items":{"type":"object","properties":{"pluginId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"configItems":{"type":"array","items":{"type":"object","properties":{"configItemId":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["configItemId","lastUpdatedAt"]}}},"required":["pluginId","lastUpdatedAt","configItems"]}}},"required":["lastUpdatedAt","plugins"]}}},"required":["llmProviders","marketplaces"]}},"required":["organizationId","orgMemberId","teamIds","resources"]},"TeamResponse":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"organizationId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"managedByScim":{"type":"boolean"}},"required":["id","organizationId","name","createdAt","updatedAt","memberIds","managedByScim"]}},"required":["team"]},"TelegramConnection":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","error"]},"connected":{"type":"boolean"},"bot":{"type":"object","properties":{"id":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"}},"required":["id","username","displayName"]},"worker":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]},"webhook":{"type":"object","properties":{"registered":{"type":"boolean"},"lastReceivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["registered","lastReceivedAt","lastError"]},"pairing":{"type":"object","properties":{"paired":{"type":"boolean"},"chat":{"anyOf":[{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"type":"string"},"pairedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["username","firstName","pairedAt"]},{"type":"null"}]}},"required":["paired","chat"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","status","connected","bot","worker","webhook","pairing","createdAt","updatedAt"]},"TelegramConnectionResponse":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/TelegramConnection"},{"type":"null"}]}},"required":["connection"]},"TelegramConnectionError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"TelegramPairingResponse":{"type":"object","properties":{"pairing":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"code":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["url","code","expiresAt"]}},"required":["pairing"]},"TelegramDeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"webhookDeleted":{"type":"boolean"}},"required":["ok","webhookDeleted"]},"TelegramCapabilityStatus":{"type":"object","properties":{"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","error"]},"connected":{"type":"boolean"},"bot":{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"}},"required":["username","displayName"]},"worker":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]},"webhook":{"type":"object","properties":{"registered":{"type":"boolean"},"lastReceivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["registered","lastReceivedAt"]},"pairing":{"type":"object","properties":{"paired":{"type":"boolean"}},"required":["paired"]}},"required":["id","status","connected","bot","worker","webhook","pairing"]},{"type":"null"}]}},"required":["connection"]},"TelegramSendResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"messageIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["ok","messageIds"]},"DenAppVersionResponse":{"type":"object","properties":{"minAppVersion":{"type":"string"},"latestAppVersion":{"type":"string","minLength":1},"publishedDesktopVersions":{"type":"array","items":{"type":"string","minLength":1}}},"required":["minAppVersion","latestAppVersion","publishedDesktopVersions"]},"PluginArchGithubWebhookIgnoredResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":false},"reason":{"type":"string","minLength":1}},"required":["ok","accepted","reason"]},"PluginArchGithubWebhookAcceptedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean","const":true},"event":{"type":"string","enum":["push","installation","installation_repositories","repository"]},"deliveryId":{"type":"string","minLength":1},"queued":{"type":"boolean"}},"required":["ok","accepted","event","deliveryId","queued"]},"PluginArchGithubWebhookUnauthorizedResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"invalid signature"}},"required":["ok","error"]},"StripeWebhookResponse":{"type":"object","properties":{"received":{"type":"boolean","const":true},"type":{"type":"string"}},"required":["received","type"]},"TelegramWebhookResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"accepted":{"type":"boolean"},"reason":{"type":"string"}},"required":["ok","accepted"]},"TelegramWebhookUnauthorized":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"invalid secret"}},"required":["ok","error"]},"TelegramWebhookPayloadTooLarge":{"type":"object","properties":{"error":{"type":"string","const":"payload_too_large"}},"required":["error"]},"WorkerHeartbeatResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"workerId":{"type":"string"},"isActiveRecently":{"type":"boolean"},"openSessionCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastHeartbeatAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["ok","workerId","isActiveRecently","openSessionCount","lastHeartbeatAt","lastActiveAt"]},"WorkerBillingRetiredError":{"type":"object","properties":{"error":{"type":"string","const":"worker_billing_retired"},"message":{"type":"string"}},"required":["error","message"]},"WorkerInstance":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["provider","region","url","status","createdAt","updatedAt"]},{"type":"null"}]},"WorkerListResponse":{"type":"object","properties":{"workers":{"type":"array","items":{"type":"object","properties":{"instance":{"$ref":"#/components/schemas/WorkerInstance"},"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["instance","id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]}}},"required":["workers"]},"Worker":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"orgId":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"createdByUserId":{"anyOf":[{"description":"Den TypeID with 'usr_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^usr_.*"},{"type":"null"}]},"isMine":{"type":"boolean"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"type":"string"},"status":{"type":"string"},"imageVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspacePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxBackend":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastHeartbeatAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","orgId","createdByUserId","isMine","name","description","destination","status","imageVersion","workspacePath","sandboxBackend","lastHeartbeatAt","lastActiveAt","createdAt","updatedAt"]},"WorkerCreateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"instance":{"$ref":"#/components/schemas/WorkerInstance"},"launch":{"type":"object","properties":{"mode":{"type":"string"},"pollAfterMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mode","pollAfterMs"]}},"required":["worker","tokens","instance","launch"]},"OrganizationUnavailableError":{"type":"object","properties":{"error":{"type":"string","const":"organization_unavailable"}},"required":["error"]},"WorkspacePathRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"workspace_path_required"}},"required":["error"]},"WorkerUserEmailRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"user_email_required"}},"required":["error"]},"WorkerPaymentRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"cloud_worker_billing_unavailable"},"message":{"type":"string"}},"required":["error","message"]},"WorkerOrgLimitReachedError":{"type":"object","properties":{"error":{"type":"string","const":"org_limit_reached"},"limitType":{"type":"string","const":"workers"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"}},"required":["error","limitType","limit","currentCount","message"]},"WorkerResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"},"instance":{"$ref":"#/components/schemas/WorkerInstance"}},"required":["worker","instance"]},"WorkerUpdateResponse":{"type":"object","properties":{"worker":{"$ref":"#/components/schemas/Worker"}},"required":["worker"]},"WorkerTokensResponse":{"type":"object","properties":{"tokens":{"type":"object","properties":{"owner":{"type":"string"},"host":{"type":"string"},"client":{"type":"string"}},"required":["owner","host","client"]},"connect":{"anyOf":[{"type":"object","properties":{"openworkUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["openworkUrl","workspaceId"]},{"type":"null"}]}},"required":["tokens","connect"]},"WorkerConnectionError":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","const":"worker_tokens_unavailable"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","const":"worker_runtime_unavailable"},"message":{"type":"string"}},"required":["error","message"]}]},"WorkerRuntimeResponse":{"type":"object","properties":{},"additionalProperties":{}},"McpTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"string"}},"required":["token","expiresAt","organizationId","scopes","resource"]},"McpTokenOrganizationRequiredError":{"type":"object","properties":{"error":{"type":"string","const":"organization_required"},"message":{"type":"string"}},"required":["error","message"]},"TelemetryDimensionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"label":{"type":"string"},"sessionCount":{"type":"number"},"lastSeenAt":{"type":"string"}},"required":["type","value","label","sessionCount","lastSeenAt"]}}},"required":["items"]},"TelemetryAdoptionResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"weeklyTrend":{"type":"array","items":{"type":"number"}}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","weeklyTrend"]},"TelemetryAnalyticsResponse":{"type":"object","properties":{"members":{"type":"number"},"pendingInvites":{"type":"number"},"activeMembers7d":{"type":"number"},"activeMembers30d":{"type":"number"},"sessions7d":{"type":"number"},"sessions30d":{"type":"number"},"tasksCompleted7d":{"type":"number"},"tasksFailed7d":{"type":"number"},"tasksCompleted30d":{"type":"number"},"tasksFailed30d":{"type":"number"},"avgTaskDurationMs30d":{"anyOf":[{"type":"number"},{"type":"null"}]},"weekly":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string"},"activeMembers":{"type":"number"},"sessions":{"type":"number"},"tasksCompleted":{"type":"number"},"tasksFailed":{"type":"number"}},"required":["weekStart","activeMembers","sessions","tasksCompleted","tasksFailed"]}}},"required":["members","pendingInvites","activeMembers7d","activeMembers30d","sessions7d","sessions30d","tasksCompleted7d","tasksFailed7d","tasksCompleted30d","tasksFailed30d","avgTaskDurationMs30d","weekly"]},"OpenApiDocument":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"}},"required":["title","version"],"additionalProperties":{}},"paths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"components":{"type":"object","properties":{},"additionalProperties":{}}},"required":["openapi","info","paths"],"additionalProperties":{}}}},"paths":{"/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Check den-api health","description":"Returns a lightweight health payload for den-api.","responses":{"200":{"description":"den-api is reachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiHealthResponse"}}}}}}},"/ready":{"get":{"operationId":"getReady","tags":["System"],"summary":"Check den-api readiness","description":"Verifies den-api can reach its database dependency.","responses":{"200":{"description":"den-api is ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}},"503":{"description":"den-api is not ready to serve traffic.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenApiReadinessResponse"}}}}}}},"/v1/admin/users/{userId}":{"delete":{"operationId":"deleteV1AdminUsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/plan":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdPlan","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/free-seats":{"patch":{"operationId":"patchV1AdminOrganizationsByOrganizationIdFreeSeats","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/organizations/{organizationId}/capabilities":{"get":{"operationId":"getV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putV1AdminOrganizationsByOrganizationIdCapabilities","parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}],"responses":{"200":{"description":"OK"}}}},"/v1/admin/users":{"get":{"operationId":"getV1AdminUsers","tags":["Admin"],"summary":"Get a bounded admin user page","description":"Returns one bounded page of users plus required pagination metadata. Search runs across the global user set and optional billing enrichment stays page-scoped.","responses":{"200":{"description":"Admin user page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsersPageResponse"}}}},"400":{"description":"The admin user page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/organizations":{"get":{"operationId":"getV1AdminOrganizations","tags":["Admin"],"summary":"Get a bounded admin organization page","description":"Returns one bounded page of organizations plus required pagination metadata. Search runs across the global organization set without changing the global overview totals.","responses":{"200":{"description":"Admin organization page returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationsPageResponse"}}}},"400":{"description":"The admin organization page query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/v1/admin/metrics":{"get":{"operationId":"getV1AdminMetrics","tags":["Admin"],"summary":"Load deferred admin analytics","description":"Calculates analytics that are intentionally deferred from the initial admin page: verified users, worker totals, activity, recurrence, invites, and chart series.","responses":{"200":{"description":"Deferred admin analytics returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMetricsResponse"}}}},"401":{"description":"The caller must be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/admin/overview":{"get":{"operationId":"getV1AdminOverview","tags":["Admin"],"summary":"Get admin overview","description":"Returns the initial admin overview with bounded user data, global totals, and required pagination metadata. Expensive analytics are loaded separately from /v1/admin/metrics.","responses":{"200":{"description":"Administrative overview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverviewResponse"}}}},"400":{"description":"The admin overview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be an authenticated admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The authenticated user is not an admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"includeBilling","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}}]}},"/api/auth/scim/v2/Schemas":{"get":{"operationId":"getApiAuthScimV2Schemas","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes/Group":{"get":{"operationId":"getApiAuthScimV2ResourceTypesGroup","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/ResourceTypes":{"get":{"operationId":"getApiAuthScimV2ResourceTypes","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups":{"get":{"operationId":"getApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}},"post":{"operationId":"postApiAuthScimV2Groups","responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Groups/{groupId}":{"get":{"operationId":"getApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"putApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}},"delete":{"operationId":"deleteApiAuthScimV2GroupsByGroupId","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users/{userId}":{"put":{"operationId":"putApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}},"patch":{"operationId":"patchApiAuthScimV2UsersByUserId","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"OK"}}}},"/api/auth/scim/v2/Users":{"post":{"operationId":"postApiAuthScimV2Users","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/oauth-authorization-server":{"get":{"operationId":"getApiAuthWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/api/auth/.well-known/openid-configuration":{"get":{"operationId":"getApiAuthWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server/api/auth":{"get":{"operationId":"getWellKnownOauthAuthorizationServerApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration/api/auth":{"get":{"operationId":"getWellKnownOpenidConfigurationApiAuth","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"getWellKnownOauthAuthorizationServer","responses":{"200":{"description":"OK"}}}},"/.well-known/openid-configuration":{"get":{"operationId":"getWellKnownOpenidConfiguration","responses":{"200":{"description":"OK"}}}},"/register":{"post":{"operationId":"postRegister","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/register":{"post":{"operationId":"postApiAuthOauth2Register","responses":{"200":{"description":"OK"}}}},"/api/auth/oauth2/authorize":{"get":{"operationId":"getApiAuthOauth2Authorize","responses":{"200":{"description":"OK"}}}},"/v1/auth/login-options":{"get":{"operationId":"getV1AuthLoginOptions","tags":["Authentication"],"summary":"Resolve deterministic login option","description":"Returns the deterministic next authentication step for an email address. SSO is preferred before Google, password, GitHub compatibility, and new account creation.","responses":{"200":{"description":"Login option resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginOptionsResponse"}}}},"400":{"description":"The login option query parameters were invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"invalid_request"}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"email","schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"required":true}]}},"/v1/bootstrap/workspace":{"post":{"operationId":"postV1BootstrapWorkspace","tags":["Bootstrap"],"summary":"Create a provisional workspace for agent-first setup","description":"Creates a provisional workspace, setup member, starter skill, and short-lived claim links without requiring an email account first.","responses":{"200":{"description":"Workspace bootstrap completed.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","const":"provisional"}},"required":["id","name","slug","status"]},"setup":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wbt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wbt_.*"},"expiresAt":{"type":"string"}},"required":["id","expiresAt"]},"skill":{"type":"object","properties":{"id":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"title":{"type":"string"},"output":{"type":"string","const":"OPENWORK_BOOTSTRAP_SKILL_TRIGGERED"}},"required":["id","title","output"]},"claimLinks":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Den TypeID with 'wcl_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wcl_.*"},"role":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","role","token","url","expiresAt"]}}},"required":["ok","organization","setup","skill","claimLinks"]}}}},"400":{"description":"The bootstrap request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceName":{"type":"string","minLength":2,"maxLength":120},"skillName":{"default":"First OpenWork Skill","type":"string","minLength":1,"maxLength":120},"devicePublicKey":{"type":"string","minLength":16,"maxLength":4096},"claimRoles":{"default":["owner"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["owner","admin","member"]}},"ownerEmail":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"teammateEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["workspaceName"]}}}}}},"/v1/bootstrap/claims/accept":{"post":{"operationId":"postV1BootstrapClaimsAccept","tags":["Bootstrap"],"summary":"Claim a provisional workspace","description":"Lets a signed-in human claim ownership or membership of a provisional agent-created workspace.","responses":{"200":{"description":"Workspace claim accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"organization":{"type":"object","properties":{"id":{"description":"Den TypeID with 'org_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^org_.*"},"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string"}},"required":["id","name","slug","role"]}},"required":["ok","organization"]}}}},"400":{"description":"The claim request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to claim a workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller cannot accept this claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The claim token was missing, expired, or already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":24,"maxLength":255}},"required":["token"]}}}}}},"/v1/skill-hubs":{"post":{"operationId":"postV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"Create skill hub","description":"Create skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}},"get":{"operationId":"getV1SkillHubs","tags":["Deprecated"],"deprecated":true,"summary":"List skill hubs","description":"List skill hubs. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}}}},"/v1/skill-hubs/{skillHubId}":{"patch":{"operationId":"patchV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Update skill hub","description":"Update skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]},"delete":{"operationId":"deleteV1SkillHubsBySkillHubId","tags":["Deprecated"],"deprecated":true,"summary":"Delete skill hub","description":"Delete skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills":{"post":{"operationId":"postV1SkillHubsBySkillHubIdSkills","tags":["Deprecated"],"deprecated":true,"summary":"Add skill to skill hub","description":"Add skill to skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/skills/{skillId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdSkillsBySkillId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill from skill hub","description":"Remove skill from skill hub. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"skillId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access":{"post":{"operationId":"postV1SkillHubsBySkillHubIdAccess","tags":["Deprecated"],"deprecated":true,"summary":"Grant skill hub access","description":"Grant skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true}]}},"/v1/skill-hubs/{skillHubId}/access/{accessId}":{"delete":{"operationId":"deleteV1SkillHubsBySkillHubIdAccessByAccessId","tags":["Deprecated"],"deprecated":true,"summary":"Remove skill hub access","description":"Remove skill hub access. Skill hubs are deprecated; use plugins instead.","responses":{"410":{"description":"Skill hubs are deprecated. Use plugins instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedSkillHubError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"skillHubId","required":true},{"schema":{"type":"string"},"in":"path","name":"accessId","required":true}]}},"/v1/dev/emails":{"get":{"operationId":"getV1DevEmails","responses":{"200":{"description":"OK"}}}},"/v1/dev/emails/last":{"get":{"operationId":"getV1DevEmailsLast","responses":{"200":{"description":"OK"}}}},"/v1/me":{"get":{"operationId":"getV1Me","tags":["Users"],"summary":"Get current user","description":"Returns the currently authenticated user and active session details for the caller.","responses":{"200":{"description":"Current user and session returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserResponse"}}}},"401":{"description":"The caller must be signed in to read profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/me/orgs":{"get":{"operationId":"getV1MeOrgs","tags":["Users"],"summary":"List current user's organizations","description":"Lists the organizations visible to the current user and marks which organization is currently active.","responses":{"200":{"description":"Current user organizations returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserOrganizationsResponse"}}}}}}},"/v1/me/send-download-link":{"post":{"operationId":"postV1MeSendDownloadLink","tags":["Users"],"summary":"Send current user the OpenWork desktop download link","description":"Emails the authenticated user a link to download the OpenWork desktop app.","responses":{"200":{"description":"Download link email sent successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkResponse"}}}},"400":{"description":"The signed-in account is missing an email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request a download link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"429":{"description":"The user has requested too many download links recently.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkRateLimitError"}}}},"502":{"description":"The download link email provider rejected or failed to deliver the email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDownloadLinkEmailFailedError"}}}}}}},"/v1/me/profile":{"patch":{"operationId":"patchV1MeProfile","tags":["Users"],"summary":"Update current user profile","description":"Updates the signed-in user's display name.","responses":{"200":{"description":"Current user profile updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCurrentUserProfileResponse"}}}},"400":{"description":"The profile update request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update profile data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","maxLength":120},"lastName":{"type":"string","maxLength":120}},"required":["firstName","lastName"]}}}}}},"/v1/me/desktop-config":{"get":{"operationId":"getV1MeDesktopConfig","tags":["Users"],"summary":"Get current user's desktop config","description":"Returns the authenticated desktop app restrictions for the caller's active organization.","responses":{"200":{"description":"Current user desktop config returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserDesktopConfigResponse"}}}},"401":{"description":"The caller must be signed in to read desktop config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/memory":{"post":{"operationId":"postV1Memory","tags":["Memory"],"summary":"Save a memory to the memory bank. Body: { content: string (required); tags?: string[]; contexts?: Array<{ snippet: string (required); conversation_id?: string; message_id?: string; origin?: \"active_conversation\" | \"searched_conversation\" }> }.","description":"Persists a human-confirmed memory for the calling user. The server sets the source and always stores it as a personal ('user') memory regardless of any scope sent by the client.","responses":{"201":{"description":"Memory saved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMemoryResponse"}}}},"400":{"description":"The save payload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to save a memory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The caller has no active organization they are a member of to save the memory to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMemoryRequest"}}}}},"get":{"operationId":"getV1Memory","tags":["Memory"],"summary":"List your saved memories with their provenance.","description":"Returns the caller's own memories, newest first, each with its captured context (citations + snippets).","responses":{"200":{"description":"Memories returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"400":{"description":"The list query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/memory/search":{"get":{"operationId":"getV1MemorySearch","tags":["Memory"],"summary":"Search your memories with a natural-language query.","description":"Runs a relevance-ranked full-text search over the caller's own memories. Returns an empty result set (not an error) when nothing matches.","responses":{"200":{"description":"Search results returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchResponse"}}}},"400":{"description":"The search query was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to search memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":512},"required":true},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]}},"/v1/memory/{id}":{"delete":{"operationId":"deleteV1MemoryById","tags":["Memory"],"summary":"Delete one of your saved memories.","description":"Hard-deletes a memory and its captured context rows. Returns 404 for an id the caller does not own.","responses":{"204":{"description":"Memory deleted successfully."},"400":{"description":"The memory id path parameter was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete memories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The memory could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/v1/org":{"patch":{"operationId":"patchV1Org","tags":["Organizations"],"summary":"Update organization","description":"Updates organization fields. Workspace owners and super-admins can change settings. The slug is immutable to avoid breaking dashboard URLs.","responses":{"200":{"description":"Organization updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"400":{"description":"The organization update request body was invalid, contained malformed email domains, or contained an invalid brand icon URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationBadRequest"}}}},"401":{"description":"The caller must be signed in to update an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Enabling enforced SSO or desktop version controls requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"The caller does not have permission to update the requested organization fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"allowedEmailDomains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"allowedDesktopVersions":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":32}},{"type":"null"}]},"requireSso":{"type":"boolean"},"brandAppName":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"brandLogoUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandIconUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"brandAccentColor":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]}}}}}}},"get":{"operationId":"getV1Org","tags":["Organizations"],"summary":"Get active organization","description":"Returns the active organization from the current session, including its owner, the current member record, and their team memberships.","responses":{"200":{"description":"Organization context returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}},"401":{"description":"The caller must be signed in to load organization context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"delete":{"operationId":"deleteV1Org","tags":["Organizations"],"summary":"Delete organization","description":"Permanently deletes the active organization and its organization-scoped data. Owners must have a fresh privileged session.","responses":{"200":{"description":"Organization deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrganizationResponse"}}}},"401":{"description":"The caller must be signed in to delete an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners with a fresh privileged session can delete organizations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/orgs/invitations/preview":{"get":{"operationId":"getV1OrgsInvitationsPreview","tags":["Invitations"],"summary":"Preview organization invitation","description":"Returns invitation preview details so a user can inspect an organization invite before accepting it.","responses":{"200":{"description":"Invitation preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"400":{"description":"The invitation preview query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"query","name":"id","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/orgs/invitations/accept":{"post":{"operationId":"postV1OrgsInvitationsAccept","tags":["Invitations"],"summary":"Accept organization invitation","description":"Accepts an organization invitation for the current signed-in user and switches their active organization to the accepted workspace.","responses":{"200":{"description":"Invitation accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptedResponse"}}}},"400":{"description":"The invitation acceptance request body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to accept an invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot accept invitations, or the deployment requires a verified account email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The current account email is not allowed to join this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEmailDomainNotAllowedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":255}},"required":["id"]}}}}}},"/v1/api-keys":{"get":{"operationId":"getV1ApiKeys","tags":["API Keys"],"summary":"List organization API keys","description":"Returns the API keys that belong to the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}}},"post":{"operationId":"postV1ApiKeys","tags":["API Keys"],"summary":"Create an organization API key","description":"Creates a new API key for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationApiKeyForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationApiKeyRequest"}}}}}},"/v1/brand-assets/{organizationId}/{kind}/{version}":{"get":{"operationId":"getV1BrandAssetsByOrganizationIdByKindByVersion","tags":["Organizations"],"summary":"Read an immutable organization brand asset","description":"Serves a capability-signed, content-addressed organization logo or app icon from this Den deployment.","responses":{"200":{"description":"Immutable brand image bytes."},"404":{"description":"The managed brand asset could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true},{"schema":{"type":"string"},"in":"path","name":"kind","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/v1/org/brand-assets":{"post":{"operationId":"postV1OrgBrandAssets","tags":["Organizations"],"summary":"Upload organization brand assets","description":"Validates and stores owner-supplied wordmark and app icon files inside the Den deployment.","responses":{"200":{"description":"Managed brand assets were saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBrandAssetUploadResponse"}}}},"400":{"description":"A supplied brand asset was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can upload brand assets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"413":{"description":"The upload exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidManagedBrandAssetError"}}}}}}},"/v1/desktop-policies":{"get":{"operationId":"getV1DesktopPolicies","tags":["Desktop Policies"],"summary":"List desktop policies","responses":{"200":{"description":"Desktop policies returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyListResponse"}}}},"401":{"description":"The caller must be signed in to list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can list desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DesktopPolicies","tags":["Desktop Policies"],"summary":"Create desktop policy","responses":{"201":{"description":"Desktop policy created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can create desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"A referenced member or team was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["policyName","policy"]}}}}}},"/v1/desktop-policies/{desktopPolicyId}":{"patch":{"operationId":"patchV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Update desktop policy","responses":{"200":{"description":"Desktop policy updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopPolicyResponse"}}}},"400":{"description":"The desktop policy request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Desktop policy management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can update desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy or a referenced resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^dpo_.*"},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyName":{"type":"string","minLength":1,"maxLength":255},"policy":{"$ref":"#/components/schemas/DenDesktopPolicyDocumentWrite"},"priority":{"type":"integer","minimum":0,"maximum":1000000},"isEnabled":{"type":"boolean"},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["policyName","policy"]}}}}},"delete":{"operationId":"deleteV1DesktopPoliciesByDesktopPolicyId","tags":["Desktop Policies"],"summary":"Delete desktop policy","responses":{"204":{"description":"Desktop policy deleted successfully."},"401":{"description":"The caller must be signed in to delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete desktop policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The policy was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"desktopPolicyId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^dpo_.*"},"required":true,"description":"Den TypeID with 'dpo_' prefix and a 26-character base32 suffix."}]}},"/v1/diagnostics/egress":{"get":{"operationId":"getV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Describe the controlled Den egress diagnostic","description":"Reports whether the operator-configured public Diagnostics target is available. The target cannot be supplied by the browser.","responses":{"200":{"description":"Egress diagnostic configuration returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"targetOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["available","targetOrigin","missingConfiguration"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can inspect egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"post":{"operationId":"postV1DiagnosticsEgress","tags":["Diagnostics"],"summary":"Run the controlled Den egress diagnostic","description":"Runs fixed HTTP, redirect, OAuth-shaped, and MCP probes from the Den process to the operator-configured public Diagnostics origin.","responses":{"200":{"description":"The completed diagnostic run, including a failed result when a layer did not pass.","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetOrigin":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"overallStatus":{"type":"string","enum":["passed","failed"]},"highestPassingStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"failedStep":{"anyOf":[{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},{"type":"null"}]},"steps":{"minItems":6,"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["reachability","http-methods","redirect","oauth-discovery","oauth-token","mcp-handshake"]},"label":{"type":"string","minLength":1,"maxLength":120},"category":{"type":"string","enum":["connectivity","http","oauth","mcp"]},"status":{"type":"string","enum":["passed","failed","skipped"]},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"httpStatuses":{"maxItems":16,"type":"array","items":{"type":"integer","minimum":100,"maximum":599}},"diagnosticIds":{"maxItems":16,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"code":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"message":{"type":"string","minLength":1,"maxLength":500},"owner":{"type":"string","enum":["den-operator","network-administrator","openwork-support"]},"action":{"type":"string","minLength":1,"maxLength":500}},"required":["id","label","category","status","startedAt","completedAt","durationMs","httpStatuses","diagnosticIds","code","message","owner","action"]}}},"required":["runId","targetOrigin","supportUrl","startedAt","completedAt","overallStatus","highestPassingStep","failedStep","steps"]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can run egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"503":{"description":"The Den operator has not configured the Diagnostics target.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"egress_diagnostics_not_configured"},"missingConfiguration":{"maxItems":2,"type":"array","items":{"type":"string","enum":["DEN_DIAGNOSTICS_ORIGIN","DEN_DIAGNOSTICS_BEARER_TOKEN"]}}},"required":["error","missingConfiguration"]}}}}}}},"/v1/diagnostics/egress/token":{"put":{"operationId":"putV1DiagnosticsEgressToken","tags":["Diagnostics"],"summary":"Set the organization egress diagnostic bearer token","description":"Stores the synthetic Diagnostics bearer token encrypted for this organization. The token is never returned by the API.","responses":{"204":{"description":"The diagnostic token was stored."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can configure egress diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/inference":{"get":{"operationId":"getV1Inference","tags":["Inference"],"summary":"Get inference settings","description":"Returns OpenWork Models enablement and limit context for the active organization.","responses":{"200":{"description":"Inference settings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"401":{"description":"The caller must be signed in to read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"patch":{"operationId":"patchV1Inference","tags":["Inference"],"summary":"Update inference settings","description":"Enables or disables OpenWork Models for the active organization.","responses":{"200":{"description":"Inference settings updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceStatusResponse"}}}},"400":{"description":"The inference settings request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InferenceProviderMissingError"}]}}}},"401":{"description":"The caller must be signed in to update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update inference settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"tier":{"type":"string","enum":["tier1","tier2"]}},"required":["enabled"]}}}}}},"/v1/scim":{"get":{"operationId":"getV1Scim","tags":["SCIM"],"summary":"Get organization SCIM connection","description":"Returns the SCIM provisioning base URL, group-to-team mapping mode, and current connector metadata for the selected organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}},"patch":{"operationId":"patchV1Scim","tags":["SCIM"],"summary":"Update organization SCIM settings","description":"Controls whether provisioned SCIM Groups remain metadata or create and manage organization teams.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SCIM settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimConnectionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Only workspace owners and super-admins can manage SCIM."},"404":{"description":"SCIM connection not found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupMappingMode":{"type":"string","enum":["metadata_only","create_teams"]}},"required":["groupMappingMode"]}}}}},"delete":{"operationId":"deleteV1Scim","tags":["SCIM"],"summary":"Delete an organization SCIM connection","description":"Deletes the organization SCIM connection and invalidates the current bearer token.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SCIM connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/scim/token":{"post":{"operationId":"postV1ScimToken","tags":["SCIM"],"summary":"Create or rotate an organization SCIM token","description":"Creates the organization SCIM provisioning connector if needed and returns a freshly rotated bearer token.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SCIM token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateOrganizationScimTokenResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}},"409":{"description":"An enabled SSO connection is required before creating or rotating a SCIM token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimSsoRequiredError"}}}}}}},"/v1/scim/reconcile":{"post":{"operationId":"postV1ScimReconcile","tags":["SCIM"],"summary":"Run organization SCIM drift reconciliation","description":"Checks local SCIM-managed identities for inconsistent organization membership or provider-account state and records unresolved drift for retry or manual review.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SCIM reconciliation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationScimReconciliationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SCIM.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimOrganizationNotFoundError"}}}}}}},"/v1/sso":{"get":{"operationId":"getV1Sso","tags":["SSO"],"summary":"Get organization SSO connection","description":"Returns the current organization SSO connection and setup URLs.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization SSO configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}},"delete":{"operationId":"deleteV1Sso","tags":["SSO"],"summary":"Delete organization SSO connection","description":"Deletes the active organization SSO connection.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO connection deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/saml":{"post":{"operationId":"postV1SsoSaml","tags":["SSO"],"summary":"Register organization SAML SSO","description":"Registers or replaces the active organization SAML SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/oidc":{"post":{"operationId":"postV1SsoOidc","tags":["SSO"],"summary":"Register organization OIDC SSO","description":"Registers or replaces the active organization OIDC SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Organization SSO connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/metadata":{"get":{"operationId":"getV1SsoMetadata","tags":["SSO"],"summary":"Get organization SAML SP metadata","description":"Returns the generated Service Provider metadata for the current organization's SAML connection.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SAML metadata document"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can read SSO metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/request-domain-verification":{"post":{"operationId":"postV1SsoRequestDomainVerification","tags":["SSO"],"summary":"Request an SSO domain verification token","description":"Returns the DNS TXT verification token for the current organization's SSO provider.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Domain verification token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSsoDomainVerificationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/sso/verify-domain":{"post":{"operationId":"postV1SsoVerifyDomain","tags":["SSO"],"summary":"Verify the organization SSO domain","description":"Checks the provider's DNS TXT record and marks the domain as verified when present.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Organization SSO domain verified"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoInvalidRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoUnauthorizedError"}}}},"402":{"description":"SSO management requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}},"403":{"description":"Only workspace owners and super-admins can manage SSO.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoForbiddenError"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoOrganizationNotFoundError"}}}}}}},"/v1/invitations":{"post":{"operationId":"postV1Invitations","tags":["Invitations"],"summary":"Create organization invitation","description":"Creates or refreshes a pending organization invitation for an email address and sends the invite email. Returns 502 when the invitation row is persisted but the configured email provider failed to send; the client should surface the error and give the user a retry affordance.","responses":{"200":{"description":"Existing invitation refreshed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"201":{"description":"Invitation created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"400":{"description":"The invitation request body or path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to invite organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"A seat subscription is required before inviting more members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePaymentRequiredError"}}}},"403":{"description":"Only workspace owners and admins can create invitations. Admins can only invite members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The email address is outside this workspace's allowed domains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteEmailDomainNotAllowedError"}}}},"502":{"description":"The invitation was saved but the email provider rejected or failed to deliver it. Retry by submitting the same email again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationEmailFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","minLength":1,"maxLength":64}},"required":["email","role"]}}}}}},"/v1/invitations/{invitationId}/cancel":{"post":{"operationId":"postV1InvitationsByInvitationIdCancel","tags":["Invitations"],"summary":"Cancel organization invitation","description":"Cancels a pending organization invitation so the invite link can no longer be used.","responses":{"200":{"description":"Invitation cancelled successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The invitation cancellation path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can cancel invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The invitation or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"invitationId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^inv_.*"},"required":true,"description":"Den TypeID with 'inv_' prefix and a 26-character base32 suffix."}]}},"/v1/orgs/{organizationId}/install-links":{"post":{"operationId":"postV1OrgsByOrganizationIdInstallLinks","tags":["Organizations"],"summary":"Create organization install link","description":"Mints a shareable OpenWork desktop install link for a signed-in organization member. Older active links remain valid unless an owner or admin explicitly requests rotation.","responses":{"200":{"description":"Install link created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkResponse"}}}},"400":{"description":"The install-link request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The organization needs the installLinks capability enabled, and only workspace owners and admins can rotate existing links.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/CapabilityDisabledError"}]}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"The member has created too many install links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallLinkRequest"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organizationId","required":true}]}},"/v1/install-config":{"get":{"operationId":"getV1InstallConfig","tags":["Organizations"],"summary":"Resolve install-link configuration","description":"Returns organization setup details and a fresh desktop connection handoff for a valid install link token.","responses":{"200":{"description":"Install configuration resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallExperienceConfig"}}}},"400":{"description":"The install-link token was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many install-link attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true}]}},"/v1/install-connect/status":{"post":{"operationId":"postV1InstallConnectStatus","tags":["Organizations"],"summary":"Inspect desktop connection status","description":"Reports whether a short-lived organization connection code is still pending or has been accepted by a desktop.","responses":{"200":{"description":"Desktop connection status resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantStatusResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install-connect/preview":{"post":{"operationId":"postV1InstallConnectPreview","tags":["Organizations"],"summary":"Preview desktop connection","description":"Resolves a short-lived organization connection code without consuming it.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install-connect/exchange":{"post":{"operationId":"postV1InstallConnectExchange","tags":["Organizations"],"summary":"Accept desktop connection","description":"Consumes a short-lived organization connection code exactly once.","responses":{"200":{"description":"Desktop connection resolved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantResponse"}}}},"400":{"description":"The connection code body was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The connection code was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"409":{"description":"The connection code was already consumed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"410":{"description":"The connection code expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopConnectGrantFailure"}}}},"429":{"description":"Too many connection attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{24,128}$"}},"required":["code"]}}}}}},"/v1/install/{platform}":{"get":{"operationId":"getV1InstallByPlatform","tags":["Organizations"],"summary":"Download OpenWork installer","description":"Always serves the OpenWork installer for the requested platform. By default Den redirects to the public release asset; unrestricted official-repo organizations follow the latest published release. Operators can optionally mount installer artifacts for an air-gapped mirror.","responses":{"200":{"description":"Installer artifact returned successfully.","content":{"text/plain":{"schema":{"type":"string"}}}},"302":{"description":"Den redirected the browser to the public OpenWork installer release asset."},"400":{"description":"The install-link token or platform was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The install link was missing, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallLinkNotFoundError"}}}},"429":{"description":"Too many installer download attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}}},"parameters":[{"in":"query","name":"token","schema":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9_-]{8,}$"},"required":true},{"schema":{"type":"string"},"in":"path","name":"platform","required":true}]}},"/v1/llm-providers/test-connection":{"post":{"operationId":"postV1LlmProvidersTestConnection","tags":["LLM Providers"],"summary":"Test a custom LLM provider endpoint","description":"Probes an OpenAI-compatible endpoint (Azure AI Foundry, LiteLLM, vLLM, gateways) with the given credential: normalizes common base-URL mistakes, calls GET /models, and returns the model ids the endpoint actually serves — on Azure these are the deployment names. Nothing is stored.","responses":{"200":{"description":"Probe completed (ok=false carries a human hint).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderTestConnectionResponse"}}}},"400":{"description":"The probe request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to test provider endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"api":{"type":"string","minLength":1,"maxLength":2048},"apiKey":{"type":"string","maxLength":65535},"modelIds":{"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["api"]}}}}}},"/v1/llm-provider-catalog":{"get":{"operationId":"getV1LlmProviderCatalog","tags":["LLM Providers"],"summary":"List LLM provider catalog","description":"Lists the provider catalog from models.dev so an organization can choose which LLM providers to configure.","responses":{"200":{"description":"Provider catalog returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogListResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to browse the provider catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}}}},"/v1/llm-provider-catalog/{providerId}":{"get":{"operationId":"getV1LlmProviderCatalogByProviderId","tags":["LLM Providers"],"summary":"Get LLM provider catalog entry","description":"Returns the full models.dev catalog record for one provider, including its config template and model list.","responses":{"200":{"description":"Provider catalog entry returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderCatalogResponse"}}}},"400":{"description":"The provider catalog path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect provider catalog entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The requested provider catalog entry could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"502":{"description":"The external provider catalog was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogUnavailableError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/llm-providers":{"get":{"operationId":"getV1LlmProviders","tags":["LLM Providers"],"summary":"List organization LLM providers","description":"Lists usable providers by default. Pass scope=manageable to list providers the current member can administer in Den.","responses":{"200":{"description":"Accessible organization LLM providers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderListResponse"}}}},"400":{"description":"The provider list path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1LlmProviders","tags":["LLM Providers"],"summary":"Create organization LLM provider","description":"Creates a new organization-scoped LLM provider from either a models.dev provider template, pasted JSON/JSONC custom configuration, or MCP-supplied customConfig object.","responses":{"201":{"description":"Organization LLM provider created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"A referenced provider, model, member, or team could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["name","source"]}}}}}},"/v1/llm-providers/{llmProviderId}/connect":{"get":{"operationId":"getV1LlmProvidersByLlmProviderIdConnect","tags":["LLM Providers"],"summary":"Get LLM provider connect payload","description":"Returns one accessible organization LLM provider with the concrete model configuration needed to connect to it.","responses":{"200":{"description":"Provider connection payload returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider connect path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect to an organization LLM provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only members with explicit member or team access grants can connect to this provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}":{"patch":{"operationId":"patchV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Update organization LLM provider","description":"Updates an existing organization LLM provider, including its provider config, selected models, secret, and access grants. Custom providers accept JSON/JSONC text or an MCP-supplied customConfig object.","responses":{"200":{"description":"Organization LLM provider updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProviderResponse"}}}},"400":{"description":"The provider update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can update providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or a referenced resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"source":{"type":"string","enum":["models_dev","custom"]},"providerId":{"type":"string","minLength":1,"maxLength":255},"modelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"customConfigText":{"type":"string","minLength":1},"customConfig":{},"apiKey":{"type":"string","maxLength":65535},"apiKeys":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":255},"additionalProperties":{"type":"string","maxLength":65535}},"memberIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":500,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}},"required":["name","source"]}}}}},"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderId","tags":["LLM Providers"],"summary":"Delete organization LLM provider","description":"Deletes an organization LLM provider and removes its models and access rules.","responses":{"204":{"description":"Organization LLM provider deleted successfully."},"400":{"description":"The provider deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization LLM providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can delete providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."}]}},"/v1/llm-providers/{llmProviderId}/access/{accessId}":{"delete":{"operationId":"deleteV1LlmProvidersByLlmProviderIdAccessByAccessId","tags":["LLM Providers"],"summary":"Remove LLM provider access grant","description":"Removes one explicit member or team access grant from an organization LLM provider.","responses":{"204":{"description":"Organization LLM provider access removed successfully."},"400":{"description":"The provider access deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the provider creator or a workspace admin can manage provider access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The provider or access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The request tried to remove a protected provider access entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}}},"parameters":[{"in":"path","name":"llmProviderId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpr_.*"},"required":true,"description":"Den TypeID with 'lpr_' prefix and a 26-character base32 suffix."},{"in":"path","name":"accessId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^lpa_.*"},"required":true,"description":"Den TypeID with 'lpa_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}/role":{"post":{"operationId":"postV1MembersByMemberIdRole","tags":["Members"],"summary":"Update member role","description":"Changes the role assigned to a specific organization member.","responses":{"200":{"description":"Member role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The member role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update member roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":64}},"required":["role"]}}}}}},"/v1/members/{memberId}/transfer-ownership":{"post":{"operationId":"postV1MembersByMemberIdTransferOwnership","tags":["Members"],"summary":"Transfer workspace ownership","description":"Transfers the protected workspace owner role to another active super-admin member.","responses":{"200":{"description":"Workspace ownership transferred successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The ownership transfer request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners can transfer ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The target member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/members/{memberId}":{"delete":{"operationId":"deleteV1MembersByMemberId","tags":["Members"],"summary":"Remove organization member","description":"Removes a member from an organization while protecting the owner role from deletion.","responses":{"204":{"description":"Member removed successfully."},"400":{"description":"The member removal request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove organization members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can remove members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The member or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"memberId","schema":{"format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"required":true,"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix."}]}},"/v1/oauth-providers/{providerId}/client":{"post":{"operationId":"postV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Save an org's OAuth client for a provider","description":"Admin-only. Lets an org bring its own OAuth app (client id + secret) for a native provider such as google-workspace, instead of relying on an OpenWork-owned client.","responses":{"200":{"description":"OAuth client saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigResponse"}}}},"400":{"description":"The request body or providerId was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure an OAuth client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"tenantId":{"type":"string","minLength":1,"maxLength":253}}}}}}},"get":{"operationId":"getV1OauthProvidersByProviderIdClient","tags":["Authentication"],"summary":"Get an org's OAuth client configuration for a provider","description":"Admin-only. Returns setup status, the saved OAuth client id when configured, selected permission features, the callback redirect URI, and the full scope list members will be asked to approve. Never returns the client secret.","responses":{"200":{"description":"OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientConfigDetailResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can view an OAuth client configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/connect/start":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member's account for a provider","description":"Returns an authorize URL to redirect the member's browser to. Requires the org to have already saved an OAuth client for this provider.","responses":{"200":{"description":"Authorize URL to redirect to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConnectStartResponse"}}}},"400":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/mcp-connections/google-workspace/connect/start":{"get":{"operationId":"getV1McpConnectionsGoogleWorkspaceConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Google Workspace","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/mcp-connections/microsoft-365/connect/start":{"get":{"operationId":"getV1McpConnectionsMicrosoft365ConnectStart","tags":["Authentication"],"summary":"Begin connecting the calling member to Microsoft 365","description":"Native-provider twin of the external MCP connect/start route: returns an authorize URL for the browser, using the OAuth client the org saved for this provider.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeProviderConnectStartResponse"}}}},"400":{"description":"The OAuth client configuration is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The org has not configured an OAuth client for this provider yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientNotConfiguredError"}}}}}}},"/v1/oauth-providers/{providerId}/connect/callback":{"get":{"operationId":"getV1OauthProvidersByProviderIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for a provider","description":"The provider redirects here with code+state after the member consents. Identity is carried entirely by the signed state token, not a session cookie, since the redirect may arrive in a fresh browser context. Serves a small static HTML page that deep-links back to OpenWork.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/status":{"get":{"operationId":"getV1OauthProvidersByProviderIdStatus","tags":["Capability Sources"],"summary":"Check whether the calling member has connected a provider","description":"Read-only. Never returns a token — only whether a connection exists and which scopes/account it covers. Safe to expose to a harness so it can detect \"not connected\" and tell the human what to do.","responses":{"200":{"description":"Connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProviderStatusResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown providerId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownOAuthProviderError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/oauth-providers/{providerId}/disconnect":{"post":{"operationId":"postV1OauthProvidersByProviderIdDisconnect","tags":["Capability Sources"],"summary":"Disconnect the calling member's account for a provider","description":"Removes the stored credential. Mutation — intentionally kept out of the agent-callable MCP surface (see policy.ts BLOCKED_OPERATION_IDS).","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"providerId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/v1/capabilities/google-workspace/gmail-messages":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessages","tags":["Capability Sources"],"summary":"List or search Gmail messages as the calling member","description":"Reads and searches inbox mail in the calling member's Gmail mailbox, using the Google account they connected through the org Google Workspace connection. Returns needs_connection when the member has not connected their Google account yet or the connection lacks Gmail read permission.","responses":{"200":{"description":"Gmail messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Gmail search query, using Gmail's search syntax."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/google-workspace/gmail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailMessageByMessageId","tags":["Capability Sources"],"summary":"Read a Gmail message with its plain-text body as the calling member","description":"Reads one Gmail message, including decoded plain-text body content and attachment metadata, using the calling member's connected Google Workspace account. To download an attachment's bytes, pass its attachmentId to the gmail-attachment capability.","responses":{"200":{"description":"Gmail message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id."}]}},"/v1/capabilities/google-workspace/gmail-attachment/{messageId}/{attachmentId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceGmailAttachmentByMessageIdByAttachmentId","tags":["Capability Sources"],"summary":"Download a Gmail attachment's bytes as the calling member","description":"Downloads one Gmail attachment (file) as base64-encoded bytes, using the messageId and the attachmentId from the gmail-message capability's attachments metadata. Decode dataBase64 locally to reconstruct the file, e.g. a PDF or spreadsheet, then extract its contents.","responses":{"200":{"description":"Gmail attachment returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceGmailAttachmentResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Gmail message id that contains the attachment."},{"in":"path","name":"attachmentId","schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"description":"Attachment id from the gmail-message capability's attachments metadata."}]}},"/v1/capabilities/google-workspace/calendar-events":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"List Google Calendar events in a time range as the calling member","description":"Lists primary-calendar events for the calling member in a requested ISO time range, using their connected Google Workspace account.","responses":{"200":{"description":"Google Calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceCalendarEvents","tags":["Capability Sources"],"summary":"Create a Google Calendar event as the calling member","description":"Creates an event on the calling member's primary Google Calendar, using their connected Google Workspace account. Set createMeetLink to true to request a Google Meet conferencing link and return meetLink.","responses":{"200":{"description":"Google Calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceCreateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/calendar-event/{eventId}":{"patch":{"operationId":"patchV1CapabilitiesGoogleWorkspaceCalendarEventByEventId","tags":["Capability Sources"],"summary":"Add a Google Meet link to a Calendar event","description":"Updates one primary-calendar event by id to request Google Meet conferencing, using the calling member's connected Google Workspace account. Use this for an existing event that needs a Meet link without creating a duplicate.","responses":{"200":{"description":"Google Calendar event updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"eventId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Calendar event id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpdateCalendarEventBody"}}}}}},"/v1/capabilities/google-workspace/drive-files":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFiles","tags":["Capability Sources"],"summary":"Search Google Drive files as the calling member","description":"Searches the calling member's Google Drive files by name and full text, using their connected Google Workspace account.","responses":{"200":{"description":"Google Drive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in Drive file names and full text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]},"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceDriveFiles","tags":["Capability Sources"],"summary":"Upload file bytes to Google Drive as the calling member","description":"Creates a file in the calling member's Google Drive using standard base64 bytes. The gmail-attachment capability returns dataBase64 in this exact encoding — pass it through directly to save an email attachment to Drive. The response file.webViewLink is the user-facing link — share it with the user.","responses":{"200":{"description":"Google Drive file uploaded. The file.webViewLink is the user-facing link — share it with the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUploadDriveFileResponse"}}}},"400":{"description":"The upload request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUploadDriveFileBody"}}}}}},"/v1/capabilities/google-workspace/drive-file/{fileId}":{"get":{"operationId":"getV1CapabilitiesGoogleWorkspaceDriveFileByFileId","tags":["Capability Sources"],"summary":"Read a Google Drive file's text content as the calling member","description":"Reads text from one Google Drive file, exporting Google Docs editors files as plain text and downloading other files as UTF-8 text with truncation.","responses":{"200":{"description":"Google Drive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}]}},"/v1/capabilities/google-workspace/drive-file-share/{fileId}":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceDriveFileShareByFileId","tags":["Capability Sources"],"summary":"Share a Google Drive file with a person or the organization","description":"Creates a Drive permission for one file using the calling member's Google Workspace account. To share with one person pass type=user plus emailAddress; to share with the entire organization pass type=domain plus the org's Google Workspace domain (e.g. openworklabs.com). Sharing files not created through OpenWork needs the Full Drive access feature enabled by an admin.","responses":{"200":{"description":"Google Drive file shared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileResponse"}}}},"400":{"description":"The share request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"parameters":[{"in":"path","name":"fileId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Google Drive file id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceShareDriveFileBody"}}}}}},"/v1/capabilities/google-workspace/gmail-drafts":{"post":{"operationId":"postV1CapabilitiesGoogleWorkspaceGmailDrafts","tags":["Capability Sources"],"summary":"Create a Gmail draft or threaded reply draft; attach workspace files with body.attachments: [{ filename, mimeType, dataBase64 }], where dataBase64 is each attachment's file bytes encoded as standard base64","description":"Creates a plain-text Gmail draft in the calling member own mailbox, with optional Cc/Bcc recipients and files read from the active workspace. Set threadId to attach the draft to an existing Gmail thread as a reply using the thread's matching subject; threadId is required for replies and forwards. For threaded drafts, OpenWork appends the quoted conversation automatically. Always share the returned draftUrl with the user because it opens the ready-to-send draft in Gmail for review and send. Returns needs_connection when the member has not connected their Google account yet or when a threaded reply needs Gmail read permission.","responses":{"200":{"description":"Draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceDraftResponse"}}}},"400":{"description":"The draft request was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/GoogleWorkspaceMissingThreadIdError"}]}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Google account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceNeedsConnectionError"}}}},"502":{"description":"Google rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUpstreamError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":3,"maxLength":320,"description":"Recipient email address."},"cc":{"description":"Optional comma-separated Cc email addresses.","type":"string","minLength":3,"maxLength":1000},"bcc":{"description":"Optional comma-separated Bcc email addresses.","type":"string","minLength":3,"maxLength":1000},"subject":{"type":"string","minLength":1,"maxLength":500,"description":"Draft subject line. For replies or forwards, include threadId; subjects starting with Re: or Fwd: are rejected without threadId so the draft stays on the existing conversation."},"body":{"type":"string","minLength":1,"maxLength":50000,"description":"Plain-text draft body. Write plain prose with no markdown syntax, separate paragraphs with blank lines, and do not hard-wrap prose. For threaded drafts, the server appends the quoted conversation automatically; do not include quoted history."},"threadId":{"description":"Gmail thread id to reply on. Required for replies and forwards; get it from the gmail-messages capability. When set, the draft is attached to that thread as a reply — keep the thread's subject (e.g. 'Re: …').","type":"string","minLength":1,"maxLength":512},"attachments":{"description":"Optional files from the active workspace to attach to this draft.","minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Filename to show in Gmail."},"mimeType":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$","description":"Attachment MIME type."},"dataBase64":{"type":"string","minLength":1,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"File bytes encoded as standard base64. Read the file from the active workspace and base64-encode it. Maximum decoded size: 10 MiB per file and 20 MiB total."}},"required":["filename","mimeType","dataBase64"],"additionalProperties":false}}},"required":["to","subject","body"],"additionalProperties":false}}}}}},"/v1/capabilities/microsoft-365/mail-messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessages","tags":["Capability Sources"],"summary":"List or search Outlook mail as the calling member","description":"Reads recent Outlook messages from the calling member's connected Microsoft 365 account. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":1000},"description":"Optional Outlook message search text."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum messages to return, capped at 25."}]}},"/v1/capabilities/microsoft-365/mail-message/{messageId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365MailMessageByMessageId","tags":["Capability Sources"],"summary":"Read an Outlook message as the calling member","description":"Reads one Outlook message and requests its body as plain text, using the calling member's delegated Microsoft 365 connection.","responses":{"200":{"description":"Outlook message returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph message id."}]}},"/v1/capabilities/microsoft-365/calendar-events":{"get":{"operationId":"getV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"List Microsoft 365 calendar events as the calling member","description":"Lists the calling member's Outlook calendar events in a requested time range. This capability is delegated and read-only.","responses":{"200":{"description":"Outlook calendar events returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"timeMin","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Inclusive lower bound for event start time."},{"in":"query","name":"timeMax","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true,"description":"Exclusive upper bound for event start time."},{"in":"query","name":"maxResults","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"description":"Maximum events to return, capped at 100."}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365CalendarEvents","tags":["Capability Sources"],"summary":"Create an Outlook calendar event as the calling member","description":"Creates an event in the calling member's default calendar. Adding attendees can send Microsoft calendar invitations.","responses":{"200":{"description":"Outlook calendar event created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarEventBody"}}}}}},"/v1/capabilities/microsoft-365/drive-files":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Search OneDrive files as the calling member","description":"Searches the calling member's OneDrive by name and content, returning source links. This capability is delegated and read-only.","responses":{"200":{"description":"OneDrive files returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFilesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"description":"Text to search in OneDrive file names and content."},{"in":"query","name":"maxResults","schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"description":"Maximum files to return, capped at 25."}]},"put":{"operationId":"putV1CapabilitiesMicrosoft365DriveFiles","tags":["Capability Sources"],"summary":"Create or replace a OneDrive text file as the calling member","description":"Creates or replaces a bounded UTF-8 text file at a path in the calling member's OneDrive.","responses":{"200":{"description":"OneDrive file written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileWriteBody"}}}}}},"/v1/capabilities/microsoft-365/drive-file/{itemId}":{"get":{"operationId":"getV1CapabilitiesMicrosoft365DriveFileByItemId","tags":["Capability Sources"],"summary":"Read a OneDrive text file as the calling member","description":"Returns OneDrive metadata, source link, and bounded UTF-8 text content. Folders, large files, and binary Office files return metadata with an explicit contentUnavailableReason instead of decoding unsafe binary data.","responses":{"200":{"description":"OneDrive file returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365DriveFileResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"itemId","schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"description":"Microsoft Graph drive item id."}]}},"/v1/capabilities/microsoft-365/mail-drafts":{"post":{"operationId":"postV1CapabilitiesMicrosoft365MailDrafts","tags":["Capability Sources"],"summary":"Create an Outlook draft as the calling member","description":"Creates a draft in the calling member's mailbox. It never sends the message. Microsoft requires delegated Mail.ReadWrite for draft creation.","responses":{"200":{"description":"Outlook draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365MailDraftBody"}}}}}},"/v1/capabilities/microsoft-365/teams-chats":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChats","tags":["Capability Sources"],"summary":"List Microsoft Teams chats as the calling member","description":"Lists the calling member's Microsoft Teams chats using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chats returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsChatsResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]}},"/v1/capabilities/microsoft-365/teams-chats/{chatId}/messages":{"get":{"operationId":"getV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"List messages in a Microsoft Teams chat as the calling member","description":"Reads recent messages from one Teams chat using delegated Chat.Read permission.","responses":{"200":{"description":"Teams chat messages returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessagesResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true},{"in":"query","name":"maxResults","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1CapabilitiesMicrosoft365TeamsChatsByChatIdMessages","tags":["Capability Sources"],"summary":"Send a message to an existing Microsoft Teams chat as the calling member","description":"Sends one message to an existing Teams chat. The operation cannot create a new chat.","responses":{"200":{"description":"Teams chat message sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"The calling member has not connected their Microsoft account or is missing permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365NeedsConnectionError"}}}},"502":{"description":"Microsoft Graph rejected the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365GraphError"}}}}},"parameters":[{"in":"path","name":"chatId","schema":{"type":"string","minLength":1,"maxLength":1024},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TeamsMessageBody"}}}}}},"/v1/mcp-connections/discover":{"post":{"operationId":"postV1McpConnectionsDiscover","tags":["Authentication"],"summary":"Discover external MCP connection requirements","description":"Admin-only, side-effect-free requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Requirements discovery result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscovery"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can discover MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"Requirements discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryInput"}}}}}},"/v1/mcp-connections/{connectionId}/oauth/issuer-review":{"post":{"operationId":"postV1McpConnectionsByConnectionIdOauthIssuerReview","tags":["Authentication"],"summary":"Review a changed External MCP OAuth issuer","description":"Organization-admin-only. Repeats live OAuth discovery and either previews the issuers currently advertised by the MCP resource or explicitly confirms one. Confirmation never trusts an unadvertised issuer. Changing issuers invalidates issuer-bound OAuth clients and credentials so members reconnect cleanly.","responses":{"200":{"description":"Issuer review result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewResponse"}}}},"400":{"description":"Invalid issuer review request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can review OAuth issuers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection changed or the requested issuer is not currently advertised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionConflictError"}}}},"502":{"description":"Live OAuth discovery failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpRequirementsDiscoveryFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpIssuerReviewInput"}}}}}},"/v1/mcp-connections/presets":{"get":{"operationId":"getV1McpConnectionsPresets","tags":["Capability Sources"],"summary":"List predefined External MCP Connection presets","description":"Common third-party MCP servers (Notion, Linear, Stripe, Slack, ...) an admin can add with one click, prefilled with a real name and URL.","responses":{"200":{"description":"Presets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpPresetListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/mcp-connections/resolve":{"post":{"operationId":"postV1McpConnectionsResolve","tags":["Authentication"],"summary":"Resolve a free-form query to an MCP server","description":"Admin-only, side-effect-free smart resolution for the add-connection flow. Accepts a URL, a bare host, or a product name (\"vercel\"), matches curated presets, probes bounded well-known endpoint candidates through the SSRF-guarded discovery fetch, and returns the winning URL with its requirements discovery. It performs no client registration, credential write, or connection creation.","responses":{"200":{"description":"Resolution result (not_found is a successful outcome).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveResult"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can resolve MCP servers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpResolveInput"}}}}}},"/v1/mcp-connections":{"get":{"operationId":"getV1McpConnections","tags":["Capability Sources"],"summary":"List External MCP Connections","description":"scope=usable (default): connections the calling member has been granted (org-wide, direct, or via a team), with per-member connection status. scope=manageable: every org connection with access summaries — workspace owners and admins only.","responses":{"200":{"description":"Connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"scope=manageable requires a workspace owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"parameters":[{"in":"query","name":"scope","schema":{"default":"usable","type":"string","enum":["usable","manageable"]}}]},"post":{"operationId":"postV1McpConnections","tags":["Capability Sources"],"summary":"Register a new External MCP Connection for the org","description":"Admin-only. Registers a third-party MCP server by name + URL and grants access (org-wide, teams, or members). Use GET /v1/mcp-connections/presets for known server URLs (Notion, Linear, Stripe, Sentry, Slack, Context7). For credentialMode per_member, each member connects their own account afterwards — share links.yourConnections from the response so teammates know where to sign in. For servers with pre-registered OAuth apps, whitelist links.oauthCallback. API-key and OAuth-client credentials cannot be created through the agent surface; use the dashboard.","responses":{"200":{"description":"Connection created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionCreatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can add MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"502":{"description":"The upstream MCP server could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"default":"shared","type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["name","url","authType"]}}}}}},"/v1/mcp-connections/{connectionId}/tools":{"get":{"operationId":"getV1McpConnectionsByConnectionIdTools","tags":["Capability Sources"],"summary":"List tools exposed by an External MCP Connection","description":"Uses the Den-managed credential available to the calling member to read the live MCP tools/list catalog. Granted members can inspect connections available under Your Connections; workspace owners and admins can also inspect connections they manage. Credentials and tool calls are never returned.","responses":{"200":{"description":"External MCP tool catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller has not been granted access to this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"502":{"description":"The upstream MCP tool catalog could not be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolListFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/tools/call":{"post":{"operationId":"postV1McpConnectionsByConnectionIdToolsCall","tags":["Authentication"],"summary":"Manually run a tool from an External MCP Connection","description":"Workspace owner/admin diagnostic runner. Executes one named MCP tool with caller-supplied JSON arguments using the Den-managed shared credential or the calling admin's connected credential. Returns an ephemeral inspection of the actual tools/call HTTP request and response with credential and session headers redacted. The caller must already be granted access to the connection. Credentials, arguments, results, and inspection payloads are never written to logs.","responses":{"200":{"description":"The MCP tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunResponse"}}}},"400":{"description":"Invalid tool name or arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller must be a workspace owner/admin and have access to this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The connection has no usable credential for this member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotReadyError"}}}},"413":{"description":"The tool arguments exceeded the request size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRequestTooLargeError"}}}},"502":{"description":"The upstream MCP tool call failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionToolRunInput"}}}}}},"/v1/mcp-connections/{connectionId}":{"put":{"operationId":"putV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Edit an External MCP Connection","description":"Organization-admin-only. Name and direct access changes preserve credentials. URL, authentication type, or credential-mode changes invalidate the old identity atomically. Secret fields are write-only optional replacements and are never returned. expectedUpdatedAt prevents stale edits.","responses":{"200":{"description":"Connection updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdatedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can edit MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The edit is stale or changes marketplace-owned identity fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionUpdateConflictError"}}}},"502":{"description":"The proposed API-key or no-auth configuration could not be validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionValidationFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"name":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","maxLength":2048,"format":"uri"},"authType":{"type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post"]}},"required":["clientId"]},"authorizationServerIssuer":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"requestedScopes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["expectedUpdatedAt","name","url","authType","credentialMode","access"]}}}}},"delete":{"operationId":"deleteV1McpConnectionsByConnectionId","tags":["Authentication"],"summary":"Remove an External MCP Connection","responses":{"200":{"description":"Removed."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can remove MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/access":{"put":{"operationId":"putV1McpConnectionsByConnectionIdAccess","tags":["Capability Sources"],"summary":"Replace who can use an External MCP Connection","description":"Admin-only. Full-replace semantics: send the complete desired access set (orgWide, or memberIds + teamIds). Team and member ids come from GET /v1/org.","responses":{"200":{"description":"Access updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can change connection access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"$ref":"#/components/schemas/ExternalMcpConnectionAccessInput"}},"required":["access"]}}}}}},"/v1/mcp-connections/{connectionId}/disconnect":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnect","tags":["Authentication"],"summary":"Disconnect (clear credentials for) an External MCP Connection without removing it","description":"Admin-only. Signs out every shared or per-member account stored for this connection, while preserving the connection row, access grants, OAuth client configuration, and plugin bindings.","responses":{"200":{"description":"Disconnected."},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can disconnect MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/disconnect-my-account":{"post":{"operationId":"postV1McpConnectionsByConnectionIdDisconnectMyAccount","tags":["Authentication"],"summary":"Disconnect the calling member's account for a per-member External MCP Connection","description":"Removes only the caller's connected account for this MCP connection. The org-level connection, access grants, OAuth client configuration, and other members' accounts are preserved.","responses":{"200":{"description":"Disconnected."},"400":{"description":"This connection does not use per-member credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection or nothing was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/{connectionId}/connect/start":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectStart","tags":["Authentication"],"summary":"Begin the OAuth handshake for an External MCP Connection","description":"Runs RFC 9728 discovery, dynamic client registration if needed, and returns an authorize URL to redirect the admin's browser to.","responses":{"200":{"description":"Authorize URL, or already connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"Unknown connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectionNotFoundError"}}}},"409":{"description":"The OAuth connection requires provider or issuer configuration before connecting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartConflictError"}}}},"502":{"description":"OAuth handshake failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMcpConnectStartFailedError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/mcp-connections/oauth/callback":{"get":{"operationId":"getV1McpConnectionsOauthCallback","tags":["Authentication"],"summary":"Shared OAuth callback for External MCP Connections","description":"Deployment-wide callback. Organization, member, and connection routing are derived exclusively from signed state.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}}}},"/v1/mcp-connections/{connectionId}/connect/callback":{"get":{"operationId":"getV1McpConnectionsByConnectionIdConnectCallback","tags":["Authentication"],"summary":"OAuth callback for an External MCP Connection","description":"The external MCP server redirects here with code+state after the admin consents. Serves a small static HTML page — the admin's Den tab in the background polls connection status and never needs this response body.","responses":{"200":{"description":"Connected — a static success page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid code/state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^emc_.*"},"required":true,"description":"Den TypeID with 'emc_' prefix and a 26-character base32 suffix."}]}},"/v1/connectors/github/install/start":{"post":{"operationId":"postV1ConnectorsGithubInstallStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnPath":{"type":"string","minLength":1,"maxLength":1024}},"required":["returnPath"]}}}},"tags":["GitHub"],"summary":"Start GitHub install","description":"Builds a GitHub App install redirect URL for the current organization.","responses":{"200":{"description":"GitHub install redirect returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallStartResponse"}}}},"400":{"description":"The GitHub install request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to connect GitHub.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/install/complete":{"post":{"operationId":"postV1ConnectorsGithubInstallComplete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","minLength":1,"maxLength":4096}},"required":["installationId","state"]}}}},"tags":["GitHub"],"summary":"Complete GitHub install","description":"Completes a GitHub App installation for the current organization and returns visible repositories.","responses":{"200":{"description":"GitHub installation completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubInstallCompleteResponse"}}}},"400":{"description":"The GitHub install completion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to complete GitHub connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects":{"get":{"operationId":"getV1ConfigObjects","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"type","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived","ingestion_error"]}},{"in":"query","name":"sourceMode","schema":{"type":"string","enum":["cloud","import","connector"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Config Objects"],"summary":"List config objects","description":"Lists current config object projections visible to the current organization member.","responses":{"200":{"description":"Config objects returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectListResponse"}}}},"400":{"description":"The config object query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConfigObjects","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"sourceMode":{"type":"string","enum":["cloud","import","connector"]},"pluginIds":{"maxItems":100,"type":"array","items":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"}},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","sourceMode","input"]}}}},"tags":["Config Objects"],"summary":"Create config object","description":"Creates a new private config object and initial immutable version.","responses":{"201":{"description":"Config object created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/config-objects/{configObjectId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object","description":"Returns one config object detail when the caller can view it.","responses":{"200":{"description":"Config object returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectDetailResponse"}}}},"400":{"description":"The config object path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}},"reason":{"type":"string","minLength":1,"maxLength":255}},"required":["input"]}}}},"tags":["Config Objects"],"summary":"Update config object with new version","description":"Updates an existing config object, including a Cloud skill, by creating a new immutable version without creating a duplicate.","responses":{"201":{"description":"Config object version created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The config object version request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersions","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"includeDeleted","schema":{"type":"string","enum":["true","false"]}}],"tags":["Config Objects"],"summary":"List config object versions","description":"Returns immutable versions for one config object.","responses":{"200":{"description":"Config object versions returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionListResponse"}}}},"400":{"description":"The version list request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/{versionId}":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsByVersionId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"versionId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cov_.*"},"required":true,"description":"Den TypeID with 'cov_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get config object version","description":"Returns one immutable config object version.","responses":{"200":{"description":"Config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/versions/latest":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdVersionsLatest","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Get latest config object version","description":"Returns the latest config object version by created_at and id ordering.","responses":{"200":{"description":"Latest config object version returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectVersionDetailResponse"}}}},"400":{"description":"The latest-version path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object version could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/archive":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdArchive","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"archive config object","description":"archive a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/delete":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdDelete","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"delete config object","description":"delete a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/restore":{"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdRestore","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"restore config object","description":"restore a config object without removing its history.","responses":{"200":{"description":"Config object lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConfigObjectMutationResponse"}}}},"400":{"description":"The lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this config object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object plugins","description":"Lists plugins that currently include the config object.","responses":{"200":{"description":"Config object plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The config object plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view config object plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdPlugins","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Config Objects"],"summary":"Attach config object to plugin","description":"Adds a config object to a plugin when the caller can edit the target plugin.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdPluginsByPluginId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Remove config object from plugin","description":"Removes one active plugin membership from a config object.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit the target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access":{"get":{"operationId":"getV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"List config object access grants","description":"Lists direct, team, and org-wide grants for one config object.","responses":{"200":{"description":"Config object access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConfigObjectsByConfigObjectIdAccess","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Config Objects"],"summary":"Grant config object access","description":"Creates or reactivates one access grant for a config object.","responses":{"201":{"description":"Config object access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The access grant request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/config-objects/{configObjectId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConfigObjectsByConfigObjectIdAccessByGrantId","parameters":[{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^coa_.*"},"required":true,"description":"Den TypeID with 'coa_' prefix and a 26-character base32 suffix."}],"tags":["Config Objects"],"summary":"Revoke config object access","description":"Soft-revokes one config object access grant.","responses":{"204":{"description":"Config object access revoked successfully."},"400":{"description":"The access grant path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage config object access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins":{"get":{"operationId":"getV1Plugins","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Plugins"],"summary":"List plugins","description":"Lists plugins visible to the current organization member.","responses":{"200":{"description":"Plugins returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginListResponse"}}}},"400":{"description":"The plugin query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Plugins","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"components":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"input":{"type":"object","properties":{"rawSourceText":{"type":"string","minLength":1},"normalizedPayloadJson":{"type":"object","properties":{},"additionalProperties":{}},"parserMode":{"type":"string","minLength":1,"maxLength":100},"schemaVersion":{"type":"string","minLength":1,"maxLength":100},"metadata":{"type":"object","properties":{},"additionalProperties":{}}}}},"required":["type","input"]}},"orgWide":{"type":"boolean"},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"}},"required":["name"]}}}},"tags":["Plugins"],"summary":"Create plugin","description":"Creates a plugin and can also create components, share org-wide, and publish to a marketplace in one request.","responses":{"201":{"description":"Plugin created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}":{"get":{"operationId":"getV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get plugin","description":"Returns one plugin detail when the caller can view it.","responses":{"200":{"description":"Plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginDetailResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1PluginsByPluginId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"tags":["Plugins"],"summary":"Update plugin","description":"Updates plugin metadata.","responses":{"200":{"description":"Plugin updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/archive":{"post":{"operationId":"postV1PluginsByPluginIdArchive","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"archive plugin","description":"archive a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/restore":{"post":{"operationId":"postV1PluginsByPluginIdRestore","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"restore plugin","description":"restore a plugin without touching its historical memberships.","responses":{"200":{"description":"Plugin lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMutationResponse"}}}},"400":{"description":"The plugin lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects":{"get":{"operationId":"getV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin config objects","description":"Lists plugin memberships and resolved config object projections.","responses":{"200":{"description":"Plugin memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdConfigObjects","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["configObjectId"]}}}},"tags":["Plugins"],"summary":"Add plugin config object","description":"Adds a config object to a plugin.","responses":{"201":{"description":"Plugin membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipMutationResponse"}}}},"400":{"description":"The plugin membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin or config object could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/config-objects/{configObjectId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdConfigObjectsByConfigObjectId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"configObjectId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"required":true,"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Remove plugin config object","description":"Removes one config object from a plugin.","responses":{"204":{"description":"Plugin membership removed successfully."},"400":{"description":"The plugin membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/resolved":{"get":{"operationId":"getV1PluginsByPluginIdResolved","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Get resolved plugin","description":"Lists active plugin memberships with the current config object projection for each item.","responses":{"200":{"description":"Resolved plugin returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMembershipListResponse"}}}},"400":{"description":"The plugin path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view resolved plugins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/mcp-connections":{"post":{"operationId":"postV1PluginsByPluginIdMcpConnections","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configObjectId":{"description":"Den TypeID with 'cob_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cob_.*"},"serverName":{"type":"string","minLength":1,"maxLength":255},"authType":{"default":"oauth","type":"string","enum":["oauth","apikey","none"]},"credentialMode":{"type":"string","enum":["shared","per_member"]},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"oauthClient":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":4096}},"required":["clientId"]}},"required":["configObjectId","serverName"]}}}},"tags":["Plugins"],"summary":"Configure plugin MCP requirement","description":"Admin-only privileged setup for one declared remote MCP server. The server name and URL are derived from the active plugin config object; the request never supplies a URL and does not start OAuth.","responses":{"200":{"description":"Plugin MCP requirement configured successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchPluginMcpRequirementConfigureResponse"}}}},"400":{"description":"The plugin MCP requirement request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can configure plugin MCP requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin MCP requirement could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url/preview":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrlPreview","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Preview GitHub plugin marketplace import","description":"Reads a public GitHub plugin URL and returns skills and remote MCP servers that can be imported into an organization marketplace.","responses":{"200":{"description":"GitHub plugin MCP import preview returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportPreviewResponse"}}}},"400":{"description":"The GitHub plugin MCP import preview request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to preview plugin MCP imports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The GitHub plugin path could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/import-mcps-from-github-url":{"post":{"operationId":"postV1PluginsImportMcpsFromGithubUrl","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"githubUrl":{"type":"string","maxLength":2048,"format":"uri"},"access":{"type":"object","properties":{"orgWide":{"default":true,"type":"boolean"},"memberIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}},"teamIds":{"maxItems":200,"type":"array","items":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"}}}},"authType":{"default":"oauth","type":"string","enum":["oauth","none"]},"credentialMode":{"default":"per_member","type":"string","enum":["shared","per_member"]},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}]},"marketplaceId":{"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"name":{"type":"string","minLength":1,"maxLength":255},"selectedSkillKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"selectedServerNames":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["githubUrl"]}}}},"tags":["GitHub"],"summary":"Create a plugin from GitHub","description":"Creates one plugin from selected skills and remote MCP servers in a public GitHub plugin URL, applies the requested access grants, and optionally publishes it into an organization marketplace. Declared and known-server authentication requirements take precedence over the request-wide auth fallback.","responses":{"200":{"description":"GitHub plugin MCPs imported successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubPluginMcpImportResponse"}}}},"400":{"description":"The GitHub plugin MCP import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to import plugin MCPs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The GitHub plugin path or marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access":{"get":{"operationId":"getV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"List plugin access grants","description":"Lists direct, team, and org-wide grants for a plugin.","responses":{"200":{"description":"Plugin access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1PluginsByPluginIdAccess","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Plugins"],"summary":"Grant plugin access","description":"Creates or reactivates one access grant for a plugin.","responses":{"201":{"description":"Plugin access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The plugin access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/plugins/{pluginId}/access/{grantId}":{"delete":{"operationId":"deleteV1PluginsByPluginIdAccessByGrantId","parameters":[{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^pag_.*"},"required":true,"description":"Den TypeID with 'pag_' prefix and a 26-character base32 suffix."}],"tags":["Plugins"],"summary":"Revoke plugin access","description":"Soft-revokes one plugin access grant.","responses":{"204":{"description":"Plugin access revoked successfully."},"400":{"description":"The plugin access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage plugin access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces":{"get":{"operationId":"getV1Marketplaces","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","deleted","archived"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Marketplaces"],"summary":"List marketplaces","description":"Lists marketplaces visible to the current organization member.","responses":{"200":{"description":"Marketplaces returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceListResponse"}}}},"400":{"description":"The marketplace query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1Marketplaces","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}},"required":["name"]}}}},"tags":["Marketplaces"],"summary":"Create marketplace","description":"Creates a new private marketplace and grants the creator manager access.","responses":{"201":{"description":"Marketplace created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/marketplaces/{marketplaceId}":{"get":{"operationId":"getV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get marketplace","description":"Returns one marketplace detail when the caller can view it.","responses":{"200":{"description":"Marketplace returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceDetailResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1MarketplacesByMarketplaceId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}}}}}},"tags":["Marketplaces"],"summary":"Update marketplace","description":"Updates marketplace metadata.","responses":{"200":{"description":"Marketplace updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/archive":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdArchive","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"archive marketplace","description":"archive a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/delete":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdDelete","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"delete marketplace","description":"Permanently deletes a custom marketplace and its relationships.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"A built-in or connector-managed marketplace cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceConflictError"}}}}}}},"/v1/marketplaces/{marketplaceId}/restore":{"post":{"operationId":"postV1MarketplacesByMarketplaceIdRestore","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"restore marketplace","description":"restore a marketplace without deleting its plugins.","responses":{"200":{"description":"Marketplace lifecycle updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceMutationResponse"}}}},"400":{"description":"The marketplace lifecycle path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace plugins","description":"Lists marketplace memberships and resolved plugin projections.","responses":{"200":{"description":"Marketplace memberships returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginListResponse"}}}},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdPlugins","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"membershipSource":{"type":"string","enum":["manual","connector","api","system"]}},"required":["pluginId"]}}}},"tags":["Marketplaces"],"summary":"Add marketplace plugin","description":"Adds a plugin to a marketplace.","responses":{"201":{"description":"Marketplace membership created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplacePluginMutationResponse"}}}},"400":{"description":"The marketplace membership request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace or plugin could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/resolved":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdResolved","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Get resolved marketplace plugin readiness","description":"Returns marketplace detail with plugins, derived source info, and each plugin's cloud readiness or required setup state.","responses":{"200":{"description":"Marketplace resolved detail returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchMarketplaceResolvedResponse"}}}},"400":{"description":"The marketplace path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view marketplaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/plugins/{pluginId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdPluginsByPluginId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"required":true,"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Remove marketplace plugin","description":"Removes one plugin from a marketplace.","responses":{"204":{"description":"Marketplace membership removed successfully."},"400":{"description":"The marketplace membership path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace membership could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access":{"get":{"operationId":"getV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"List marketplace access grants","description":"Lists direct, team, and org-wide grants for a marketplace.","responses":{"200":{"description":"Marketplace access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1MarketplacesByMarketplaceIdAccess","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Marketplaces"],"summary":"Grant marketplace access","description":"Creates or reactivates one access grant for a marketplace.","responses":{"201":{"description":"Marketplace access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The marketplace access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The marketplace could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/marketplaces/{marketplaceId}/access/{grantId}":{"delete":{"operationId":"deleteV1MarketplacesByMarketplaceIdAccessByGrantId","parameters":[{"in":"path","name":"marketplaceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mkt_.*"},"required":true,"description":"Den TypeID with 'mkt_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^mag_.*"},"required":true,"description":"Den TypeID with 'mag_' prefix and a 26-character base32 suffix."}],"tags":["Marketplaces"],"summary":"Revoke marketplace access","description":"Soft-revokes one marketplace access grant.","responses":{"204":{"description":"Marketplace access revoked successfully."},"400":{"description":"The marketplace access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage marketplace access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts":{"get":{"operationId":"getV1ConnectorAccounts","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["active","inactive","disconnected","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector accounts","description":"Lists connector accounts for the organization.","responses":{"200":{"description":"Connector accounts returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountListResponse"}}}},"400":{"description":"The connector account query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalAccountRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"displayName":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","displayName"]}}}},"tags":["Connectors"],"summary":"Create connector account","description":"Creates a connector account such as a GitHub App installation binding.","responses":{"201":{"description":"Connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The connector account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}":{"get":{"operationId":"getV1ConnectorAccountsByConnectorAccountId","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector account","description":"Returns one connector account detail.","responses":{"200":{"description":"Connector account returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDetailResponse"}}}},"400":{"description":"The connector account path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-accounts/{connectorAccountId}/disconnect":{"post":{"operationId":"postV1ConnectorAccountsByConnectorAccountIdDisconnect","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":255}}}}}},"tags":["Connectors"],"summary":"Disconnect connector account","description":"Disconnects a connector account and cleans up all associated connector-managed records.","responses":{"200":{"description":"Connector account disconnected and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountDisconnectResponse"}}}},"400":{"description":"The connector account disconnect request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances":{"get":{"operationId":"getV1ConnectorInstances","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorType","schema":{"type":"string","enum":["github"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"status","schema":{"type":"string","enum":["active","disabled","archived","error"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector instances","description":"Lists connector instances visible to the current member.","responses":{"200":{"description":"Connector instances returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceListResponse"}}}},"400":{"description":"The connector instance query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"post":{"operationId":"postV1ConnectorInstances","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorType":{"type":"string","enum":["github"]},"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorAccountId","connectorType","name"]}}}},"tags":["Connectors"],"summary":"Create connector instance","description":"Creates a new connector instance.","responses":{"201":{"description":"Connector instance created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance","description":"Returns one connector instance detail.","responses":{"200":{"description":"Connector instance returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceDetailResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorInstancesByConnectorInstanceId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["active","disabled","archived","error"]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector instance","description":"Updates one connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/archive":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdArchive","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"archive connector instance","description":"archive a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/disable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDisable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"disable connector instance","description":"disable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/enable":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdEnable","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"enable connector instance","description":"enable a connector instance.","responses":{"200":{"description":"Connector instance updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceMutationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/configuration":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdConfiguration","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector instance configuration","description":"Returns the currently configured plugins and import stats for a connector instance.","responses":{"200":{"description":"Connector instance configuration returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/remove":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdRemove","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Remove connector instance","description":"Removes a connector instance and deletes the plugins, mappings, config objects, and bindings associated with it.","responses":{"200":{"description":"Connector instance removed and cleaned up successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceRemoveResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to remove connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to remove this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/auto-import":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAutoImport","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"type":"boolean"}},"required":["autoImportNewPlugins"]}}}},"tags":["Connectors"],"summary":"Set connector instance auto-import","description":"Enables or disables auto-import of new plugins on future push webhooks for a connector instance.","responses":{"200":{"description":"Connector instance auto-import updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorInstanceConfigurationResponse"}}}},"400":{"description":"The auto-import request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to configure connector instances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to configure this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscovery","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["GitHub"],"summary":"Get GitHub connector discovery","description":"Analyzes a GitHub connector target and returns discovered plugin candidates.","responses":{"200":{"description":"GitHub connector discovery returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubConnectorDiscoveryResponse"}}}},"400":{"description":"The connector instance path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/tree":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdDiscoveryTree","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","exclusiveMinimum":0,"maximum":500}},{"in":"query","name":"prefix","schema":{"type":"string","minLength":1,"maxLength":1024}}],"tags":["GitHub"],"summary":"List GitHub discovery tree entries","description":"Pages through the normalized GitHub repository tree used during discovery.","responses":{"200":{"description":"GitHub discovery tree returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryTreeResponse"}}}},"400":{"description":"The discovery tree request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to inspect GitHub discovery tree entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/discovery/apply":{"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdDiscoveryApply","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoImportNewPlugins":{"default":false,"type":"boolean"},"selectedKeys":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["selectedKeys"]}}}},"tags":["GitHub"],"summary":"Apply GitHub discovery selection","description":"Creates OpenWork plugins and connector mappings from selected discovery candidates.","responses":{"200":{"description":"GitHub discovery selection applied successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubDiscoveryApplyResponse"}}}},"400":{"description":"The discovery apply request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to apply discovery selections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"List connector instance access grants","description":"Lists direct, team, and org-wide grants for a connector instance.","responses":{"200":{"description":"Connector instance access grants returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantListResponse"}}}},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdAccess","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgMembershipId":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"},"teamId":{"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"orgWide":{"default":false,"type":"boolean"},"role":{"type":"string","enum":["viewer","editor","manager"]}},"required":["role"]}}}},"tags":["Connectors"],"summary":"Grant connector instance access","description":"Creates or reactivates one access grant for a connector instance.","responses":{"201":{"description":"Connector instance access grant created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchAccessGrantMutationResponse"}}}},"400":{"description":"The connector instance access request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/access/{grantId}":{"delete":{"operationId":"deleteV1ConnectorInstancesByConnectorInstanceIdAccessByGrantId","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"path","name":"grantId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cia_.*"},"required":true,"description":"Den TypeID with 'cia_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Revoke connector instance access","description":"Soft-revokes one connector instance access grant.","responses":{"204":{"description":"Connector instance access revoked successfully."},"400":{"description":"The connector instance access path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to manage connector instance access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The access grant could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-instances/{connectorInstanceId}/targets":{"get":{"operationId":"getV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"targetKind","schema":{"type":"string","enum":["repository_branch"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector targets","description":"Lists connector targets for one connector instance.","responses":{"200":{"description":"Connector targets returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetListResponse"}}}},"400":{"description":"The connector target query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorInstancesByConnectorInstanceIdTargets","parameters":[{"in":"path","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"required":true,"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorType":{"type":"string","enum":["github"]},"remoteId":{"type":"string","minLength":1,"maxLength":255},"targetKind":{"type":"string","enum":["repository_branch"]},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["connectorType","remoteId","targetKind","config"]}}}},"tags":["Connectors"],"summary":"Create connector target","description":"Creates a connector target under a connector instance.","responses":{"201":{"description":"Connector target created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector instance could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector target","description":"Returns one connector target detail.","responses":{"200":{"description":"Connector target returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetDetailResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"patch":{"operationId":"patchV1ConnectorTargetsByConnectorTargetId","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remoteId":{"type":"string","minLength":1,"maxLength":255},"externalTargetRef":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector target","description":"Updates one connector target.","responses":{"200":{"description":"Connector target updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorTargetMutationResponse"}}}},"400":{"description":"The connector target update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/resync":{"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdResync","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Resync connector target","description":"Queues a manual resync for a connector target.","responses":{"202":{"description":"Connector target resync queued successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector target path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to resync connector targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-targets/{connectorTargetId}/mappings":{"get":{"operationId":"getV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"mappingKind","schema":{"type":"string","enum":["path","api","custom"]}},{"in":"query","name":"objectType","schema":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]}},{"in":"query","name":"pluginId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector mappings","description":"Lists mappings under a connector target.","responses":{"200":{"description":"Connector mappings returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingListResponse"}}}},"400":{"description":"The connector mapping query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"post":{"operationId":"postV1ConnectorTargetsByConnectorTargetIdMappings","parameters":[{"in":"path","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"required":true,"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}}},"tags":["Connectors"],"summary":"Create connector mapping","description":"Creates a connector mapping.","responses":{"201":{"description":"Connector mapping created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector target could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-mappings/{connectorMappingId}":{"patch":{"operationId":"patchV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"tags":["Connectors"],"summary":"Update connector mapping","description":"Updates one connector mapping.","responses":{"200":{"description":"Connector mapping updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorMappingMutationResponse"}}}},"400":{"description":"The connector mapping update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance or target plugin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}},"delete":{"operationId":"deleteV1ConnectorMappingsByConnectorMappingId","parameters":[{"in":"path","name":"connectorMappingId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cmp_.*"},"required":true,"description":"Den TypeID with 'cmp_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Delete connector mapping","description":"Deletes one connector mapping.","responses":{"204":{"description":"Connector mapping deleted successfully."},"400":{"description":"The connector mapping path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete connector mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector mapping could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events":{"get":{"operationId":"getV1ConnectorSyncEvents","parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"connectorInstanceId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cin_.*"},"description":"Den TypeID with 'cin_' prefix and a 26-character base32 suffix."},{"in":"query","name":"connectorTargetId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^ctg_.*"},"description":"Den TypeID with 'ctg_' prefix and a 26-character base32 suffix."},{"in":"query","name":"eventType","schema":{"type":"string","enum":["push","installation","installation_repositories","repository","manual_resync"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","queued","running","completed","failed","partial","ignored"]}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["Connectors"],"summary":"List connector sync events","description":"Lists connector sync events visible to the current member.","responses":{"200":{"description":"Connector sync events returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventListResponse"}}}},"400":{"description":"The connector sync event query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}":{"get":{"operationId":"getV1ConnectorSyncEventsByConnectorSyncEventId","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Get connector sync event","description":"Returns one connector sync event detail.","responses":{"200":{"description":"Connector sync event returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncEventDetailResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to view connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connector-sync-events/{connectorSyncEventId}/retry":{"post":{"operationId":"postV1ConnectorSyncEventsByConnectorSyncEventIdRetry","parameters":[{"in":"path","name":"connectorSyncEventId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cse_.*"},"required":true,"description":"Den TypeID with 'cse_' prefix and a 26-character base32 suffix."}],"tags":["Connectors"],"summary":"Retry connector sync event","description":"Re-queues one connector sync event.","responses":{"202":{"description":"Connector sync event retried successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorSyncAsyncResponse"}}}},"400":{"description":"The connector sync event path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to retry connector sync events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to edit this connector instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The connector sync event could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/accounts":{"post":{"operationId":"postV1ConnectorsGithubAccounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accountLogin":{"type":"string","minLength":1,"maxLength":255},"accountType":{"type":"string","enum":["Organization","User"]},"displayName":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","accountLogin","accountType","displayName"]}}}},"tags":["GitHub"],"summary":"Create GitHub connector account","description":"Persists one GitHub App installation as a connector account.","responses":{"201":{"description":"GitHub connector account created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchConnectorAccountMutationResponse"}}}},"400":{"description":"The GitHub account creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to create GitHub connector accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/setup":{"post":{"operationId":"postV1ConnectorsGithubSetup","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"connectorAccountId":{"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"connectorInstanceName":{"type":"string","minLength":1,"maxLength":255},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255},"mappings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"mappingKind":{"type":"string","enum":["path","api","custom"]},"selector":{"type":"string","minLength":1,"maxLength":255},"objectType":{"type":"string","enum":["skill","agent","command","tool","mcp","hook","context","custom"]},"pluginId":{"anyOf":[{"description":"Den TypeID with 'plg_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^plg_.*"},{"type":"null"}]},"autoAddToPlugin":{"default":false,"type":"boolean"},"config":{"type":"object","properties":{},"additionalProperties":{}}},"required":["mappingKind","selector","objectType"]}}},"required":["installationId","connectorInstanceName","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Setup GitHub connector","description":"Creates a GitHub connector account, instance, target, and initial mappings in one flow.","responses":{"201":{"description":"GitHub connector setup created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubSetupResponse"}}}},"400":{"description":"The GitHub setup request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"The caller lacks permission to setup GitHub connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}}},"/v1/connectors/github/accounts/{connectorAccountId}/repositories":{"get":{"operationId":"getV1ConnectorsGithubAccountsByConnectorAccountIdRepositories","parameters":[{"in":"path","name":"connectorAccountId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^cac_.*"},"required":true,"description":"Den TypeID with 'cac_' prefix and a 26-character base32 suffix."},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":255}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"q","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["GitHub"],"summary":"List GitHub repositories","description":"Lists repositories visible to one GitHub connector account.","responses":{"200":{"description":"GitHub repositories returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubRepositoryListResponse"}}}},"400":{"description":"The GitHub repository query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list GitHub repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The connector account could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"/v1/connectors/github/validate-target":{"post":{"operationId":"postV1ConnectorsGithubValidateTarget","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repositoryFullName":{"type":"string","minLength":1,"maxLength":255},"branch":{"type":"string","minLength":1,"maxLength":255},"ref":{"type":"string","minLength":1,"maxLength":255}},"required":["installationId","repositoryId","repositoryFullName","branch","ref"]}}}},"tags":["GitHub"],"summary":"Validate GitHub target","description":"Validates one repository-branch target before persisting it.","responses":{"200":{"description":"GitHub target validated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubValidateTargetResponse"}}}},"400":{"description":"The GitHub target validation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to validate GitHub targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/roles":{"post":{"operationId":"postV1Roles","tags":["Roles"],"summary":"Create organization role","description":"Creates a custom organization role with a named permission map.","responses":{"201":{"description":"Organization role created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can create custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["roleName","permission"]}}}}}},"/v1/roles/{roleId}":{"patch":{"operationId":"patchV1RolesByRoleId","tags":["Roles"],"summary":"Update organization role","description":"Updates a custom organization role and propagates role name changes to members and pending invitations.","responses":{"200":{"description":"Organization role updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"The role update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can update custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^orl_.*"},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleName":{"type":"string","minLength":2,"maxLength":64},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}},"delete":{"operationId":"deleteV1RolesByRoleId","tags":["Roles"],"summary":"Delete organization role","description":"Deletes a custom organization role after confirming that no members or pending invitations still depend on it.","responses":{"204":{"description":"Organization role deleted successfully."},"400":{"description":"The role deletion request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete organization roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and super-admins can delete custom roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The role or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"roleId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^orl_.*"},"required":true,"description":"Den TypeID with 'orl_' prefix and a 26-character base32 suffix."}]}},"/v1/resources":{"get":{"operationId":"getV1Resources","tags":["Resources"],"summary":"Get accessible resource snapshot","description":"Returns IDs and update timestamps for cloud resources visible to the current organization member.","responses":{"200":{"description":"Accessible resource snapshot returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSnapshotResponse"}}}},"401":{"description":"The caller must be signed in to list resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/teams":{"post":{"operationId":"postV1Teams","tags":["Teams"],"summary":"Create team","description":"Creates a team inside an organization and can optionally attach existing organization members to it.","responses":{"201":{"description":"Team created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team creation request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can create teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The organization or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}}},"required":["name"]}}}}}},"/v1/teams/{teamId}":{"patch":{"operationId":"patchV1TeamsByTeamId","tags":["Teams"],"summary":"Update team","description":"Updates a team's name and-or membership list within an organization.","responses":{"200":{"description":"Team updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"400":{"description":"The team update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can update teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team, organization, or a referenced member could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"memberIds":{"type":"array","items":{"description":"Den TypeID with 'om_' prefix and a 26-character base32 suffix.","format":"typeid","type":"string","minLength":29,"maxLength":29,"pattern":"^om_.*"}}}}}}}},"delete":{"operationId":"deleteV1TeamsByTeamId","tags":["Teams"],"summary":"Delete team","description":"Deletes a team and removes its related team-membership records.","responses":{"204":{"description":"Team deleted successfully."},"400":{"description":"The team deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can delete teams.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The team or organization could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^tem_.*"},"required":true,"description":"Den TypeID with 'tem_' prefix and a 26-character base32 suffix."}]}},"/v1/telegram/connection":{"get":{"operationId":"getV1TelegramConnection","tags":["Authentication"],"summary":"Get the organization Telegram connection","description":"Returns redacted bot, worker, webhook, and private-chat pairing status. Bot tokens and webhook secrets are never returned.","responses":{"200":{"description":"Telegram connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"put":{"operationId":"putV1TelegramConnection","tags":["Authentication"],"summary":"Connect an organization Telegram bot","description":"Admin-only. Validates a BotFather token, binds it to one organization worker, encrypts it at rest, and registers a secret-protected webhook.","responses":{"200":{"description":"Telegram bot connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionResponse"}}}},"400":{"description":"The request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"409":{"description":"The selected worker is unavailable or bot is already connected elsewhere.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}},"502":{"description":"Telegram rejected the token or webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"botToken":{"type":"string","minLength":1,"maxLength":512},"workerId":{"type":"string","minLength":1,"maxLength":64}},"required":["botToken","workerId"]}}}}},"delete":{"operationId":"deleteV1TelegramConnection","tags":["Authentication"],"summary":"Disconnect the organization Telegram bot","description":"Admin-only. Removes the Telegram webhook and permanently deletes the encrypted bot token, secret, pairing, and delivery state.","responses":{"200":{"description":"Telegram disconnected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramDeleteResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Telegram is not connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}}}},"/v1/telegram/connection/pairing":{"post":{"operationId":"postV1TelegramConnectionPairing","tags":["Authentication"],"summary":"Create a one-time Telegram pairing link","description":"Admin-only. Rotates any prior private-chat binding and returns a ten-minute one-time Telegram deep link.","responses":{"200":{"description":"Pairing link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramPairingResponse"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only workspace owners and admins can manage Telegram.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Telegram is not connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}}}},"/v1/capabilities/telegram/status":{"get":{"operationId":"getV1CapabilitiesTelegramStatus","tags":["Capability Sources"],"summary":"Check the organization Telegram connection","description":"Returns redacted Telegram connection and pairing status without any credential material.","responses":{"200":{"description":"Telegram connection status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramCapabilityStatus"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/capabilities/telegram/send-message":{"post":{"operationId":"postV1CapabilitiesTelegramSendMessage","tags":["Capability Sources"],"summary":"Send a message to the paired Telegram chat","description":"Sends text only to the organization connection's paired private chat. The caller cannot supply an arbitrary Telegram chat id.","responses":{"200":{"description":"Telegram message sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramSendResponse"}}}},"400":{"description":"The message was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"409":{"description":"Telegram is not connected or paired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}},"502":{"description":"Telegram rejected the message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectionError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32000}},"required":["text"]}}}}}},"/v1/app-version":{"get":{"operationId":"getV1AppVersion","tags":["System"],"summary":"Get desktop app version metadata","description":"Returns the supported desktop app range and stable published desktop releases from GitHub.","responses":{"200":{"description":"Desktop app version metadata returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenAppVersionResponse"}}}}}}},"/v1/webhooks/connectors/github":{"post":{"operationId":"postV1WebhooksConnectorsGithub","tags":["Webhooks"],"summary":"GitHub webhook ingress","description":"Verifies a GitHub App webhook signature against the raw request body, then records any relevant sync work.","responses":{"200":{"description":"Ignored but valid GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookIgnoredResponse"}}}},"202":{"description":"Accepted GitHub webhook delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookAcceptedResponse"}}}},"401":{"description":"Invalid GitHub webhook signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginArchGithubWebhookUnauthorizedResponse"}}}},"503":{"description":"GitHub webhook secret is not configured."}}}},"/v1/webhooks/telegram/{connectionId}":{"post":{"operationId":"postV1WebhooksTelegramByConnectionId","tags":["Webhooks"],"summary":"Telegram bot webhook ingress","description":"Verifies Telegram's per-connection secret header, durably claims update_id, and acknowledges before queued worker processing begins.","responses":{"200":{"description":"Telegram update accepted or already processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookResponse"}}}},"400":{"description":"Invalid Telegram update or connection id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Invalid Telegram webhook secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookUnauthorized"}}}},"404":{"description":"Telegram connection not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookResponse"}}}},"413":{"description":"Telegram update body exceeds 256 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramWebhookPayloadTooLarge"}}}}},"parameters":[{"in":"path","name":"connectionId","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/v1/workers/{id}/activity-heartbeat":{"post":{"operationId":"postV1WorkersByIdActivityHeartbeat","tags":["Workers","Worker Activity"],"summary":"Record worker heartbeat","description":"Accepts signed heartbeat and recent-activity updates from a worker so Den can track worker health and recent usage.","responses":{"200":{"description":"Worker heartbeat accepted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeatResponse"}}}},"400":{"description":"The heartbeat payload or worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The worker heartbeat token was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"isActiveRecently":{"type":"boolean"},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"openSessionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["isActiveRecently"]}}}}}},"/v1/workers":{"get":{"operationId":"getV1Workers","tags":["Workers"],"summary":"List workers","description":"Lists the workers that belong to the caller's active organization, including each worker's latest known instance state.","responses":{"200":{"description":"Workers returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerListResponse"}}}},"400":{"description":"The worker list query parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to list workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}]},"post":{"operationId":"postV1Workers","tags":["Workers"],"summary":"Create worker","description":"Creates a local worker or cloud worker for the active organization and returns the initial tokens needed to connect to it.","responses":{"201":{"description":"Local worker created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"202":{"description":"Cloud worker creation started successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCreateResponse"}}}},"400":{"description":"The worker creation payload was invalid.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/OrganizationUnavailableError"},{"$ref":"#/components/schemas/WorkspacePathRequiredError"},{"$ref":"#/components/schemas/WorkerUserEmailRequiredError"}]}}}},"401":{"description":"The caller must be signed in to create workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"The caller needs an active cloud plan before launching a cloud worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerPaymentRequiredError"}}}},"409":{"description":"The organization has reached its worker limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerOrgLimitReachedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"destination":{"type":"string","enum":["local","cloud"]},"workspacePath":{"type":"string"},"sandboxBackend":{"type":"string"},"imageVersion":{"type":"string"}},"required":["name","destination"]}}}}}},"/v1/workers/{id}":{"get":{"operationId":"getV1WorkersById","tags":["Workers"],"summary":"Get worker","description":"Returns one worker from the active organization together with its latest provisioned instance details.","responses":{"200":{"description":"Worker returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerResponse"}}}},"400":{"description":"The worker path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]},"patch":{"operationId":"patchV1WorkersById","tags":["Workers"],"summary":"Update worker","description":"Renames a worker, but only when the caller is the user who originally created that worker.","responses":{"200":{"description":"Worker updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUpdateResponse"}}}},"400":{"description":"The worker update request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to update workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Only the worker owner can rename this worker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}}},"delete":{"operationId":"deleteV1WorkersById","tags":["Workers"],"summary":"Delete worker","description":"Deletes a worker and cascades cleanup for its tokens, runtime records, and provider-specific resources.","responses":{"204":{"description":"Worker deleted successfully."},"400":{"description":"The worker deletion path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to delete workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/tokens":{"post":{"operationId":"postV1WorkersByIdTokens","tags":["Workers"],"summary":"Get worker connection tokens","description":"Returns connection tokens and the resolved OpenWork connect URL for an existing worker.","responses":{"200":{"description":"Worker connection tokens returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerTokensResponse"}}}},"400":{"description":"The worker token path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to request worker tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"The worker is not ready to return connection tokens yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerConnectionError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime":{"get":{"operationId":"getV1WorkersByIdRuntime","tags":["Workers","Worker Runtime"],"summary":"Get worker runtime status","description":"Fetches runtime version and status information from a specific worker's runtime endpoint.","responses":{"200":{"description":"Worker runtime information returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The worker runtime path parameters were invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to read worker runtime information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}]}},"/v1/workers/{id}/runtime/upgrade":{"post":{"operationId":"postV1WorkersByIdRuntimeUpgrade","tags":["Workers","Worker Runtime"],"summary":"Upgrade worker runtime","description":"Forwards a runtime upgrade request to a specific worker and returns the worker runtime's response.","responses":{"200":{"description":"Worker runtime upgrade request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRuntimeResponse"}}}},"400":{"description":"The runtime upgrade request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The caller must be signed in to upgrade a worker runtime.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"The worker could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"parameters":[{"in":"path","name":"id","schema":{"format":"typeid","type":"string","minLength":30,"maxLength":30,"pattern":"^wrk_.*"},"required":true,"description":"Den TypeID with 'wrk_' prefix and a 26-character base32 suffix."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}}}},"/v1/mcp/token":{"post":{"operationId":"postV1McpToken","tags":["Authentication"],"summary":"Mint MCP access token","description":"Mints an org-scoped MCP access token for the caller's active organization so first-party clients can connect to the Den MCP server without a separate browser OAuth flow.","responses":{"200":{"description":"MCP access token minted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpTokenResponse"}}}},"400":{"description":"The token request was invalid or no active organization is selected.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/McpTokenOrganizationRequiredError"}]}}}},"401":{"description":"The caller must be signed in to mint an MCP token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"API keys cannot mint MCP tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["mcp:read","mcp:write"]}}}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcp","responses":{"200":{"description":"OK"}}}},"/mcp/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/agent":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAgent","responses":{"200":{"description":"OK"}}}},"/mcp/agent/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAgentWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/.well-known/oauth-protected-resource/mcp/admin":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcpAdmin","responses":{"200":{"description":"OK"}}}},"/mcp/admin/.well-known/oauth-protected-resource":{"get":{"operationId":"getMcpAdminWellKnownOauthProtectedResource","responses":{"200":{"description":"OK"}}}},"/v1/telemetry/ingest":{"post":{"operationId":"postV1TelemetryIngest","tags":["Telemetry"],"summary":"Ingest telemetry events","description":"Receives a batch of telemetry events from the OpenWork app or workers. Auth provides org and member identity. Unknown event types and disallowed fields are dropped. Always returns 204.","responses":{"204":{"description":"Events accepted."},"400":{"description":"Invalid event payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"source":{"type":"string","maxLength":32},"sessionId":{"type":"string","maxLength":128},"durationMs":{"type":"integer","minimum":0,"maximum":86400000},"success":{"type":"boolean"},"dimensions":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","label"]}}},"required":["type","timestamp"]}}},"required":["events"]}}}}}},"/v1/telemetry/dimensions":{"get":{"operationId":"getV1TelemetryDimensions","tags":["Telemetry"],"summary":"List telemetry dimension values","description":"Returns unique analytics dimension values for the active organization, such as project labels for the project selector.","responses":{"200":{"description":"Telemetry dimensions returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryDimensionListResponse"}}}},"400":{"description":"Invalid dimension query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"parameters":[{"in":"query","name":"type","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}},"/v1/telemetry/adoption":{"get":{"operationId":"getV1TelemetryAdoption","tags":["Telemetry"],"summary":"Get adoption metrics","description":"Returns org adoption metrics: member count, pending invites, active members in 7d and 30d windows, and a 12-week weekly active member trend.","responses":{"200":{"description":"Adoption metrics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAdoptionResponse"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/v1/telemetry/analytics":{"get":{"operationId":"getV1TelemetryAnalytics","tags":["Telemetry"],"summary":"Get usage analytics","description":"Returns Layer 1 (who is using AI) and Layer 2 (how often) analytics for the active org: member counts, active members, session and task volume in 7d/30d windows, average task duration, and a 12-week trend of active members, sessions, and tasks.","responses":{"200":{"description":"Analytics returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryAnalyticsResponse"}}}},"400":{"description":"Invalid analytics query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"Caller must be signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Usage analytics requires an Enterprise plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanRequiredError"}}}}},"parameters":[{"in":"query","name":"dimensionType","schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"query","name":"dimensionValue","schema":{"type":"string","minLength":1,"maxLength":128}}]}}}} \ No newline at end of file diff --git a/packages/types/src/den/desktop-policies.ts b/packages/types/src/den/desktop-policies.ts index 2098053c29..50b9629c52 100644 --- a/packages/types/src/den/desktop-policies.ts +++ b/packages/types/src/den/desktop-policies.ts @@ -111,18 +111,73 @@ export const desktopPolicyValueSchema = z export type DesktopPolicyValue = z.infer; -export const onboardingPromptsSchema = z - .array(z.string().trim().min(1).max(500)) - .min(2) - .max(3); +const onboardingPromptTextSchema = z.string().trim().min(1).max(500); + +const onboardingPromptSkillSlugSchema = z.string().trim().min(1).max(120); +const onboardingPromptIdentifierSchema = z.string().trim().min(1).max(255); +const onboardingPromptDisplayNameSchema = z.string().trim().min(1).max(200); + +export const onboardingPromptLocalSkillReferenceSchema = z.object({ + source: z.literal("local"), + slug: onboardingPromptSkillSlugSchema, +}); + +export const onboardingPromptConnectSkillReferenceSchema = z.object({ + source: z.literal("connect"), + slug: onboardingPromptSkillSlugSchema, + name: onboardingPromptDisplayNameSchema, + marketplaceId: onboardingPromptIdentifierSchema, + marketplaceName: onboardingPromptDisplayNameSchema, + pluginId: onboardingPromptIdentifierSchema, + pluginName: onboardingPromptDisplayNameSchema.optional(), + configObjectId: onboardingPromptIdentifierSchema, + capabilityName: onboardingPromptIdentifierSchema, +}); + +export const onboardingPromptSkillReferenceSchema = z.discriminatedUnion( + "source", + [ + onboardingPromptLocalSkillReferenceSchema, + onboardingPromptConnectSkillReferenceSchema, + ], +); + +export const onboardingPromptSchema = z.object({ + prompt: onboardingPromptTextSchema, + skill: onboardingPromptSkillReferenceSchema.optional(), +}); + +function coerceOnboardingPromptEntry(value: unknown) { + return typeof value === "string" ? { prompt: value } : value; +} + +function coerceOnboardingPrompts(value: unknown) { + return Array.isArray(value) ? value.map(coerceOnboardingPromptEntry) : value; +} + +export const onboardingPromptsSchema = z.preprocess( + coerceOnboardingPrompts, + z.array(onboardingPromptSchema).min(2).max(3), +); export const onboardingPromptDescriptionsSchema = z .array(z.string().trim().max(120)) .min(2) .max(3); +export type OnboardingPromptLocalSkillReference = z.infer< + typeof onboardingPromptLocalSkillReferenceSchema +>; +export type OnboardingPromptConnectSkillReference = z.infer< + typeof onboardingPromptConnectSkillReferenceSchema +>; +export type OnboardingPromptSkillReference = z.infer< + typeof onboardingPromptSkillReferenceSchema +>; +export type OnboardingPrompt = z.infer; + export type OnboardingPromptConfig = { - onboardingPrompts: string[]; + onboardingPrompts: OnboardingPrompt[]; onboardingPromptDescriptions?: string[]; }; @@ -147,7 +202,7 @@ export type DesktopPolicyDocumentWrite = z.infer< typeof desktopPolicyDocumentWriteSchema >; export type DefaultDesktopPolicyDocument = Required & { - onboardingPrompts?: string[]; + onboardingPrompts?: OnboardingPrompt[]; onboardingPromptDescriptions?: string[]; }; @@ -250,7 +305,9 @@ function coerceJsonRecord(value: unknown): unknown { } } -export function normalizeOnboardingPrompts(value: unknown): string[] | undefined { +export function normalizeOnboardingPrompts( + value: unknown, +): OnboardingPrompt[] | undefined { const parsed = onboardingPromptsSchema.safeParse(value); return parsed.success ? parsed.data : undefined; } @@ -486,7 +543,9 @@ export function selectEffectiveOnboardingPrompts(input: { defaultPolicy?: unknown; assignedPolicies: DesktopPolicyPromptCandidate[]; }): string[] | undefined { - return selectEffectiveOnboardingPromptConfig(input)?.onboardingPrompts; + return selectEffectiveOnboardingPromptConfig(input)?.onboardingPrompts.map( + (prompt) => prompt.prompt, + ); } export function selectEffectiveOnboardingPromptConfig(input: {