Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
test(composio): hold fakes to Composio's OpenAPI spec (MUL-9941) (#11277)
Jiayuan Zhang8da822bb945c
diff --git a/.github/ci-paths.json b/.github/ci-paths.jsonindex 5cc670a1c4..e3edcf7cbd 100644--- a/.github/ci-paths.json+++ b/.github/ci-paths.json@@ -139,6 +139,10 @@".multica/environments.toml","scripts/perf-compare.mjs","scripts/perf-compare.test.sh",+ "scripts/composio-spec.mjs",+ "scripts/fake-composio.mjs",+ "scripts/fake-composio.test.mjs",+ "server/pkg/composio/composiotest/openapi-v3.1.json","scripts/selfhost-wait.sh","scripts/install.sh","scripts/install.ps1",diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 7e648d4361..864480b2db 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -1157,6 +1157,11 @@ jobs:- name: Test UI performance comparison runnerrun: bash scripts/perf-compare.test.sh+ - name: Test fake Composio against the OpenAPI snapshot+ # Every endpoint the Go client calls must answer in the shape the+ # checked-in Composio v3.1 spec defines; fields it lacks fail here.+ run: node --test scripts/fake-composio.test.mjs+- name: Verify reserved-slugs.ts is up to date# Re-runs the generator and fails on any drift from the# checked-in TypeScript output. The Go side embeds the JSONdiff --git a/scripts/ci-scope.test.mjs b/scripts/ci-scope.test.mjsindex de13f3faff..153f8ff5c5 100644--- a/scripts/ci-scope.test.mjs+++ b/scripts/ci-scope.test.mjs@@ -81,6 +81,9 @@ for (const [name, files, selected] of [["E2E spec", ["e2e/guest.spec.ts"], ["e2e"]],["Playwright config", ["playwright.config.ts"], ["e2e"]],["dev fixtures", ["scripts/dev-fixtures.mjs"], ["quality", "e2e"]],+ ["fake Composio", ["scripts/fake-composio.mjs"], ["quality", "scripts"]],+ ["Composio spec tooling", ["scripts/composio-spec.mjs"], ["quality", "scripts"]],+ ["Composio OpenAPI snapshot", ["server/pkg/composio/composiotest/openapi-v3.1.json"], ["backend", "runtime", "scripts", "e2e"]],["CI configuration", [".github/ci-paths.json"], Object.keys(filters)],]) {test(`PR and main select only affected scopes: ${name}`, () => {diff --git a/scripts/composio-spec.mjs b/scripts/composio-spec.mjsnew file mode 100644index 0000000000..02ee27eab2--- /dev/null+++ b/scripts/composio-spec.mjs@@ -0,0 +1,232 @@+#!/usr/bin/env node+// The part of Composio's v3.1 OpenAPI spec that Multica depends on, and a+// checker for responses against it. scripts/fake-composio.test.mjs runs the+// local fake against it, and server/pkg/composio/composiotest embeds the same+// snapshot for the Go SDK tests and fakes.+//+// node scripts/composio-spec.mjs update # fetch the live spec and rewrite the snapshot+// node scripts/composio-spec.mjs update --from FILE # same, from a downloaded openapi.json+//+// The snapshot keeps only the responses of OPERATIONS, the components they+// reference, and no schema descriptions. Calling a new Composio endpoint means+// adding it to OPERATIONS, running `update`, and teaching the fake to answer it.+// After an update, run `node --test scripts/fake-composio.test.mjs` and+// `go test ./pkg/composio/... ./internal/integrations/composio/...` (from+// server/): a failure there is Composio's API moving under the fake or the SDK.++import { readFileSync, realpathSync, writeFileSync } from "node:fs";+import { fileURLToPath } from "node:url";++export const SPEC_URL = "https://backend.composio.dev/api/v3.1/openapi.json";+export const API_PREFIX = "/api/v3.1";+export const SNAPSHOT = fileURLToPath(new URL("../server/pkg/composio/composiotest/openapi-v3.1.json", import.meta.url));++// Every endpoint server/pkg/composio calls, as "METHOD path" under API_PREFIX.+export const OPERATIONS = [+ "GET /toolkits",+ "GET /toolkits/{slug}",+ "GET /auth_configs",+ "POST /auth_configs",+ "POST /connected_accounts/link",+ "GET /connected_accounts",+ "POST /connected_accounts/{nanoid}/revoke",+ "DELETE /connected_accounts/{nanoid}",+ "GET /tools",+ "GET /tools/{tool_slug}",+ "POST /tools/execute/{tool_slug}",+ "POST /tool_router/session",+];++// Values under these keys are data, not schemas.+const DATA_KEYS = new Set(["example", "examples", "default", "enum", "const"]);++function stripDescriptions(node) {+ if (Array.isArray(node)) return node.map(stripDescriptions);+ if (!node || typeof node !== "object") return node;+ const out = {};+ for (const [key, value] of Object.entries(node)) {+ if (key === "description") continue;+ if (DATA_KEYS.has(key)) out[key] = value;+ else if (key === "properties") {+ out[key] = Object.fromEntries(Object.entries(value).map(([name, schema]) => [name, stripDescriptions(schema)]));+ } else out[key] = stripDescriptions(value);+ }+ return out;+}++function refsIn(node, found = new Set()) {+ if (Array.isArray(node)) node.forEach((item) => refsIn(item, found));+ else if (node && typeof node === "object") {+ if (typeof node.$ref === "string") found.add(node.$ref);+ for (const [key, value] of Object.entries(node)) if (!DATA_KEYS.has(key)) refsIn(value, found);+ }+ return found;+}++export function prune(spec) {+ const paths = {};+ for (const op of OPERATIONS) {+ const [method, path] = op.split(" ");+ const source = spec.paths?.[API_PREFIX + path]?.[method.toLowerCase()];+ if (!source) throw new Error(`${method} ${API_PREFIX}${path} is not in the spec`);+ const responses = {};+ for (const [status, response] of Object.entries(source.responses ?? {})) {+ const { content, ...rest } = response;+ responses[status] = { ...rest };+ if (content) {+ responses[status].content = Object.fromEntries(+ Object.entries(content).map(([type, media]) => [type, { schema: stripDescriptions(media.schema) }]),+ );+ }+ }+ (paths[API_PREFIX + path] ??= {})[method.toLowerCase()] = { operationId: source.operationId, responses };+ }+ const schemas = {};+ const pending = [...refsIn(paths)];+ while (pending.length > 0) {+ const ref = pending.pop();+ const name = /^#\/components\/schemas\/(.+)$/.exec(ref)?.[1];+ if (!name) throw new Error(`unsupported $ref ${ref}`);+ if (schemas[name]) continue;+ if (!spec.components?.schemas?.[name]) throw new Error(`${ref} is not in the spec`);+ schemas[name] = stripDescriptions(spec.components.schemas[name]);+ pending.push(...refsIn(schemas[name]));+ }+ return {+ openapi: spec.openapi,+ info: { title: spec.info?.title, version: spec.info?.version },+ "x-source": SPEC_URL,+ "x-update": "node scripts/composio-spec.mjs update",+ paths,+ components: { schemas: Object.fromEntries(Object.entries(schemas).sort(([a], [b]) => a.localeCompare(b))) },+ };+}++export function loadSnapshot() {+ return JSON.parse(readFileSync(SNAPSHOT, "utf8"));+}++// responseSchema returns the JSON schema of op's response with the given+// status, or undefined when the spec declares none.+export function responseSchema(spec, op, status) {+ const [method, path] = op.split(" ");+ const operation = spec.paths[API_PREFIX + path]?.[method.toLowerCase()];+ if (!operation) throw new Error(`${op} is not in the snapshot; add it to OPERATIONS in scripts/composio-spec.mjs`);+ return operation.responses[String(status)]?.content?.["application/json"]?.schema;+}++// successStatus is the 2xx status op answers with.+export function successStatus(spec, op) {+ const [method, path] = op.split(" ");+ return Number(Object.keys(spec.paths[API_PREFIX + path][method.toLowerCase()].responses).find((s) => s.startsWith("2")));+}++const isZero = (value) =>+ value === null || value === "" || value === 0 || value === false ||+ (Array.isArray(value) && value.length === 0) ||+ (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0);++function typeOf(value) {+ if (value === null) return "null";+ if (Array.isArray(value)) return "array";+ if (typeof value === "number") return Number.isInteger(value) ? "integer" : "number";+ return typeof value;+}++// check lists where value departs from schema: a type or enum mismatch, a+// missing required field, or a field the schema does not define. An object+// schema with properties and no additionalProperties is closed: Composio's+// spec spells out an open object as `additionalProperties: {nullable: true}`.+// oneOf is checked like anyOf.+//+// With fields: true, as for values marshalled from Go structs, required fields+// are not enforced and zero-valued fields are skipped, since an unset Go field+// marshals to one.+export function check(spec, schema, value, { fields = false } = {}) {+ const errors = [];+ const resolve = (s) => {+ while (s?.$ref) s = spec.components.schemas[s.$ref.replace("#/components/schemas/", "")];+ return s;+ };++ function visit(rawSchema, v, at, out) {+ const s = resolve(rawSchema);+ if (!s || typeof s !== "object") return;+ if (v === null) {+ if (!s.nullable && (s.type || s.properties || s.items || s.enum)) out.push(`${at}: is null, the spec does not allow null`);+ return;+ }+ for (const branch of s.allOf ?? []) visit(branch, v, at, out);+ const alternatives = s.anyOf ?? s.oneOf;+ if (alternatives) {+ let closest;+ for (const branch of alternatives) {+ const branchErrors = [];+ visit(branch, v, at, branchErrors);+ if (branchErrors.length === 0) {+ closest = undefined;+ break;+ }+ if (!closest || branchErrors.length < closest.length) closest = branchErrors;+ }+ if (closest) out.push(...closest.map((e) => `${e} (closest of ${alternatives.length} alternatives)`));+ if (!s.type && !s.properties) return;+ }+ const type = s.type ?? (s.properties ? "object" : s.items ? "array" : undefined);+ const actual = typeOf(v);+ if (type && actual !== type && !(type === "number" && actual === "integer")) {+ out.push(`${at}: is ${actual}, the spec says ${type}`);+ return;+ }+ if (s.enum && !s.enum.includes(v)) out.push(`${at}: ${JSON.stringify(v)} is not one of ${JSON.stringify(s.enum)}`);+ if (actual === "array" && s.items) v.forEach((item, i) => visit(s.items, item, `${at}[${i}]`, out));+ if (actual !== "object") return;+ const properties = s.properties ?? {};+ if (!fields) {+ for (const name of s.required ?? []) if (!(name in v)) out.push(`${at}: misses required field ${name}`);+ }+ const extra = s.additionalProperties;+ for (const [name, item] of Object.entries(v)) {+ if (fields && isZero(item)) continue;+ const where = `${at}.${name}`;+ if (Object.hasOwn(properties, name)) visit(properties[name], item, where, out);+ else if (extra === false || (extra === undefined && s.properties)) out.push(`${where}: is not in the spec`);+ else if (extra && typeof extra === "object") visit(extra, item, where, out);+ }+ }++ visit(schema, value, "$", errors);+ return errors;+}++// format is JSON.stringify(value, null, 2) with every object or array that+// fits in a 100-column line written on one line, which keeps the snapshot+// small and its diffs readable.+function format(value, indent = "") {+ const inline = JSON.stringify(value);+ if (inline.length + indent.length <= 100 || value === null || typeof value !== "object") return inline;+ const inner = `${indent} `;+ const entries = Array.isArray(value)+ ? value.map((item) => inner + format(item, inner))+ : Object.entries(value).map(([key, item]) => `${inner}${JSON.stringify(key)}: ${format(item, inner)}`);+ const [open, close] = Array.isArray(value) ? ["[", "]"] : ["{", "}"];+ return `${open}\n${entries.join(",\n")}\n${indent}${close}`;+}++async function update(args) {+ const from = args[args.indexOf("--from") + 1];+ const spec = args.includes("--from")+ ? JSON.parse(readFileSync(from, "utf8"))+ : await (await fetch(SPEC_URL, { signal: AbortSignal.timeout(60_000) })).json();+ writeFileSync(SNAPSHOT, `${format(prune(spec))}\n`);+ console.log(`[composio-spec] wrote ${OPERATIONS.length} operations of ${spec.info?.title} ${spec.info?.version} to ${SNAPSHOT}`);+}++if (process.argv[1] && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))) {+ const [command, ...args] = process.argv.slice(2);+ if (command !== "update") {+ console.error("Usage: node scripts/composio-spec.mjs update [--from openapi.json]");+ process.exit(1);+ }+ await update(args);+}diff --git a/scripts/fake-composio.mjs b/scripts/fake-composio.mjsindex cef0c62a25..72c7124f83 100644--- a/scripts/fake-composio.mjs+++ b/scripts/fake-composio.mjs@@ -27,9 +27,16 @@//// `serve [--port N]` runs it in the foreground without touching any// environment, for setups other than `make up`.+//+// Every response has the shape Composio's v3.1 OpenAPI spec gives it, down to+// the fields it leaves out: `node --test scripts/fake-composio.test.mjs` calls+// each endpoint and checks the answer against the snapshot of that spec in+// server/pkg/composio/composiotest/openapi-v3.1.json. Refresh the snapshot with+// `node scripts/composio-spec.mjs update`, then rerun the test; a new endpoint+// goes into OPERATIONS in scripts/composio-spec.mjs first.import { spawn, spawnSync } from "node:child_process";-import { randomBytes } from "node:crypto";+import { randomBytes, randomUUID } from "node:crypto";import { existsSync, mkdirSync, openSync, readFileSync, rmSync, writeFileSync } from "node:fs";import http from "node:http";import { dirname, isAbsolute, join, resolve } from "node:path";@@ -113,16 +120,91 @@ const TOOLKITS = [].map(([slug, name, category, auth]) => ({slug,name,- meta: {- logo: `https://logos.composio.dev/api/${slug}`,- description: `${name} through the local Composio stand-in.`,- categories: [{ id: category.toLowerCase().replace(/[^a-z0-9]+/g, "-"), name: category }],- },- no_auth: auth === "none",- auth_schemes: auth === "managed" ? ["oauth2"] : auth === "none" ? [] : [auth],- composio_managed_auth_schemes: auth === "managed" ? ["oauth2"] : [],+ category: { id: category.toLowerCase().replace(/[^a-z0-9]+/g, "-"), name: category },+ managed: auth === "managed",+ // Upper-case auth modes, as auth_config_details and auth configs name them.+ modes: auth === "managed" ? ["OAUTH2"] : auth === "none" ? ["NO_AUTH"] : [auth.toUpperCase()],}));+const VERSION = "20250905_00";+const EPOCH = "2025-01-01T00:00:00.000Z";+const logoOf = (slug) => `https://logos.composio.dev/api/${slug}`;++function toolkitMeta(toolkit) {+ return {+ created_at: EPOCH,+ updated_at: EPOCH,+ description: `${toolkit.name} through the local Composio stand-in.`,+ logo: logoOf(toolkit.slug),+ triggers_count: 0,+ tools_count: toolsOf(toolkit.slug).length,+ version: VERSION,+ };+}++// The list reports auth schemes as lower-case auth_schemes and its categories+// as {id, name}.+function listedToolkit(toolkit) {+ const noAuth = toolkit.modes[0] === "NO_AUTH";+ return {+ slug: toolkit.slug,+ name: toolkit.name,+ type: "native",+ app: toolkit.name,+ toolkit_type: "api",+ auth_schemes: noAuth ? [] : toolkit.modes.map((mode) => mode.toLowerCase()),+ composio_managed_auth_schemes: toolkit.managed ? ["oauth2"] : [],+ is_local_toolkit: false,+ no_auth: noAuth,+ deprecated: { toolkitId: `tk_${toolkit.slug}` },+ meta: { ...toolkitMeta(toolkit), categories: [toolkit.category] },+ };+}++function credentialField(mode) {+ const [name, displayName] = mode === "BEARER_TOKEN" ? ["token", "Token"] : mode === "BASIC" ? ["password", "Password"] : ["generic_api_key", "API Key"];+ return { name, displayName, type: "string", description: `Your ${displayName}.`, required: true, default: null, is_secret: true, user_visible: true };+}++// A single toolkit has no auth_schemes or no_auth: each scheme is an+// auth_config_details entry. Its categories are {name, slug}.+function toolkitDetails(toolkit) {+ return {+ slug: toolkit.slug,+ name: toolkit.name,+ type: "native",+ toolkit_type: "api",+ enabled: true,+ composio_managed_auth_schemes: toolkit.managed ? ["oauth2"] : [],+ composio_managed_auth: toolkit.managed+ ? [{ managed_app_id: `ma_${toolkit.slug}`, is_default: true, mode: "OAUTH2", scopes: { available: [] } }]+ : [],+ is_local_toolkit: false,+ auth_config_details: toolkit.modes.map((mode) => ({+ mode,+ name: `${toolkit.slug}_${mode.toLowerCase()}`,+ required_scopes: [],+ is_connection_revoke_supported: mode === "OAUTH2",+ fields: {+ auth_config_creation: { required: [], optional: [] },+ connected_account_initiation: {+ required: mode === "OAUTH2" || mode === "NO_AUTH" ? [] : [credentialField(mode)],+ optional: [],+ },+ },+ })),+ docs_url: null,+ meta: {+ ...toolkitMeta(toolkit),+ categories: [{ name: toolkit.category.name, slug: toolkit.category.id }],+ available_versions: [VERSION],+ },+ deprecated: { toolkitId: `tk_${toolkit.slug}`, rawProxyInfoByAuthSchemes: [] },+ };+}++const page = (items) => ({ items, next_cursor: null, total_pages: 1, current_page: 1, total_items: items.length });+// Slugs follow Composio's VERB_OBJECT naming, which is what the gateway// classifies into read / write / send / delete.const TOOLS = {@@ -180,13 +262,20 @@ const toolView = (slug, [toolSlug, name, description]) => ({slug: toolSlug,name,description,- version: "latest",- tags: [],- toolkit: { slug, name: TOOLKITS.find((t) => t.slug === slug)?.name ?? slug },+ toolkit: { slug, name: TOOLKITS.find((t) => t.slug === slug)?.name ?? slug, logo: logoOf(slug) },input_parameters: {type: "object",properties: { query: { type: "string", description: "Free text the fake echoes back." } },},+ output_parameters: { type: "object", properties: {} },+ no_auth: false,+ version: VERSION,+ available_versions: [VERSION],+ scopes: [],+ scope_requirements: null,+ tags: [],+ is_deprecated: false,+ deprecated: { displayName: name, version: VERSION, available_versions: [VERSION], is_deprecated: false, toolkit: { logo: logoOf(slug) } },});function findTool(toolSlug) {@@ -215,13 +304,18 @@ function cannedResult(toolSlug, args) {// ------------------------------------------------------------------- server ---+// Credentials a connected account's state carries, per auth scheme: the spec+// requires them on an ACTIVE or INACTIVE account.+const STATE_CREDENTIALS = {+ OAUTH2: { access_token: "fake-access-token", token_type: "Bearer" },+ BEARER_TOKEN: { token: "fake-token" },+ BASIC: { username: "fake-user" },+ API_KEY: {},+};+function serve({ port, stateFile, watchFile }) {- const authConfigs = new Map(- TOOLKITS.filter((t) => t.composio_managed_auth_schemes.length > 0).map((t) => [- t.slug,- { id: `ac_${t.slug}`, scheme: "OAUTH2", managed: true },- ]),- );+ const newAuthConfig = (slug, scheme, managed) => ({ id: `ac_${slug}`, uuid: randomUUID(), scheme, managed, created_at: new Date().toISOString() });+ const authConfigs = new Map(TOOLKITS.filter((t) => t.managed).map((t) => [t.slug, newAuthConfig(t.slug, "OAUTH2", true)]));const links = new Map();const accounts = new Map();let seq = 1;@@ -235,6 +329,47 @@ function serve({ port, stateFile, watchFile }) {res.end(JSON.stringify(body));}+ function sendError(res, code, slug, message) {+ send(res, code, { error: { message, code, slug, status: code } });+ }++ function authConfigView(slug, config) {+ return {+ id: config.id,+ uuid: config.uuid,+ type: config.managed ? "default" : "custom",+ toolkit: { slug, logo: logoOf(slug) },+ name: `${toolkitName(slug)} (fake)`,+ auth_scheme: config.scheme,+ is_composio_managed: config.managed,+ managed_app_id: config.managed ? `ma_${slug}` : null,+ status: "ENABLED",+ created_at: config.created_at,+ last_updated_at: config.created_at,+ no_of_connections: [...accounts.values()].filter((account) => account.auth_config_id === config.id).length,+ tool_access_config: {},+ };+ }++ function accountView(account) {+ const credentials = account.status === "ACTIVE" || account.status === "INACTIVE" ? STATE_CREDENTIALS[account.scheme] : {};+ return {+ id: account.id,+ user_id: account.user_id,+ toolkit: { slug: account.slug },+ auth_config: { id: account.auth_config_id, auth_scheme: account.scheme, is_composio_managed: account.managed, is_disabled: false },+ status: account.status,+ status_reason: null,+ is_disabled: false,+ word_id: null,+ alias: account.alias ?? null,+ state: { authScheme: account.scheme, val: { status: account.status, ...credentials } },+ data: {},+ created_at: account.created_at,+ updated_at: account.updated_at,+ };+ }+function readBody(req) {return new Promise((done) => {let raw = "";@@ -289,30 +424,31 @@ ${body}if (path === "/connect") {const token = url.searchParams.get("token") ?? "";const link = links.get(token);- if (!link) return send(res, 404, { error: { message: "unknown connect link" } });+ if (!link) return sendError(res, 404, "NOT_FOUND", "unknown connect link");res.writeHead(200, { "content-type": "text/html; charset=utf-8" });return res.end(connectPage(token, link));}if (path === "/connect/finish") {const link = links.get(url.searchParams.get("token") ?? "");- if (!link) return send(res, 404, { error: { message: "unknown connect link" } });+ if (!link) return sendError(res, 404, "NOT_FOUND", "unknown connect link");const callback = new URL(link.callback_url);if (url.searchParams.get("ok") === "1") {- const id = `ca_${link.slug}_${seq++}`;const now = new Date().toISOString();const config = authConfigs.get(link.slug);- accounts.set(id, {- id,+ accounts.set(link.account_id, {+ id: link.account_id,user_id: link.user_id,+ alias: link.alias,auth_config_id: link.auth_config_id,- auth_config: { id: link.auth_config_id, auth_scheme: config?.scheme ?? "OAUTH2", is_composio_managed: Boolean(config?.managed) },- toolkit: { slug: link.slug },+ scheme: config?.scheme ?? "OAUTH2",+ managed: Boolean(config?.managed),+ slug: link.slug,status: "ACTIVE",created_at: now,updated_at: now,});callback.searchParams.set("status", "success");- callback.searchParams.set("connected_account_id", id);+ callback.searchParams.set("connected_account_id", link.account_id);} else {callback.searchParams.set("status", "failed");}@@ -320,77 +456,55 @@ ${body}return res.end();}- if (!path.startsWith(`${API_PREFIX}/`)) return send(res, 404, { error: { message: "not found" } });+ if (!path.startsWith(`${API_PREFIX}/`)) return sendError(res, 404, "NOT_FOUND", "not found");const api = path.slice(API_PREFIX.length);if (method === "GET" && api === "/toolkits") {const category = url.searchParams.get("category");- const items = category ? TOOLKITS.filter((t) => t.meta.categories.some((c) => c.id === category)) : TOOLKITS;- return send(res, 200, { items, total_items: items.length });+ return send(res, 200, page(TOOLKITS.filter((t) => !category || t.category.id === category).map(listedToolkit)));}if (method === "GET" && api.startsWith("/toolkits/")) {const slug = decodeURIComponent(api.slice("/toolkits/".length)).toLowerCase();const toolkit = TOOLKITS.find((t) => t.slug === slug);- if (!toolkit) return send(res, 404, { error: { message: "toolkit not found" } });- // Unlike the list, the single-toolkit response has no auth_schemes or- // no_auth: each scheme is an auth_config_details entry.- const { auth_schemes: schemes, no_auth: noAuth, ...rest } = toolkit;- const modes = noAuth ? ["NO_AUTH"] : schemes.map((s) => s.toUpperCase());- return send(res, 200, {- ...rest,- auth_config_details: modes.map((mode) => ({- mode,- name: `${slug}_${mode.toLowerCase()}`,- fields: {- auth_config_creation: { required: [], optional: [] },- connected_account_initiation: {- required: mode === "OAUTH2" || mode === "NO_AUTH" ? [] : [{ name: "generic_api_key", displayName: "API Key", type: "string", required: true, default: null }],- optional: [],- },- },- })),- });+ if (!toolkit) return sendError(res, 404, "TOOLKIT_NOT_FOUND", "toolkit not found");+ return send(res, 200, toolkitDetails(toolkit));}if (method === "GET" && api === "/auth_configs") {const wanted = (url.searchParams.get("toolkit_slug") ?? "").split(",").filter(Boolean);const items = [...authConfigs.entries()].filter(([slug]) => wanted.length === 0 || wanted.includes(slug))- .map(([slug, config]) => ({- id: config.id,- name: `${toolkitName(slug)} (fake)`,- toolkit: { slug },- auth_scheme: config.scheme,- is_composio_managed: config.managed,- status: "ENABLED",- last_updated_at: "2026-01-01T00:00:00Z",- }));- return send(res, 200, { items, total_items: items.length });+ .map(([slug, config]) => authConfigView(slug, config));+ return send(res, 200, page(items));}if (method === "POST" && api === "/auth_configs") {const body = await readBody(req);const slug = body?.toolkit?.slug;const toolkit = TOOLKITS.find((t) => t.slug === slug);- if (!toolkit) return send(res, 400, { error: { message: "toolkit.slug must name a known toolkit" } });+ if (!toolkit) return sendError(res, 400, "INVALID_INPUT", "toolkit.slug must name a known toolkit");const custom = body.auth_config?.type === "use_custom_auth";const scheme = custom ? String(body.auth_config.authScheme ?? "").toUpperCase() : "OAUTH2";- const offered = custom ? toolkit.auth_schemes : toolkit.composio_managed_auth_schemes;- if (!offered.some((s) => s.toUpperCase() === scheme)) {- return send(res, 400, { error: { message: `${slug} does not offer ${custom ? scheme : "managed"} auth` } });+ if (custom ? !toolkit.modes.includes(scheme) || scheme === "NO_AUTH" : !toolkit.managed) {+ return sendError(res, 400, "INVALID_INPUT", `${slug} does not offer ${custom ? scheme : "managed"} auth`);}- const config = { id: `ac_${slug}`, scheme, managed: !custom };+ const config = newAuthConfig(slug, scheme, !custom);authConfigs.set(slug, config);- return send(res, 201, { auth_config: { id: config.id, auth_scheme: scheme, is_composio_managed: config.managed }, toolkit: { slug } });+ return send(res, 201, {+ toolkit: { slug },+ auth_config: { id: config.id, auth_scheme: scheme, is_composio_managed: config.managed, managed_app_id: config.managed ? `ma_${slug}` : null },+ });}if (method === "POST" && api === "/connected_accounts/link") {const body = await readBody(req);const slug = slugOfAuthConfig(body.auth_config_id);- if (!slug) return send(res, 404, { error: { message: "auth config not found" } });+ if (!slug) return sendError(res, 404, "AUTH_CONFIG_NOT_FOUND", "auth config not found");const token = `lk_${seq++}`;- links.set(token, { ...body, slug });+ const accountID = `ca_${slug}_${seq++}`;+ links.set(token, { ...body, slug, account_id: accountID });return send(res, 201, {link_token: token,redirect_url: `${baseURL}/connect?token=${token}`,expires_at: new Date(Date.now() + 10 * 60_000).toISOString(),+ connected_account_id: accountID,});}if (method === "GET" && api === "/connected_accounts") {@@ -404,21 +518,25 @@ ${body}const items = [...accounts.values()].filter((account) =>Object.entries(filters).every(([key, values]) => values.length === 0 || values.includes(account[key])) &&- (slugs.length === 0 || slugs.includes(account.toolkit.slug)),+ (slugs.length === 0 || slugs.includes(account.slug)),);- return send(res, 200, { items, total_items: items.length });+ return send(res, 200, page(items.map(accountView)));}let match = /^\/connected_accounts\/([^/]+)\/revoke$/.exec(api);if (method === "POST" && match) {const account = accounts.get(decodeURIComponent(match[1]));- if (!account) return send(res, 404, { error: { message: "connected account not found" } });+ if (!account) return sendError(res, 404, "CONNECTED_ACCOUNT_NOT_FOUND", "connected account not found");account.status = "INACTIVE";- return send(res, 200, { success: true });+ account.updated_at = new Date().toISOString();+ return send(res, 200, {+ revoked_tokens: account.scheme === "OAUTH2" ? ["access_token", "refresh_token"] : ["credential"],+ connected_account: { id: account.id, status: account.status },+ });}match = /^\/connected_accounts\/([^/]+)$/.exec(api);if (method === "DELETE" && match) {if (!accounts.delete(decodeURIComponent(match[1]))) {- return send(res, 404, { error: { message: "connected account not found" } });+ return sendError(res, 404, "CONNECTED_ACCOUNT_NOT_FOUND", "connected account not found");}return send(res, 200, { success: true });}@@ -428,12 +546,12 @@ ${body}const items = toolsOf(slug).map((tool) => toolView(slug, tool)).filter((tool) => !search || `${tool.slug} ${tool.description}`.toLowerCase().includes(search));- return send(res, 200, { items, total_items: items.length });+ return send(res, 200, page(items));}if (method === "POST" && api.startsWith("/tools/execute/")) {const toolSlug = decodeURIComponent(api.slice("/tools/execute/".length)).toUpperCase();const body = await readBody(req);- if (!findTool(toolSlug)) return send(res, 404, { error: { message: "tool not found" } });+ if (!findTool(toolSlug)) return sendError(res, 404, "TOOL_NOT_FOUND", "tool not found");// Accounts issued before a restart are unknown here but still live in// Multica's database; only an account revoked since is refused.const account = accounts.get(body.connected_account_id);@@ -441,22 +559,28 @@ ${body}return send(res, 200, { successful: false, error: "connected account is not active", data: {} });}log(`execute ${toolSlug} as ${body.connected_account_id ?? body.user_id ?? "?"}`);- return send(res, 200, { successful: true, data: cannedResult(toolSlug, body.arguments ?? {}), log_id: `log_${seq++}` });+ return send(res, 200, { successful: true, error: null, data: cannedResult(toolSlug, body.arguments ?? {}), log_id: `log_${seq++}` });}if (method === "GET" && api.startsWith("/tools/")) {const tool = findTool(decodeURIComponent(api.slice("/tools/".length)));- return tool ? send(res, 200, tool) : send(res, 404, { error: { message: "tool not found" } });+ return tool ? send(res, 200, tool) : sendError(res, 404, "TOOL_NOT_FOUND", "tool not found");}// An empty MCP URL tells Multica there is no session to attach.if (method === "POST" && api === "/tool_router/session") {- await readBody(req);- return send(res, 200, { session_id: `trs_${seq++}`, mcp: { type: "http", url: "" } });+ const body = await readBody(req);+ return send(res, 201, {+ session_id: `trs_${seq++}`,+ mcp: { type: "http", url: "" },+ tool_router_tools: [],+ config: { user_id: String(body.user_id ?? ""), instant: false, preload: { tools: [] }, search: {}, execute: {} },+ config_version: 1,+ });}- return send(res, 404, { error: { message: `the fake does not implement ${method} ${api}` } });+ return sendError(res, 404, "NOT_FOUND", `the fake does not implement ${method} ${api}`);}const server = http.createServer((req, res) => {- route(req, res).catch((error) => send(res, 500, { error: { message: String(error) } }));+ route(req, res).catch((error) => sendError(res, 500, "INTERNAL_SERVER_ERROR", String(error)));if (req.url !== "/health") log(`${req.method} ${req.url}`);});diff --git a/scripts/fake-composio.test.mjs b/scripts/fake-composio.test.mjsnew file mode 100644index 0000000000..2e1ec26ecb--- /dev/null+++ b/scripts/fake-composio.test.mjs@@ -0,0 +1,181 @@+// Runs scripts/fake-composio.mjs and checks every response it gives the+// requests server/pkg/composio makes against the snapshot of Composio's v3.1+// OpenAPI spec (see scripts/composio-spec.mjs).+import assert from "node:assert/strict";+import { spawn } from "node:child_process";+import { once } from "node:events";+import { after, before, test } from "node:test";+import { fileURLToPath } from "node:url";++import { API_PREFIX, OPERATIONS, check, loadSnapshot, responseSchema, successStatus } from "./composio-spec.mjs";++const spec = loadSnapshot();+const checked = new Set();+let fake;+let origin;++before(async () => {+ fake = spawn(process.execPath, [fileURLToPath(new URL("./fake-composio.mjs", import.meta.url)), "serve"], {+ stdio: ["ignore", "pipe", "inherit"],+ });+ let output = "";+ fake.stdout.setEncoding("utf8");+ origin = await new Promise((resolve, reject) => {+ fake.stdout.on("data", (chunk) => {+ output += chunk;+ const serving = /serving (http:\/\/[\d.]+:\d+)/.exec(output);+ if (serving) resolve(serving[1]);+ });+ fake.on("exit", () => reject(new Error(`the fake exited before serving:\n${output}`)));+ });+});++after(async () => {+ if (fake.exitCode === null) {+ fake.kill("SIGTERM");+ await once(fake, "exit");+ }+});++// call sends a request the way the Go client does and fails the test unless+// the answer matches op's response schema for its status.+async function call(op, path, { method = op.split(" ")[0], body, status = successStatus(spec, op) } = {}) {+ const response = await fetch(`${origin}${API_PREFIX}${path}`, {+ method,+ headers: { "content-type": "application/json", "x-api-key": "fake-composio" },+ body: body === undefined ? undefined : JSON.stringify(body),+ });+ const json = await response.json();+ assert.equal(response.status, status, `${method} ${path} answered ${response.status}: ${JSON.stringify(json)}`);+ const schema = responseSchema(spec, op, response.status);+ assert.ok(schema, `the spec declares no ${response.status} response for ${op}`);+ assert.deepEqual(check(spec, schema, json), [], `${method} ${path} does not match ${op} ${response.status}`);+ checked.add(`${op} ${response.status}`);+ return json;+}++// connect runs the hosted connect flow for an auth config and returns the new+// connected account id.+async function connect(authConfigID, userID) {+ const link = await call("POST /connected_accounts/link", "/connected_accounts/link", {+ body: { auth_config_id: authConfigID, user_id: userID, callback_url: "http://127.0.0.1:1/callback" },+ });+ const finish = await fetch(`${origin}/connect/finish?token=${link.link_token}&ok=1`, { redirect: "manual" });+ const callback = new URL(finish.headers.get("location"));+ assert.equal(callback.searchParams.get("status"), "success");+ assert.equal(callback.searchParams.get("connected_account_id"), link.connected_account_id);+ return link.connected_account_id;+}++test("toolkits match the spec, with categories under meta and auth schemes only in the list", async () => {+ const listed = await call("GET /toolkits", "/toolkits?limit=1000&sort_by=usage");+ const github = listed.items.find((t) => t.slug === "github");+ assert.deepEqual(github.meta.categories, [{ id: "developer-tools-devops", name: "Developer Tools & DevOps" }]);+ await call("GET /toolkits", "/toolkits?category=developer-tools-devops");++ for (const slug of ["gmail", "posthog", "exa", "hackernews"]) {+ const details = await call("GET /toolkits/{slug}", `/toolkits/${slug}`);+ assert.ok(details.auth_config_details.length > 0, `${slug} lists no auth_config_details`);+ }+ await call("GET /toolkits/{slug}", "/toolkits/nope", { status: 404 });+});++test("auth configs, connect links and connected accounts match the spec", async () => {+ await call("GET /auth_configs", "/auth_configs?toolkit_slug=gmail,slack");+ await call("POST /auth_configs", "/auth_configs", {+ body: { toolkit: { slug: "slack" }, auth_config: { type: "use_composio_managed_auth" } },+ });+ const created = await call("POST /auth_configs", "/auth_configs", {+ body: { toolkit: { slug: "posthog" }, auth_config: { type: "use_custom_auth", authScheme: "API_KEY", name: "PostHog", credentials: {} } },+ });+ await call("POST /auth_configs", "/auth_configs", {+ body: { toolkit: { slug: "posthog" }, auth_config: { type: "use_custom_auth", authScheme: "BASIC", credentials: {} } },+ status: 400,+ });+ await call("POST /auth_configs", "/auth_configs", {+ body: { toolkit: { slug: "exa" }, auth_config: { type: "use_custom_auth", authScheme: "BEARER_TOKEN", credentials: {} } },+ });+ await call("GET /auth_configs", "/auth_configs");++ const keyAccount = await connect(created.auth_config.id, "u_1");+ const oauthAccount = await connect("ac_gmail", "u_1");+ const tokenAccount = await connect("ac_exa", "u_2");+ await call("POST /connected_accounts/link", "/connected_accounts/link", {+ body: { auth_config_id: "ac_missing", user_id: "u_1" },+ status: 404,+ });++ const listed = await call("GET /connected_accounts", `/connected_accounts?user_ids=u_1&user_ids=u_2&statuses=ACTIVE`);+ assert.deepEqual(listed.items.map((a) => a.id).sort(), [keyAccount, oauthAccount, tokenAccount].sort());+ const [account] = (await call("GET /connected_accounts", `/connected_accounts?connected_account_ids=${oauthAccount}`)).items;+ assert.equal(account.auth_config.id, "ac_gmail");++ for (const id of [oauthAccount, keyAccount, tokenAccount]) {+ await call("POST /connected_accounts/{nanoid}/revoke", `/connected_accounts/${id}/revoke`, { body: {} });+ }+ await call("GET /connected_accounts", `/connected_accounts?connected_account_ids=${oauthAccount}&connected_account_ids=${tokenAccount}`);+ await call("POST /tools/execute/{tool_slug}", "/tools/execute/GMAIL_FETCH_EMAILS", {+ body: { arguments: {}, connected_account_id: oauthAccount, user_id: "u_1", version: "20250905_00" },+ });+ await call("DELETE /connected_accounts/{nanoid}", `/connected_accounts/${keyAccount}`);+ await call("DELETE /connected_accounts/{nanoid}", `/connected_accounts/${keyAccount}`, { status: 404 });+ await call("POST /connected_accounts/{nanoid}/revoke", `/connected_accounts/${keyAccount}/revoke`, { body: {}, status: 404 });+});++test("tools, tool execution and tool-router sessions match the spec", async () => {+ await call("GET /tools", "/tools?toolkit_slug=gmail&toolkit_versions=latest");+ await call("GET /tools", "/tools?toolkit_slug=asana&search=record&limit=50&toolkit_versions=latest");+ await call("GET /tools/{tool_slug}", "/tools/GMAIL_SEND_EMAIL?toolkit_versions=latest");+ await call("GET /tools/{tool_slug}", "/tools/NOPE?toolkit_versions=latest", { status: 404 });++ const oauthAccount = await connect("ac_gmail", "u_3");+ await call("POST /tools/execute/{tool_slug}", "/tools/execute/GMAIL_FETCH_EMAILS", {+ body: { arguments: {}, connected_account_id: oauthAccount, user_id: "u_3", version: "20250905_00" },+ });+ await call("POST /tools/execute/{tool_slug}", "/tools/execute/SLACK_SEND_MESSAGE", {+ body: { arguments: { query: "hi" }, user_id: "u_3" },+ });+ await call("POST /tools/execute/{tool_slug}", "/tools/execute/NOPE", { body: { arguments: {}, user_id: "u_3" }, status: 404 });++ await call("POST /tool_router/session", "/tool_router/session", {+ body: { user_id: "u_3", manage_connections: { enable: false } },+ });+});++// Runs last: node:test runs a file's top-level tests in order.+test("every operation the Go client calls was checked", () => {+ const missing = OPERATIONS.filter((op) => !checked.has(`${op} ${successStatus(spec, op)}`));+ assert.deepEqual(missing, [], "add a call for each operation to this test");+});++// The two shapes that hid MUL-9920's bugs, so the check itself cannot quietly+// stop catching them.+test("the check rejects the fields Composio does not return", async () => {+ const listSchema = responseSchema(spec, "GET /toolkits", 200);+ const detailSchema = responseSchema(spec, "GET /toolkits/{slug}", 200);+ const listed = await (await fetch(`${origin}${API_PREFIX}/toolkits`)).json();+ const details = await (await fetch(`${origin}${API_PREFIX}/toolkits/posthog`)).json();++ const topLevelCategories = structuredClone(listed);+ topLevelCategories.items[0].categories = ["Data & Analytics"];+ assert.match(check(spec, listSchema, topLevelCategories).join("\n"), /\$\.items\[0\]\.categories: is not in the spec/);++ for (const field of ["auth_schemes", "no_auth"]) {+ const withListFields = { ...details, [field]: field === "no_auth" ? false : ["api_key"] };+ assert.match(check(spec, detailSchema, withListFields).join("\n"), new RegExp(`\\$\\.${field}: is not in the spec`));+ }++ const { auth_config_details: _, ...withoutDetails } = details;+ assert.deepEqual(check(spec, detailSchema, withoutDetails), [], "auth_config_details is optional in the spec");+ const missingMeta = { ...details, meta: { ...details.meta, categories: undefined } };+ assert.match(check(spec, detailSchema, JSON.parse(JSON.stringify(missingMeta))).join("\n"), /\$\.meta: misses required field categories/);+});++test("fields mode skips required fields and the zero values of unset Go fields", () => {+ const schema = responseSchema(spec, "GET /toolkits/{slug}", 200);+ assert.deepEqual(check(spec, schema, { slug: "notion", auth_schemes: null, no_auth: false }, { fields: true }), []);+ assert.deepEqual(check(spec, schema, { slug: "notion", auth_schemes: ["oauth2"] }, { fields: true }), [+ "$.auth_schemes: is not in the spec",+ ]);+ assert.deepEqual(check(spec, schema, { slug: 1 }, { fields: true }), ["$.slug: is integer, the spec says string"]);+});diff --git a/server/internal/handler/integrations_composio_test.go b/server/internal/handler/integrations_composio_test.goindex 101d537d4b..35709bce73 100644--- a/server/internal/handler/integrations_composio_test.go+++ b/server/internal/handler/integrations_composio_test.go@@ -16,6 +16,7 @@ import (composio "github.com/multica-ai/multica/server/internal/integrations/composio""github.com/multica-ai/multica/server/internal/util"sdk "github.com/multica-ai/multica/server/pkg/composio"+ "github.com/multica-ai/multica/server/pkg/composio/composiotest"db "github.com/multica-ai/multica/server/pkg/db/generated")@@ -47,9 +48,9 @@ func (f *composioFakeSDK) ListConnectedAccounts(_ context.Context, req sdk.ListCid = req.ConnectedAccountIDs[0]}return &sdk.ListConnectedAccountsResponse{Items: []sdk.ConnectedAccount{{- ID: id,- UserID: composioTestUserID,- AuthConfigID: "ac_notion",+ ID: id,+ UserID: composioTestUserID,+ AuthConfig: sdk.AuthConfigRef{ID: "ac_notion"},}}}, nil}func (f *composioFakeSDK) RevokeConnection(_ context.Context, _ string) error { return f.revokeErr }@@ -81,6 +82,63 @@ func (f *composioFakeSDK) MCPAuthHeaders() map[string]string {return map[string]string{"x-api-key": "k"}}+// The handler fakes answer with fixed data; every field they set must be one+// Composio's spec defines for that endpoint.+func TestComposioFakesMatchSpec(t *testing.T) {+ ctx := context.Background()+ accounts := sdk.ListConnectedAccountsRequest{ConnectedAccountIDs: []string{"ca_1"}}+ apps := &appsFakeSDK{}+ team := &teamConnectSDK{}+ responses := map[string][]func() (any, error){+ "POST /connected_accounts/link": {+ func() (any, error) { return (&composioFakeSDK{}).CreateLink(ctx, sdk.CreateLinkRequest{}) },+ func() (any, error) { return (&composioCapturingSDK{}).CreateLink(ctx, sdk.CreateLinkRequest{}) },+ func() (any, error) { return team.CreateLink(ctx, sdk.CreateLinkRequest{}) },+ },+ "GET /connected_accounts": {+ func() (any, error) { return (&composioFakeSDK{}).ListConnectedAccounts(ctx, accounts) },+ func() (any, error) { return team.ListConnectedAccounts(ctx, accounts) },+ },+ "GET /auth_configs": {+ func() (any, error) { return (&composioFakeSDK{}).ListAuthConfigs(ctx, sdk.ListAuthConfigsRequest{}) },+ },+ "GET /toolkits": {+ func() (any, error) { return (&composioFakeSDK{}).ListToolkits(ctx, sdk.ListToolkitsRequest{}) },+ },+ "GET /toolkits/{slug}": {+ func() (any, error) { return apps.GetToolkit(ctx, "gmail") },+ },+ "GET /tools": {+ func() (any, error) { return apps.ListTools(ctx, sdk.ListToolsRequest{ToolkitSlug: "gmail"}) },+ },+ "GET /tools/{tool_slug}": {+ func() (any, error) { return apps.GetTool(ctx, "GMAIL_SEND_EMAIL") },+ },+ "POST /tools/execute/{tool_slug}": {+ func() (any, error) {+ return apps.ExecuteTool(ctx, "GMAIL_SEND_EMAIL", sdk.ExecuteToolRequest{UserID: "u", ConnectedAccountID: "ca_1"})+ },+ func() (any, error) {+ return (&appsFakeSDK{toolError: "boom"}).ExecuteTool(ctx, "GMAIL_SEND_EMAIL", sdk.ExecuteToolRequest{UserID: "u", ConnectedAccountID: "ca_1"})+ },+ },+ "POST /tool_router/session": {+ func() (any, error) { return (&composioFakeSDK{}).CreateSession(ctx, sdk.CreateSessionRequest{}) },+ },+ }+ for op, calls := range responses {+ for i, call := range calls {+ resp, err := call()+ if err != nil {+ t.Fatalf("%s #%d: %v", op, i, err)+ }+ if err := composiotest.CheckFields(op, resp); err != nil {+ t.Errorf("fake #%d: %v", i, err)+ }+ }+ }+}+type composioFakeStore struct {rows []db.UserComposioConnectionnextID bytediff --git a/server/internal/handler/team_app_feature_test.go b/server/internal/handler/team_app_feature_test.goindex 555f7f0813..12153b91e3 100644--- a/server/internal/handler/team_app_feature_test.go+++ b/server/internal/handler/team_app_feature_test.go@@ -132,7 +132,7 @@ func (f *teamConnectSDK) ListConnectedAccounts(_ context.Context, req sdk.ListCoid = req.ConnectedAccountIDs[0]}return &sdk.ListConnectedAccountsResponse{Items: []sdk.ConnectedAccount{{- ID: id, UserID: composio.TeamComposioUserID(parseUUID(testWorkspaceID)), AuthConfigID: "ac_notion",+ ID: id, UserID: composio.TeamComposioUserID(parseUUID(testWorkspaceID)), AuthConfig: sdk.AuthConfigRef{ID: "ac_notion"},}}}, nil}diff --git a/server/internal/integrations/composio/auth_config_test.go b/server/internal/integrations/composio/auth_config_test.goindex 5ca4350754..74fede39e2 100644--- a/server/internal/integrations/composio/auth_config_test.go+++ b/server/internal/integrations/composio/auth_config_test.go@@ -21,13 +21,23 @@ type catalogFakeSDK struct {}// GetToolkit answers like GET /toolkits/{slug}: schemes come only as-// auth_config_details, without auth_schemes or no_auth.+// auth_config_details, without auth_schemes or no_auth, and categories as+// {name, slug} rather than the list's {id, name}.func (f *catalogFakeSDK) GetToolkit(_ context.Context, slug string) (*sdk.Toolkit, error) {for _, listed := range f.toolkits {if listed.Slug != slug {continue}- tk := sdk.Toolkit{Slug: listed.Slug, Name: listed.Name, Meta: listed.Meta, ComposioManagedAuthSchemes: listed.ComposioManagedAuthSchemes}+ var meta map[string]any+ if listedCategories, ok := listed.Meta["categories"].([]any); ok {+ categories := make([]any, 0, len(listedCategories))+ for _, c := range listedCategories {+ category, _ := c.(map[string]any)+ categories = append(categories, map[string]any{"name": category["name"], "slug": category["id"]})+ }+ meta = map[string]any{"categories": categories}+ }+ tk := sdk.Toolkit{Slug: listed.Slug, Name: listed.Name, Meta: meta, ComposioManagedAuthSchemes: listed.ComposioManagedAuthSchemes}for _, scheme := range listed.AuthSchemes {detail := sdk.ToolkitAuthConfigDetail{Mode: strings.ToUpper(scheme)}if strings.EqualFold(f.projectFields[slug], scheme) {@@ -35,7 +45,7 @@ func (f *catalogFakeSDK) GetToolkit(_ context.Context, slug string) (*sdk.Toolki}tk.AuthConfigDetails = append(tk.AuthConfigDetails, detail)}- return &tk, nil+ return matchSpec(&f.fakeSDK, "GET /toolkits/{slug}", &tk), nil}return nil, &sdk.APIError{HTTPStatus: 404}}diff --git a/server/internal/integrations/composio/dispatch_test.go b/server/internal/integrations/composio/dispatch_test.goindex 45bec4b835..097dbe12e9 100644--- a/server/internal/integrations/composio/dispatch_test.go+++ b/server/internal/integrations/composio/dispatch_test.go@@ -12,6 +12,7 @@ import ("github.com/jackc/pgx/v5/pgtype""github.com/multica-ai/multica/server/internal/runtimeapps"sdk "github.com/multica-ai/multica/server/pkg/composio"+ "github.com/multica-ai/multica/server/pkg/composio/composiotest"db "github.com/multica-ai/multica/server/pkg/db/generated")@@ -319,10 +320,10 @@ func TestBuildTaskOverlay_CreateSessionWireContract(t *testing.T) {postedCh <- postedw.Header().Set("Content-Type", "application/json")w.WriteHeader(http.StatusCreated)- if err := json.NewEncoder(w).Encode(map[string]any{+ if err := json.NewEncoder(w).Encode(composiotest.Example(t, "POST /tool_router/session", map[string]any{"session_id": "trs_wire","mcp": map[string]any{"type": "http", "url": "https://mcp.example/session/wire"},- }); err != nil {+ })); err != nil {t.Errorf("write response: %v", err)}}))diff --git a/server/internal/integrations/composio/service.go b/server/internal/integrations/composio/service.goindex 928e6f2f5c..3a8486f70b 100644--- a/server/internal/integrations/composio/service.go+++ b/server/internal/integrations/composio/service.go@@ -669,7 +669,7 @@ func (s *Service) ListToolkits(ctx context.Context) ([]ToolkitView, error) {out = append(out, ToolkitView{Slug: tk.Slug,Name: tk.Name,- LogoURL: toolkitLogoURL(slug, tk.LogoURL),+ LogoURL: toolkitLogoURL(slug, tk.Logo()),Category: category.Name,CategoryID: category.ID,// Every surfaced toolkit is connectable by construction. The@@ -831,11 +831,7 @@ func (s *Service) verifyAccountOwnership(ctx context.Context, connectedAccountID// config the connect link used. An empty expected value (state missing it,// or a resolver gap) is rejected rather than skipped — skipping is the// fail-open hole that let a cross-toolkit account id be bound here.- accountAuthConfigID := acct.AuthConfigID- if accountAuthConfigID == "" {- accountAuthConfigID = acct.AuthConfig.ID- }- if expectedAuthConfigID == "" || accountAuthConfigID != expectedAuthConfigID {+ if expectedAuthConfigID == "" || acct.AuthConfig.ID != expectedAuthConfigID {return ErrAccountVerification}return nildiff --git a/server/internal/integrations/composio/service_test.go b/server/internal/integrations/composio/service_test.goindex 64151acabc..5a379bb6bc 100644--- a/server/internal/integrations/composio/service_test.go+++ b/server/internal/integrations/composio/service_test.go@@ -13,12 +13,15 @@ import ("github.com/jackc/pgx/v5/pgtype""github.com/multica-ai/multica/server/internal/util"sdk "github.com/multica-ai/multica/server/pkg/composio"+ "github.com/multica-ai/multica/server/pkg/composio/composiotest"db "github.com/multica-ai/multica/server/pkg/db/generated")// ---- fakes ---------------------------------------------------------------type fakeSDK struct {+ // t is the test newTestService bound the fake to; matchSpec reports to it.+ t testing.TBcreateLinkResp *sdk.CreateLinkResponsecreateLinkErr errorlastCreateLink sdk.CreateLinkRequest@@ -34,12 +37,11 @@ type fakeSDK struct {// ListConnectedAccounts echoes the requested id with acctUserID /// acctAuthConfigID so success-path tests can opt in to a matching account;// acctMissing returns no items, listAccountsErr forces a transport error.- acctUserID string- acctAuthConfigID string- acctNestedAuthConfigID string- acctMissing bool- listAccountsErr error- lastListAccounts sdk.ListConnectedAccountsRequest+ acctUserID string+ acctAuthConfigID string+ acctMissing bool+ listAccountsErr error+ lastListAccounts sdk.ListConnectedAccountsRequest// auth-config resolution (BeginConnect / ListToolkits connectable flag).// authConfigs nil => a default single notion→ac_notion ENABLED config so// existing connect tests keep resolving; set explicitly to override.@@ -51,15 +53,30 @@ type fakeSDK struct {listToolkitsErr error}+func (f *fakeSDK) bindTest(t testing.TB) { f.t = t }++// matchSpec returns v after failing the test if it sets a field Composio's+// spec does not define for op, or gives one the wrong type.+func matchSpec[T any](f *fakeSDK, op string, v T) T {+ if err := composiotest.CheckFields(op, v); err != nil {+ if f.t == nil {+ panic(err)+ }+ f.t.Error(err)+ }+ return v+}+func (f *fakeSDK) CreateLink(_ context.Context, req sdk.CreateLinkRequest) (*sdk.CreateLinkResponse, error) {f.lastCreateLink = reqif f.createLinkErr != nil {return nil, f.createLinkErr}- if f.createLinkResp != nil {- return f.createLinkResp, nil+ resp := f.createLinkResp+ if resp == nil {+ resp = &sdk.CreateLinkResponse{RedirectURL: "https://composio.example/redirect", ConnectedAccountID: "ca_pending"}}- return &sdk.CreateLinkResponse{RedirectURL: "https://composio.example/redirect", ConnectedAccountID: "ca_pending"}, nil+ return matchSpec(f, "POST /connected_accounts/link", resp), nil}func (f *fakeSDK) ListConnectedAccounts(_ context.Context, req sdk.ListConnectedAccountsRequest) (*sdk.ListConnectedAccountsResponse, error) {@@ -74,12 +91,11 @@ func (f *fakeSDK) ListConnectedAccounts(_ context.Context, req sdk.ListConnectedif len(req.ConnectedAccountIDs) > 0 {id = req.ConnectedAccountIDs[0]}- return &sdk.ListConnectedAccountsResponse{Items: []sdk.ConnectedAccount{{- ID: id,- UserID: f.acctUserID,- AuthConfigID: f.acctAuthConfigID,- AuthConfig: sdk.AuthConfigRef{ID: f.acctNestedAuthConfigID},- }}}, nil+ return matchSpec(f, "GET /connected_accounts", &sdk.ListConnectedAccountsResponse{Items: []sdk.ConnectedAccount{{+ ID: id,+ UserID: f.acctUserID,+ AuthConfig: sdk.AuthConfigRef{ID: f.acctAuthConfigID},+ }}}), nil}func (f *fakeSDK) ListAuthConfigs(_ context.Context, _ sdk.ListAuthConfigsRequest) (*sdk.ListAuthConfigsResponse, error) {@@ -95,14 +111,14 @@ func (f *fakeSDK) ListAuthConfigs(_ context.Context, _ sdk.ListAuthConfigsRequesIsComposioManaged: true,}}}- return &sdk.ListAuthConfigsResponse{Items: items}, nil+ return matchSpec(f, "GET /auth_configs", &sdk.ListAuthConfigsResponse{Items: items}), nil}func (f *fakeSDK) ListToolkits(_ context.Context, _ sdk.ListToolkitsRequest) (*sdk.ListToolkitsResponse, error) {if f.listToolkitsErr != nil {return nil, f.listToolkitsErr}- return &sdk.ListToolkitsResponse{Items: f.toolkits}, nil+ return matchSpec(f, "GET /toolkits", &sdk.ListToolkitsResponse{Items: f.toolkits}), nil}func (f *fakeSDK) RevokeConnection(_ context.Context, id string) error {@@ -121,10 +137,11 @@ func (f *fakeSDK) CreateSession(_ context.Context, req sdk.CreateSessionRequest)if f.createSessErr != nil {return nil, f.createSessErr}- if f.createSessResp != nil {- return f.createSessResp, nil+ resp := f.createSessResp+ if resp == nil {+ resp = &sdk.CreateSessionResponse{MCP: sdk.MCPDescriptor{URL: "https://mcp.example/session"}}}- return &sdk.CreateSessionResponse{MCP: sdk.MCPDescriptor{URL: "https://mcp.example/session"}}, nil+ return matchSpec(f, "POST /tool_router/session", resp), nil}func (f *fakeSDK) MCPAuthHeaders() map[string]string {@@ -215,6 +232,9 @@ func mintUUID(n byte) pgtype.UUID {func newTestService(t *testing.T, client SDK, store Store) *Service {t.Helper()+ if fake, ok := client.(interface{ bindTest(testing.TB) }); ok {+ fake.bindTest(t)+ }svc, err := NewService(client, store, Config{StateSecret: testSecret,CallbackBaseURL: "https://multica.ai",@@ -335,8 +355,10 @@ func TestListToolkits_FiltersToConnectable(t *testing.T) {{ID: "ac_slack", Toolkit: sdk.Toolkit{Slug: "slack"}, Status: "ENABLED"},},toolkits: []sdk.Toolkit{- {Slug: "github", Name: "GitHub", LogoURL: "https://logo/gh", Categories: []string{"dev"}},- {Slug: "notion", Name: "Notion", LogoURL: "https://logo/notion", Categories: []string{"productivity"}},+ {Slug: "github", Name: "GitHub", Meta: map[string]any{"logo": "https://logo/gh",+ "categories": []any{map[string]any{"id": "developer-tools", "name": "Developer Tools"}}}},+ {Slug: "notion", Name: "Notion", Meta: map[string]any{"logo": "https://logo/notion",+ "categories": []any{map[string]any{"id": "productivity", "name": "Productivity"}}}},{Slug: "slack", Name: "Slack"},},}@@ -363,7 +385,7 @@ func TestListToolkits_FiltersToConnectable(t *testing.T) {if !ok {t.Fatalf("expected notion in results: %+v", tks)}- if notion.Name != "Notion" || notion.LogoURL != "https://logo/notion" || notion.Category != "productivity" {+ if notion.Name != "Notion" || notion.LogoURL != "https://logo/notion" || notion.Category != "Productivity" || notion.CategoryID != "productivity" {t.Errorf("notion fields not mapped: %+v", notion)}// slack carried no upstream logo, so the composio default logo URL is derived.@@ -431,29 +453,6 @@ func TestCompleteCallback_SuccessAndIdempotent(t *testing.T) {}}-func TestCompleteCallback_AcceptsNestedAuthConfig(t *testing.T) {- t.Parallel()- store := newFakeStore()- userID := mintUUID(30)- // Composio v3.1 returns connected-account auth config under auth_config.id,- // not always as a top-level auth_config_id.- sdkFake := &fakeSDK{acctUserID: util.UUIDToString(userID), acctNestedAuthConfigID: "ac_notion"}- svc := newTestService(t, sdkFake, store)- state, _ := signState(testSecret, stateClaims{- UserID: util.UUIDToString(userID),- ToolkitSlug: "notion",- AuthConfigID: "ac_notion",- Exp: time.Unix(1_700_000_000, 0).Add(time.Minute).Unix(),- })-- if _, err := svc.CompleteCallback(context.Background(), state, "success", "ca_nested"); err != nil {- t.Fatalf("CompleteCallback: %v", err)- }- if len(store.rows) != 1 {- t.Fatalf("expected 1 row, got %d", len(store.rows))- }-}-func TestCompleteCallback_NonSuccessNoRow(t *testing.T) {t.Parallel()store := newFakeStore()diff --git a/server/internal/integrations/composio/team_test.go b/server/internal/integrations/composio/team_test.goindex 8fcc779934..47c7826ff7 100644--- a/server/internal/integrations/composio/team_test.go+++ b/server/internal/integrations/composio/team_test.go@@ -11,6 +11,7 @@ import ("time"sdk "github.com/multica-ai/multica/server/pkg/composio"+ "github.com/multica-ai/multica/server/pkg/composio/composiotest")func TestExecuteTool_ConnectedAccountIdentityOnWire(t *testing.T) {@@ -46,7 +47,11 @@ func TestExecuteTool_ConnectedAccountIdentityOnWire(t *testing.T) {t.Errorf("tool inputs changed: %+v", wire)}w.Header().Set("Content-Type", "application/json")- _, _ = w.Write([]byte(`{"successful":true,"data":{"messages":[]}}`))+ if err := json.NewEncoder(w).Encode(composiotest.Example(t, "POST /tools/execute/{tool_slug}", map[string]any{+ "successful": true, "data": map[string]any{"messages": []any{}},+ })); err != nil {+ t.Error(err)+ }}))defer srv.Close()client, err := sdk.NewClient(sdk.Options{APIKey: "test-key", BaseURL: srv.URL, Timeout: time.Second})diff --git a/server/pkg/composio/README.md b/server/pkg/composio/README.mdindex c928bb9ea4..855d96037b 100644--- a/server/pkg/composio/README.md+++ b/server/pkg/composio/README.md@@ -129,6 +129,21 @@ go test ./server/pkg/composio/...Current coverage: **82.2 %**.+Test servers and fake SDKs never hand-write Composio responses. `composiotest`+embeds the response schemas of every endpoint this package calls, snapshotted+from Composio's v3.1 OpenAPI spec into `composiotest/openapi-v3.1.json`:++- `composiotest.Example(t, op, overlay)` builds a response body from the+ spec's own example with the test's values merged in, and fails if the result+ leaves the spec.+- `composiotest.CheckFields(op, v)` fails when a value a fake SDK returns sets a+ field that endpoint does not have.++`scripts/fake-composio.test.mjs` holds `scripts/fake-composio.mjs` to the same+snapshot. When a new endpoint is called, add it to `OPERATIONS` in+`scripts/composio-spec.mjs`; to pick up Composio's latest spec, run+`node scripts/composio-spec.mjs update` and review the diff.+## Design notes- **Standalone.** Zero coupling to Multica internals — depend on this packagediff --git a/server/pkg/composio/client_test.go b/server/pkg/composio/client_test.goindex 23b92ff635..35c7f3e0ac 100644--- a/server/pkg/composio/client_test.go+++ b/server/pkg/composio/client_test.go@@ -14,6 +14,7 @@ import ("time""github.com/multica-ai/multica/server/pkg/composio"+ "github.com/multica-ai/multica/server/pkg/composio/composiotest")// newTestServer wires up a httptest.Server with the provided handler and@@ -160,12 +161,12 @@ func TestCreateLink_Success(t *testing.T) {if body.AuthConfigID != "ac_abc" || body.UserID != "u_1" {t.Errorf("unexpected body: %+v", body)}- writeJSON(t, w, http.StatusCreated, map[string]any{+ writeJSON(t, w, http.StatusCreated, composiotest.Example(t, "POST /connected_accounts/link", map[string]any{"link_token": "ltok_xyz","redirect_url": "https://connect.composio.dev/ln_xyz","expires_at": "2026-12-31T00:00:00Z","connected_account_id": "ca_pending",- })+ }))})resp, err := c.CreateLink(context.Background(), composio.CreateLinkRequest{AuthConfigID: "ac_abc",@@ -194,14 +195,15 @@ func TestCreateLink_ValidatesInputs(t *testing.T) {func TestCreateLink_APIError(t *testing.T) {c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {- writeJSON(t, w, http.StatusBadRequest, map[string]any{+ writeJSON(t, w, http.StatusBadRequest, composiotest.Response(t, "POST /connected_accounts/link", http.StatusBadRequest, map[string]any{"error": map[string]any{"message": "bad input","code": 400,"slug": "INVALID_INPUT",+ "status": 400,"request_id": "req_1",},- })+ }))})_, err := c.CreateLink(context.Background(), composio.CreateLinkRequest{AuthConfigID: "ac", UserID: "u",@@ -226,13 +228,13 @@ func TestListConnectedAccounts_QueryString(t *testing.T) {var seen *http.Requestc, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {seen = r- writeJSON(t, w, http.StatusOK, map[string]any{- "items": []map[string]any{- {"id": "ca_1", "user_id": "u_1", "status": "ACTIVE",+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /connected_accounts", map[string]any{+ "items": []any{+ map[string]any{"id": "ca_1", "user_id": "u_1", "status": "ACTIVE","toolkit": map[string]any{"slug": "notion"}},},"next_cursor": "cur_2",- })+ }))})resp, err := c.ListConnectedAccounts(context.Background(), composio.ListConnectedAccountsRequest{UserIDs: []string{"u_1", "u_2"},@@ -289,45 +291,33 @@ func TestListConnectedAccounts_QueryString(t *testing.T) {}}-func TestListConnectedAccounts_ParsesNestedAuthConfig(t *testing.T) {+func TestListConnectedAccounts_ParsesAuthConfig(t *testing.T) {c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {- writeJSON(t, w, http.StatusOK, map[string]any{- "items": []map[string]any{- {- "id": "ca_nested",- "user_id": "u_1",- "auth_config": map[string]any{- "id": "ac_nested",- "auth_scheme": "OAUTH2",- "is_composio_managed": true,- },- "toolkit": map[string]any{"slug": "notion"},- "status": "ACTIVE",+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /connected_accounts", map[string]any{+ "items": []any{map[string]any{+ "id": "ca_1",+ "user_id": "u_1",+ "auth_config": map[string]any{+ "id": "ac_1",+ "auth_scheme": "OAUTH2",+ "is_composio_managed": true,},- {- "id": "ca_top_level",- "user_id": "u_1",- "auth_config_id": "ac_top_level",- "auth_config": map[string]any{"id": "ac_nested_ignored"},- "toolkit": map[string]any{"slug": "gmail"},- "status": "ACTIVE",- },- },- })+ "toolkit": map[string]any{"slug": "notion"},+ "status": "ACTIVE",+ }},+ }))})resp, err := c.ListConnectedAccounts(context.Background(), composio.ListConnectedAccountsRequest{})if err != nil {t.Fatalf("ListConnectedAccounts: %v", err)}- if got := resp.Items[0].AuthConfig.ID; got != "ac_nested" {- t.Errorf("nested auth config id = %q, want ac_nested", got)+ got := resp.Items[0]+ if got.AuthConfig.ID != "ac_1" || got.AuthConfig.AuthScheme != "OAUTH2" || !got.AuthConfig.IsComposioManaged {+ t.Errorf("auth config = %+v", got.AuthConfig)}- if got := resp.Items[0].AuthConfig.AuthScheme; got != "OAUTH2" {- t.Errorf("nested auth scheme = %q, want OAUTH2", got)- }- if got := resp.Items[1].AuthConfigID; got != "ac_top_level" {- t.Errorf("top-level auth config id = %q, want ac_top_level", got)+ if got.ID != "ca_1" || got.UserID != "u_1" || got.Toolkit.Slug != "notion" || got.Status != "ACTIVE" {+ t.Errorf("account = %+v", got)}}@@ -336,7 +326,7 @@ func TestRevokeConnection_Success(t *testing.T) {if r.Method != http.MethodPost || r.URL.Path != "/connected_accounts/ca_42/revoke" {t.Errorf("unexpected request: %s %s", r.Method, r.URL.Path)}- w.WriteHeader(http.StatusNoContent)+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "POST /connected_accounts/{nanoid}/revoke", nil))})if err := c.RevokeConnection(context.Background(), "ca_42"); err != nil {t.Errorf("RevokeConnection: %v", err)@@ -357,9 +347,9 @@ func TestDeleteConnectedAccount_IdempotentOn404(t *testing.T) {if r.Method != http.MethodDelete {t.Errorf("method = %s", r.Method)}- writeJSON(t, w, http.StatusNotFound, map[string]any{- "error": map[string]any{"message": "not found", "status": 404, "slug": "NOT_FOUND"},- })+ writeJSON(t, w, http.StatusNotFound, composiotest.Response(t, "DELETE /connected_accounts/{nanoid}", http.StatusNotFound, map[string]any{+ "error": map[string]any{"message": "not found", "code": 404, "status": 404, "slug": "NOT_FOUND"},+ }))})if err := c.DeleteConnectedAccount(context.Background(), "ca_gone"); err != nil {t.Errorf("expected nil on 404, got %v", err)@@ -368,9 +358,9 @@ func TestDeleteConnectedAccount_IdempotentOn404(t *testing.T) {func TestDeleteConnectedAccount_PropagatesOtherErrors(t *testing.T) {c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {- writeJSON(t, w, http.StatusInternalServerError, map[string]any{- "error": map[string]any{"message": "boom", "status": 500, "slug": "INTERNAL"},- })+ writeJSON(t, w, http.StatusInternalServerError, composiotest.Response(t, "DELETE /connected_accounts/{nanoid}", http.StatusInternalServerError, map[string]any{+ "error": map[string]any{"message": "boom", "code": 500, "status": 500, "slug": "INTERNAL"},+ }))})err := c.DeleteConnectedAccount(context.Background(), "ca_1")if err == nil {@@ -399,10 +389,10 @@ func TestCreateSession_Success(t *testing.T) {if body.ManageConnections == nil || body.ManageConnections.CallbackURL != "https://cb" {t.Errorf("manage_connections = %+v", body.ManageConnections)}- writeJSON(t, w, http.StatusCreated, map[string]any{+ writeJSON(t, w, http.StatusCreated, composiotest.Example(t, "POST /tool_router/session", map[string]any{"session_id": "trs_1","mcp": map[string]any{"type": "http", "url": "https://mcp.example/trs_1"},- })+ }))})enable := trueresp, err := c.CreateSession(context.Background(), composio.CreateSessionRequest{@@ -442,12 +432,12 @@ func TestListToolkits_Success(t *testing.T) {if r.URL.Path != "/toolkits" || r.URL.Query().Get("category") != "productivity" {t.Errorf("unexpected request: %s ?%s", r.URL.Path, r.URL.RawQuery)}- writeJSON(t, w, http.StatusOK, map[string]any{- "items": []map[string]any{- {"slug": "notion", "name": "Notion"},- {"slug": "slack", "name": "Slack"},+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /toolkits", map[string]any{+ "items": []any{+ map[string]any{"slug": "notion", "name": "Notion"},+ map[string]any{"slug": "slack", "name": "Slack"},},- })+ }))})resp, err := c.ListToolkits(context.Background(), composio.ListToolkitsRequest{Category: "productivity"})if err != nil {@@ -458,26 +448,48 @@ func TestListToolkits_Success(t *testing.T) {}}-func TestToolkitPrimaryCategory(t *testing.T) {- var listed composio.ListToolkitsResponse- raw := `{"items":[- {"slug":"github","meta":{"categories":[{"id":"developer-tools","name":"Developer Tools"},{"id":"productivity","name":"Productivity"}]}},- {"slug":"legacy","categories":["email"],"meta":{"categories":[{"id":"ignored","name":"Ignored"}]}},- {"slug":"bare"}- ]}`- if err := json.Unmarshal([]byte(raw), &listed); err != nil {- t.Fatalf("unmarshal: %v", err)+// decode round-trips a response body through JSON into out, the way the+// client reads it.+func decode(t *testing.T, body map[string]any, out any) {+ t.Helper()+ raw, err := json.Marshal(body)+ if err != nil {+ t.Fatalf("marshal: %v", err)}- want := []composio.ToolkitCategory{- {ID: "developer-tools", Name: "Developer Tools"},- {Name: "email"},- {},+ if err := json.Unmarshal(raw, out); err != nil {+ t.Fatalf("unmarshal: %v", err)}+}++func TestToolkitPrimaryCategoryAndLogo(t *testing.T) {+ var listed composio.ListToolkitsResponse+ decode(t, composiotest.Example(t, "GET /toolkits", map[string]any{"items": []any{+ map[string]any{"slug": "github", "meta": map[string]any{+ "logo": "https://logos.composio.dev/api/github",+ "categories": []any{+ map[string]any{"id": "developer-tools", "name": "Developer Tools"},+ map[string]any{"id": "productivity", "name": "Productivity"},+ },+ }},+ map[string]any{"slug": "bare", "meta": map[string]any{"categories": []any{}}},+ }}), &listed)+ want := []composio.ToolkitCategory{{ID: "developer-tools", Name: "Developer Tools"}, {}}for i, tk := range listed.Items {if got := tk.PrimaryCategory(); got != want[i] {t.Errorf("%s: PrimaryCategory = %+v, want %+v", tk.Slug, got, want[i])}}+ if got := listed.Items[0].Logo(); got != "https://logos.composio.dev/api/github" {+ t.Errorf("Logo = %q, want the meta logo", got)+ }++ var configs composio.ListAuthConfigsResponse+ decode(t, composiotest.Example(t, "GET /auth_configs", map[string]any{"items": []any{+ map[string]any{"toolkit": map[string]any{"slug": "github", "logo": "https://logo/gh"}},+ }}), &configs)+ if got := configs.Items[0].Toolkit.Logo(); got != "https://logo/gh" {+ t.Errorf("nested toolkit Logo = %q", got)+ }}// GET /toolkits/{slug} reports auth schemes only as auth_config_details.@@ -486,23 +498,31 @@ func TestGetToolkit_AuthModesFromDetails(t *testing.T) {if r.URL.Path != "/toolkits/openai" {t.Errorf("unexpected request: %s %s", r.Method, r.URL.Path)}- w.Header().Set("Content-Type", "application/json")- _, _ = w.Write([]byte(`{- "slug": "openai", "name": "OpenAI", "composio_managed_auth_schemes": [],- "meta": {"categories": [{"id": "ai-machine-learning", "name": "AI & Machine Learning"}]},- "auth_config_details": [- {"mode": "API_KEY", "name": "openai_api_key", "fields": {- "auth_config_creation": {"required": [], "optional": []},- "connected_account_initiation": {"required": [{"name": "generic_api_key", "displayName": "API Key", "type": "string", "required": true, "default": null}], "optional": []}+ noFields := map[string]any{"required": []any{}, "optional": []any{}}+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /toolkits/{slug}", map[string]any{+ "slug": "openai", "name": "OpenAI", "composio_managed_auth_schemes": []any{},+ "auth_config_details": []any{+ map[string]any{"mode": "API_KEY", "fields": map[string]any{+ "auth_config_creation": noFields,+ "connected_account_initiation": map[string]any{+ "required": []any{map[string]any{"name": "generic_api_key", "default": nil}},+ "optional": []any{},+ },}},- {"mode": "BASIC", "fields": {- "auth_config_creation": {"required": [{"name": "subdomain", "type": "string", "required": true, "default": null}]}+ map[string]any{"mode": "BASIC", "fields": map[string]any{+ "auth_config_creation": map[string]any{+ "required": []any{map[string]any{"name": "subdomain", "default": nil}},+ "optional": []any{},+ },}},- {"mode": "BEARER_TOKEN", "fields": {- "auth_config_creation": {"required": [{"name": "region", "type": "string", "required": true, "default": "us"}]}- }}- ]- }`))+ map[string]any{"mode": "BEARER_TOKEN", "fields": map[string]any{+ "auth_config_creation": map[string]any{+ "required": []any{map[string]any{"name": "region", "default": "us"}},+ "optional": []any{},+ },+ }},+ },+ }))})tk, err := c.GetToolkit(context.Background(), "openai")if err != nil {@@ -541,7 +561,9 @@ func TestCreateCustomAuthConfig_Body(t *testing.T) {if !reflect.DeepEqual(body, want) {t.Errorf("body = %#v, want %#v", body, want)}- writeJSON(t, w, http.StatusCreated, map[string]any{"auth_config": map[string]any{"id": "ac_tavily"}})+ writeJSON(t, w, http.StatusCreated, composiotest.Example(t, "POST /auth_configs", map[string]any{+ "auth_config": map[string]any{"id": "ac_tavily", "auth_scheme": "API_KEY", "is_composio_managed": false},+ }))})id, err := c.CreateCustomAuthConfig(context.Background(), "tavily", "api_key", "Tavily")if err != nil || id != "ac_tavily" {@@ -554,7 +576,7 @@ func TestGetToolkit_Success(t *testing.T) {if r.URL.Path != "/toolkits/notion" {t.Errorf("path = %s", r.URL.Path)}- writeJSON(t, w, http.StatusOK, map[string]any{"slug": "notion", "name": "Notion"})+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /toolkits/{slug}", map[string]any{"slug": "notion", "name": "Notion"}))})tk, err := c.GetToolkit(context.Background(), "notion")if err != nil {@@ -565,6 +587,60 @@ func TestGetToolkit_Success(t *testing.T) {}}+func TestListAuthConfigs_Parses(t *testing.T) {+ c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {+ if r.URL.Path != "/auth_configs" || r.URL.Query().Get("toolkit_slug") != "notion,slack" {+ t.Errorf("unexpected request: %s ?%s", r.URL.Path, r.URL.RawQuery)+ }+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /auth_configs", map[string]any{"items": []any{+ map[string]any{"id": "ac_1", "toolkit": map[string]any{"slug": "notion"}, "auth_scheme": "API_KEY", "is_composio_managed": false, "status": "ENABLED"},+ }}))+ })+ resp, err := c.ListAuthConfigs(context.Background(), composio.ListAuthConfigsRequest{ToolkitSlugs: []string{"notion", "slack"}})+ if err != nil {+ t.Fatalf("ListAuthConfigs: %v", err)+ }+ got := resp.Items[0]+ if got.ID != "ac_1" || got.Toolkit.Slug != "notion" || got.AuthScheme != "API_KEY" || got.IsComposioManaged || got.Status != "ENABLED" {+ t.Errorf("auth config = %+v", got)+ }+}++func TestListToolsAndGetTool_Parse(t *testing.T) {+ tool := map[string]any{+ "slug": "GMAIL_SEND_EMAIL", "name": "Send email", "version": "20250905_00", "tags": []any{"send"},+ "toolkit": map[string]any{"slug": "gmail", "name": "Gmail"},+ "input_parameters": map[string]any{"type": "object"},+ }+ c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {+ if r.URL.Query().Get("toolkit_versions") != "latest" {+ t.Errorf("toolkit_versions = %q", r.URL.Query().Get("toolkit_versions"))+ }+ switch r.URL.Path {+ case "/tools":+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /tools", map[string]any{"items": []any{tool}}))+ case "/tools/GMAIL_SEND_EMAIL":+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "GET /tools/{tool_slug}", tool))+ default:+ t.Errorf("unexpected request: %s", r.URL.Path)+ }+ })+ listed, err := c.ListTools(context.Background(), composio.ListToolsRequest{ToolkitSlug: "gmail"})+ if err != nil {+ t.Fatalf("ListTools: %v", err)+ }+ single, err := c.GetTool(context.Background(), "GMAIL_SEND_EMAIL")+ if err != nil {+ t.Fatalf("GetTool: %v", err)+ }+ for _, got := range []composio.Tool{listed.Items[0], *single} {+ if got.Slug != "GMAIL_SEND_EMAIL" || got.Toolkit.Slug != "gmail" || got.Version != "20250905_00" ||+ !reflect.DeepEqual(got.Tags, []string{"send"}) || got.InputParameters["type"] != "object" || got.IsDeprecated {+ t.Errorf("tool = %+v", got)+ }+ }+}+func TestGetToolkit_RequiresSlug(t *testing.T) {c, _ := newTestServer(t, func(w http.ResponseWriter, r *http.Request) {t.Error("server should not be hit")@@ -602,11 +678,11 @@ func TestExecuteTool_Success(t *testing.T) {if args["title"] != "hi" {t.Errorf("arguments.title = %v", args["title"])}- writeJSON(t, w, http.StatusOK, map[string]any{+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "POST /tools/execute/{tool_slug}", map[string]any{"successful": true,"data": map[string]any{"issue_number": float64(42)},"log_id": "log_1",- })+ }))})resp, err := c.ExecuteTool(context.Background(), "GITHUB_CREATE_ISSUE", composio.ExecuteToolRequest{UserID: "u_1",@@ -641,7 +717,7 @@ func TestExecuteTool_ArgumentsOnWire(t *testing.T) {if got := string(wire["arguments"]); got != tt.want {t.Errorf("arguments on wire = %q, want %s; body = %s", got, tt.want, wire)}- writeJSON(t, w, http.StatusOK, map[string]any{"successful": true})+ writeJSON(t, w, http.StatusOK, composiotest.Example(t, "POST /tools/execute/{tool_slug}", map[string]any{"successful": true}))})resp, err := c.ExecuteTool(context.Background(), "GOOGLE_ANALYTICS_LIST_ACCOUNT_SUMMARIES", composio.ExecuteToolRequest{Arguments: tt.args,diff --git a/server/pkg/composio/composiotest/composiotest.go b/server/pkg/composio/composiotest/composiotest.gonew file mode 100644index 0000000000..0382b2a338--- /dev/null+++ b/server/pkg/composio/composiotest/composiotest.go@@ -0,0 +1,449 @@+// Package composiotest checks values against the part of Composio's v3.1+// OpenAPI spec that package composio calls, and builds responses from it, so+// tests and fakes cannot drift from what Composio returns.+//+// openapi-v3.1.json is a snapshot shared with scripts/fake-composio.test.mjs.+// Refresh it with `node scripts/composio-spec.mjs update`; a new endpoint goes+// into OPERATIONS in that script first.+package composiotest++import (+ _ "embed"+ "encoding/json"+ "fmt"+ "math"+ "reflect"+ "slices"+ "strconv"+ "strings"+ "sync"+ "testing"+)++//go:embed openapi-v3.1.json+var snapshot []byte++const apiPrefix = "/api/v3.1"++type document struct {+ Paths map[string]map[string]operation `json:"paths"`+ Components struct {+ Schemas map[string]any `json:"schemas"`+ } `json:"components"`+}++type operation struct {+ Responses map[string]struct {+ Content map[string]struct {+ Schema any `json:"schema"`+ } `json:"content"`+ } `json:"responses"`+}++var spec = sync.OnceValue(func() document {+ var doc document+ if err := json.Unmarshal(snapshot, &doc); err != nil {+ panic(fmt.Sprintf("composiotest: openapi-v3.1.json: %v", err))+ }+ return doc+})++func lookup(op string) (operation, error) {+ method, path, ok := strings.Cut(op, " ")+ if !ok {+ return operation{}, fmt.Errorf("composiotest: operation %q is not \"METHOD /path\"", op)+ }+ o, ok := spec().Paths[apiPrefix+path][strings.ToLower(method)]+ if !ok {+ return operation{}, fmt.Errorf("composiotest: %s is not in the snapshot; add it to OPERATIONS in scripts/composio-spec.mjs", op)+ }+ return o, nil+}++func responseSchema(op string, status int) (any, error) {+ o, err := lookup(op)+ if err != nil {+ return nil, err+ }+ schema := o.Responses[strconv.Itoa(status)].Content["application/json"].Schema+ if schema == nil {+ return nil, fmt.Errorf("composiotest: the spec declares no %d response for %s", status, op)+ }+ return schema, nil+}++// Operations lists the operations in the snapshot, sorted.+func Operations() []string {+ var ops []string+ for path, methods := range spec().Paths {+ for method := range methods {+ ops = append(ops, strings.ToUpper(method)+" "+strings.TrimPrefix(path, apiPrefix))+ }+ }+ slices.Sort(ops)+ return ops+}++// SuccessStatus returns the 2xx status op answers with.+func SuccessStatus(op string) (int, error) {+ o, err := lookup(op)+ if err != nil {+ return 0, err+ }+ for status := range o.Responses {+ if strings.HasPrefix(status, "2") {+ return strconv.Atoi(status)+ }+ }+ return 0, fmt.Errorf("composiotest: %s has no 2xx response", op)+}++// Check reports where body departs from the schema of op's response with the+// given status: a field the spec does not define, a missing required field, a+// wrong type, or a value outside an enum. op is "METHOD /path" with the path+// as the spec names it under /api/v3.1, e.g. "GET /toolkits/{slug}". body is+// JSON bytes or a value that marshals to JSON.+//+// An object schema with properties and no additionalProperties is closed:+// Composio's spec spells out an open object as additionalProperties:+// {nullable: true}. oneOf is checked like anyOf.+func Check(op string, status int, body any) error {+ return check(op, status, body, false)+}++// CheckFields is Check for a Go value an SDK fake returns from op: every field+// it sets must be one the spec defines, with the spec's type. Required fields+// are not enforced and zero values are skipped, since an unset field marshals+// to one.+func CheckFields(op string, body any) error {+ status, err := SuccessStatus(op)+ if err != nil {+ return err+ }+ return check(op, status, body, true)+}++func check(op string, status int, body any, fields bool) error {+ schema, err := responseSchema(op, status)+ if err != nil {+ return err+ }+ value, err := toJSONValue(body)+ if err != nil {+ return fmt.Errorf("composiotest: %s %d: %w", op, status, err)+ }+ c := checker{schemas: spec().Components.Schemas, fields: fields}+ var problems []string+ c.visit(schema, value, "$", &problems)+ if len(problems) > 0 {+ return fmt.Errorf("%s %d does not match the Composio spec:\n %s", op, status, strings.Join(problems, "\n "))+ }+ return nil+}++func toJSONValue(body any) (any, error) {+ raw, ok := body.([]byte)+ if r, isRaw := body.(json.RawMessage); isRaw {+ raw, ok = r, true+ }+ if !ok {+ var err error+ if raw, err = json.Marshal(body); err != nil {+ return nil, err+ }+ }+ var value any+ if err := json.Unmarshal(raw, &value); err != nil {+ return nil, err+ }+ return value, nil+}++type checker struct {+ schemas map[string]any+ fields bool+}++func (c checker) resolve(schema any) map[string]any {+ m, _ := schema.(map[string]any)+ for m != nil {+ ref, ok := m["$ref"].(string)+ if !ok {+ break+ }+ m, _ = c.schemas[strings.TrimPrefix(ref, "#/components/schemas/")].(map[string]any)+ }+ return m+}++func typeOf(v any) string {+ switch v := v.(type) {+ case nil:+ return "null"+ case bool:+ return "boolean"+ case float64:+ if v == math.Trunc(v) {+ return "integer"+ }+ return "number"+ case string:+ return "string"+ case []any:+ return "array"+ default:+ return "object"+ }+}++func isZero(v any) bool {+ switch v := v.(type) {+ case nil:+ return true+ case bool:+ return !v+ case float64:+ return v == 0+ case string:+ return v == ""+ case []any:+ return len(v) == 0+ case map[string]any:+ return len(v) == 0+ }+ return false+}++func (c checker) visit(rawSchema, v any, at string, out *[]string) {+ s := c.resolve(rawSchema)+ if s == nil {+ return+ }+ _, hasType := s["type"]+ _, hasProps := s["properties"]+ _, hasItems := s["items"]+ _, hasEnum := s["enum"]+ if v == nil {+ if nullable, _ := s["nullable"].(bool); !nullable && (hasType || hasProps || hasItems || hasEnum) {+ *out = append(*out, at+": is null, the spec does not allow null")+ }+ return+ }+ allOf, _ := s["allOf"].([]any)+ for _, branch := range allOf {+ c.visit(branch, v, at, out)+ }+ alternatives, _ := s["anyOf"].([]any)+ if alternatives == nil {+ alternatives, _ = s["oneOf"].([]any)+ }+ if alternatives != nil {+ var closest []string+ for i, branch := range alternatives {+ var branchProblems []string+ c.visit(branch, v, at, &branchProblems)+ if len(branchProblems) == 0 {+ closest = nil+ break+ }+ if i == 0 || len(branchProblems) < len(closest) {+ closest = branchProblems+ }+ }+ for _, p := range closest {+ *out = append(*out, fmt.Sprintf("%s (closest of %d alternatives)", p, len(alternatives)))+ }+ if !hasType && !hasProps {+ return+ }+ }+ want, _ := s["type"].(string)+ if want == "" {+ if hasProps {+ want = "object"+ } else if hasItems {+ want = "array"+ }+ }+ actual := typeOf(v)+ if want != "" && actual != want && (want != "number" || actual != "integer") {+ *out = append(*out, fmt.Sprintf("%s: is %s, the spec says %s", at, actual, want))+ return+ }+ if enum, ok := s["enum"].([]any); ok && !slices.ContainsFunc(enum, func(e any) bool { return reflect.DeepEqual(e, v) }) {+ raw, _ := json.Marshal(v)+ allowed, _ := json.Marshal(enum)+ *out = append(*out, fmt.Sprintf("%s: %s is not one of %s", at, raw, allowed))+ }+ if items, ok := v.([]any); ok && hasItems {+ for i, item := range items {+ c.visit(s["items"], item, fmt.Sprintf("%s[%d]", at, i), out)+ }+ }+ obj, ok := v.(map[string]any)+ if !ok {+ return+ }+ properties, _ := s["properties"].(map[string]any)+ if !c.fields {+ required, _ := s["required"].([]any)+ for _, name := range required {+ if _, present := obj[name.(string)]; !present {+ *out = append(*out, fmt.Sprintf("%s: misses required field %s", at, name))+ }+ }+ }+ extra, hasExtra := s["additionalProperties"]+ names := make([]string, 0, len(obj))+ for name := range obj {+ names = append(names, name)+ }+ slices.Sort(names)+ for _, name := range names {+ item := obj[name]+ if c.fields && isZero(item) {+ continue+ }+ where := at + "." + name+ if prop, defined := properties[name]; defined {+ c.visit(prop, item, where, out)+ } else if extra == false || (!hasExtra && hasProps) {+ *out = append(*out, where+": is not in the spec")+ } else if extraSchema, ok := extra.(map[string]any); ok {+ c.visit(extraSchema, item, where, out)+ }+ }+}++// Example is Response for op's success status.+func Example(t testing.TB, op string, overlay map[string]any) map[string]any {+ t.Helper()+ status, err := SuccessStatus(op)+ if err != nil {+ t.Fatal(err)+ }+ return Response(t, op, status, overlay)+}++// Response builds the body of op's response with the given status from the+// spec: every field its schema defines, set to the schema's example when that+// example matches the schema, with overlay merged on top. An object in overlay+// is merged field by field; an array replaces the built one, each of its+// objects merged onto the schema's item. The test fails unless the result+// matches the schema, so an overlay cannot add a field Composio does not send.+func Response(t testing.TB, op string, status int, overlay map[string]any) map[string]any {+ t.Helper()+ schema, err := responseSchema(op, status)+ if err != nil {+ t.Fatal(err)+ }+ b := builder{checker: checker{schemas: spec().Components.Schemas}}+ var o any+ if overlay != nil {+ o = overlay+ }+ body, ok := b.build(schema, o, overlay != nil, 0).(map[string]any)+ if !ok {+ t.Fatalf("composiotest: the %d response of %s is not an object", status, op)+ }+ if err := Check(op, status, body); err != nil {+ t.Fatal(err)+ }+ return body+}++type builder struct{ checker }++// clone copies a value decoded from the embedded spec, which every test+// shares, so callers can edit what Example returns.+func clone(v any) any {+ switch v := v.(type) {+ case map[string]any:+ out := make(map[string]any, len(v))+ for k, item := range v {+ out[k] = clone(item)+ }+ return out+ case []any:+ out := make([]any, len(v))+ for i, item := range v {+ out[i] = clone(item)+ }+ return out+ }+ return v+}++func (b builder) matches(schema, v any) bool {+ var problems []string+ b.visit(schema, v, "$", &problems)+ return len(problems) == 0+}++func (b builder) build(rawSchema, overlay any, has bool, depth int) any {+ s := b.resolve(rawSchema)+ if s == nil || depth > 24 {+ return overlay+ }+ _, overlayIsMap := overlay.(map[string]any)+ _, overlayIsList := overlay.([]any)+ if has && !overlayIsMap && !overlayIsList {+ return overlay+ }+ if example, ok := s["example"]; ok && !has && b.matches(s, example) {+ return clone(example)+ }+ alternatives, _ := s["anyOf"].([]any)+ if alternatives == nil {+ alternatives, _ = s["oneOf"].([]any)+ }+ if _, typed := s["type"]; len(alternatives) > 0 && !typed && s["properties"] == nil {+ for _, branch := range alternatives {+ if v := b.build(branch, overlay, has, depth+1); b.matches(branch, v) {+ return v+ }+ }+ return b.build(alternatives[0], overlay, has, depth+1)+ }+ typ, _ := s["type"].(string)+ properties, _ := s["properties"].(map[string]any)+ switch {+ case typ == "object" || properties != nil:+ fields, _ := overlay.(map[string]any)+ if properties == nil && has {+ return overlay+ }+ out := map[string]any{}+ for name, prop := range properties {+ value, set := fields[name]+ out[name] = b.build(prop, value, set, depth+1)+ }+ for name, value := range fields {+ if _, defined := properties[name]; !defined {+ out[name] = value+ }+ }+ return out+ case typ == "array":+ if items, ok := overlay.([]any); ok {+ out := make([]any, len(items))+ for i, item := range items {+ out[i] = b.build(s["items"], item, true, depth+1)+ }+ return out+ }+ return []any{b.build(s["items"], nil, false, depth+1)}+ }+ if enum, ok := s["enum"].([]any); ok && len(enum) > 0 {+ return enum[0]+ }+ switch typ {+ case "string":+ return "string"+ case "number", "integer":+ return float64(1)+ case "boolean":+ return false+ }+ return nil+}diff --git a/server/pkg/composio/composiotest/composiotest_test.go b/server/pkg/composio/composiotest/composiotest_test.gonew file mode 100644index 0000000000..d59e35eb87--- /dev/null+++ b/server/pkg/composio/composiotest/composiotest_test.go@@ -0,0 +1,115 @@+package composiotest_test++import (+ "encoding/json"+ "strings"+ "testing"++ "github.com/multica-ai/multica/server/pkg/composio/composiotest"+)++func TestExampleMatchesTheSpecForEveryOperation(t *testing.T) {+ ops := composiotest.Operations()+ if len(ops) < 12 {+ t.Fatalf("snapshot lists %d operations: %v", len(ops), ops)+ }+ for _, op := range ops {+ body := composiotest.Example(t, op, nil)+ if len(body) == 0 {+ t.Errorf("%s: empty example", op)+ }+ }+}++func TestExampleReturnsACopy(t *testing.T) {+ for op, edit := range map[string]func(map[string]any){+ "POST /connected_accounts/{nanoid}/revoke": func(body map[string]any) {+ body["connected_account"].(map[string]any)["id"] = "edited"+ },+ "GET /toolkits": func(body map[string]any) {+ meta := body["items"].([]any)[0].(map[string]any)["meta"].(map[string]any)+ meta["categories"].([]any)[0].(map[string]any)["name"] = "edited"+ },+ } {+ body := composiotest.Example(t, op, nil)+ before, err := json.Marshal(body)+ if err != nil {+ t.Fatal(err)+ }+ edit(body)+ after, err := json.Marshal(composiotest.Example(t, op, nil))+ if err != nil {+ t.Fatal(err)+ }+ if string(after) != string(before) {+ t.Errorf("%s: editing one example changed the next:\n before %s\n after %s", op, before, after)+ }+ }+}++func wantProblem(t *testing.T, err error, problem string) {+ t.Helper()+ if err == nil || !strings.Contains(err.Error(), problem) {+ t.Errorf("error = %v, want it to report %q", err, problem)+ }+}++// The two shapes that hid MUL-9920's bugs.+func TestCheckRejectsFieldsComposioDoesNotReturn(t *testing.T) {+ listed := composiotest.Example(t, "GET /toolkits", nil)+ listed["items"].([]any)[0].(map[string]any)["categories"] = []any{"Developer Tools"}+ wantProblem(t, composiotest.Check("GET /toolkits", 200, listed), "$.items[0].categories: is not in the spec")++ details := composiotest.Example(t, "GET /toolkits/{slug}", nil)+ details["auth_schemes"] = []any{"api_key"}+ wantProblem(t, composiotest.Check("GET /toolkits/{slug}", 200, details), "$.auth_schemes: is not in the spec")+}++func TestCheckReportsTypesRequiredFieldsAndEnums(t *testing.T) {+ body := composiotest.Example(t, "GET /connected_accounts", nil)+ account := body["items"].([]any)[0].(map[string]any)+ delete(account, "user_id")+ account["status"] = "CONNECTED"+ account["is_disabled"] = "no"+ err := composiotest.Check("GET /connected_accounts", 200, body)+ wantProblem(t, err, "$.items[0]: misses required field user_id")+ wantProblem(t, err, `$.items[0].status: "CONNECTED" is not one of`)+ wantProblem(t, err, "$.items[0].is_disabled: is string, the spec says boolean")+}++func TestCheckFieldsSkipsUnsetGoFields(t *testing.T) {+ type toolkit struct {+ Slug string `json:"slug"`+ Name string `json:"name"`+ AuthSchemes []string `json:"auth_schemes"`+ NoAuth bool `json:"no_auth"`+ }+ if err := composiotest.CheckFields("GET /toolkits/{slug}", toolkit{Slug: "notion"}); err != nil {+ t.Errorf("unset fields reported: %v", err)+ }+ wantProblem(t, composiotest.CheckFields("GET /toolkits/{slug}", toolkit{Slug: "notion", AuthSchemes: []string{"oauth2"}}),+ "$.auth_schemes: is not in the spec")+}++func TestResponseMergesOverlayOntoTheSpec(t *testing.T) {+ body := composiotest.Example(t, "GET /toolkits/{slug}", map[string]any{+ "slug": "openai",+ "auth_config_details": []any{+ map[string]any{"mode": "API_KEY"},+ map[string]any{"mode": "BASIC", "fields": map[string]any{"auth_config_creation": map[string]any{"required": []any{}}}},+ },+ })+ details := body["auth_config_details"].([]any)+ if body["slug"] != "openai" || len(details) != 2 {+ t.Fatalf("overlay not applied: %v", body)+ }+ basic := details[1].(map[string]any)+ if basic["mode"] != "BASIC" || basic["name"] == nil || basic["is_connection_revoke_supported"] == nil {+ t.Errorf("item not completed from the spec: %v", basic)+ }++ errBody := composiotest.Response(t, "GET /toolkits/{slug}", 404, map[string]any{"error": map[string]any{"message": "nope"}})+ if errBody["error"].(map[string]any)["message"] != "nope" {+ t.Errorf("error body = %v", errBody)+ }+}diff --git a/server/pkg/composio/composiotest/openapi-v3.1.json b/server/pkg/composio/composiotest/openapi-v3.1.jsonnew file mode 100644index 0000000000..11a207b4da--- /dev/null+++ b/server/pkg/composio/composiotest/openapi-v3.1.json@@ -0,0 +1,5230 @@+{+ "openapi": "3.0.0",+ "info": {"title":"Composio Platform API v3.1","version":"3.1.0"},+ "x-source": "https://backend.composio.dev/api/v3.1/openapi.json",+ "x-update": "node scripts/composio-spec.mjs update",+ "paths": {+ "/api/v3.1/toolkits": {+ "get": {+ "operationId": "getV3_1Toolkits",+ "responses": {+ "200": {+ "description": "Toolkits retrieved successfully. Returns a paginated list of available toolkits with detailed metadata.",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"github"},+ "name": {"type":"string","example":"GitHub"},+ "type": {"type":"string","enum":["native","custom"],"example":"native"},+ "app": {"type":"string","example":"GitHub"},+ "toolkit_type": {"type":"string","enum":["api","mcp"],"example":"api"},+ "instant": {+ "type": "object",+ "properties": {"supported":{"type":"boolean","enum":[true]}},+ "required": ["supported"]+ },+ "access": {"type":"string","enum":["all","user"],"example":"all"},+ "auth_schemes": {"type":"array","items":{"type":"string"},"example":["oauth2","api_key"]},+ "composio_managed_auth_schemes": {"type":"array","items":{"type":"string"},"example":["oauth2"]},+ "is_local_toolkit": {"type":"boolean","deprecated":true,"example":false},+ "no_auth": {"type":"boolean","example":false},+ "auth_guide_url": {+ "type": "string",+ "nullable": true,+ "example": "https://composio.dev/auth/github"+ },+ "deprecated": {"$ref":"#/components/schemas/DeprecatedToolkitInfo"},+ "meta": {+ "type": "object",+ "properties": {+ "created_at": {"type":"string","example":"2023-01-15T09:30:00.000Z"},+ "updated_at": {"type":"string","example":"2023-05-20T14:45:00.000Z"},+ "description": {+ "type": "string",+ "example": "Integrate with GitHub repositories, issues, pull requests, and more."+ },+ "logo": {+ "type": "string",+ "example": "https://assets.composio.dev/logos/github.png"+ },+ "app_url": {"type":"string","nullable":true,"example":"https://github.com"},+ "categories": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {"type":"string","example":"developer-tools"},+ "name": {"type":"string","example":"Developer Tools"}+ },+ "required": ["id","name"]+ },+ "example": [+ {"id":"developer-tools","name":"Developer Tools"},+ {"id":"productivity","name":"Productivity"}+ ]+ },+ "triggers_count": {"type":"number","example":5},+ "tools_count": {"type":"number","example":12},+ "version": {"type":"string","example":"20250905_00"}+ },+ "required": [+ "created_at",+ "updated_at",+ "description",+ "logo",+ "categories",+ "triggers_count",+ "tools_count",+ "version"+ ]+ }+ },+ "required": [+ "slug",+ "name",+ "type",+ "app",+ "toolkit_type",+ "is_local_toolkit",+ "deprecated",+ "meta"+ ]+ }+ },+ "next_cursor": {"type":"string","nullable":true},+ "total_pages": {"type":"number"},+ "current_page": {"type":"number"},+ "total_items": {"type":"number"}+ },+ "required": ["items","total_pages","current_page","total_items"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request. The query parameters may be invalid or in an incorrect format.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized. Authentication is required or the provided credentials are invalid.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found. The toolkits you are looking for do not exist.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "429": {+ "description": "Too many requests. The upstream service is rate limiting the request; retry after a short backoff.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error. An unexpected error occurred while processing the request.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/toolkits/{slug}": {+ "get": {+ "operationId": "getV3_1ToolkitsBySlug",+ "responses": {+ "200": {+ "description": "Successfully retrieved detailed information about the requested toolkit, including authentication options, metadata, and feature counts.",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"github"},+ "name": {"type":"string","example":"GitHub"},+ "type": {"type":"string","enum":["native","custom"],"example":"native"},+ "toolkit_type": {"type":"string","enum":["api","mcp"],"example":"api"},+ "instant": {+ "type": "object",+ "properties": {"supported":{"type":"boolean","enum":[true]}},+ "required": ["supported"]+ },+ "enabled": {"type":"boolean","example":true},+ "access": {"type":"string","enum":["all","user"],"example":"all"},+ "composio_managed_auth_schemes": {"type":"array","items":{"type":"string"},"example":["oauth2"]},+ "composio_managed_auth": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "managed_app_id": {"type":"string","example":"ma_V1StGXR8_Z5j"},+ "is_default": {"type":"boolean","example":true},+ "mode": {"type":"string","example":"OAUTH2"},+ "scopes": {+ "type": "object",+ "properties": {"available":{"type":"array","items":{"type":"string"}}},+ "required": ["available"],+ "example": {"available":["read","write"]}+ },+ "user_scopes": {+ "type": "object",+ "properties": {"available":{"type":"array","items":{"type":"string"}}},+ "required": ["available"],+ "example": {"available":["search:read","users:read"]}+ }+ },+ "required": ["managed_app_id","is_default","mode","scopes"]+ }+ },+ "is_local_toolkit": {"type":"boolean","deprecated":true,"example":false},+ "auth_config_details": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "mode": {+ "type": "string",+ "enum": [+ "OAUTH2",+ "OAUTH1",+ "API_KEY",+ "BASIC",+ "BILLCOM_AUTH",+ "BEARER_TOKEN",+ "GOOGLE_SERVICE_ACCOUNT",+ "NO_AUTH",+ "BASIC_WITH_JWT",+ "CALCOM_AUTH",+ "SERVICE_ACCOUNT",+ "SAML",+ "DCR_OAUTH",+ "CIMD_OAUTH",+ "S2S_OAUTH2"+ ],+ "example": "OAUTH2"+ },+ "required_scopes": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["offline_access","User.Read"]+ },+ "fields": {+ "type": "object",+ "properties": {+ "auth_config_creation": {+ "type": "object",+ "properties": {+ "required": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string"},+ "displayName": {"type":"string"},+ "default": {"type":"string","nullable":true},+ "type": {"type":"string"},+ "description": {"type":"string"},+ "required": {"type":"boolean"},+ "is_secret": {"type":"boolean"},+ "legacy_template_name": {"type":"string"},+ "user_visible": {"type":"boolean"}+ },+ "required": [+ "name",+ "displayName",+ "type",+ "description",+ "required",+ "user_visible"+ ]+ }+ },+ "optional": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string"},+ "displayName": {"type":"string"},+ "default": {"type":"string","nullable":true},+ "type": {"type":"string"},+ "description": {"type":"string"},+ "required": {"type":"boolean"},+ "is_secret": {"type":"boolean"},+ "legacy_template_name": {"type":"string"},+ "user_visible": {"type":"boolean"}+ },+ "required": [+ "name",+ "displayName",+ "type",+ "description",+ "required",+ "user_visible"+ ]+ }+ }+ },+ "required": ["required","optional"]+ },+ "connected_account_initiation": {+ "type": "object",+ "properties": {+ "required": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string"},+ "displayName": {"type":"string"},+ "default": {"type":"string","nullable":true},+ "type": {"type":"string"},+ "description": {"type":"string"},+ "required": {"type":"boolean"},+ "is_secret": {"type":"boolean"},+ "legacy_template_name": {"type":"string"},+ "user_visible": {"type":"boolean"}+ },+ "required": [+ "name",+ "displayName",+ "type",+ "description",+ "required",+ "user_visible"+ ]+ }+ },+ "optional": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string"},+ "displayName": {"type":"string"},+ "default": {"type":"string","nullable":true},+ "type": {"type":"string"},+ "description": {"type":"string"},+ "required": {"type":"boolean"},+ "is_secret": {"type":"boolean"},+ "legacy_template_name": {"type":"string"},+ "user_visible": {"type":"boolean"}+ },+ "required": [+ "name",+ "displayName",+ "type",+ "description",+ "required",+ "user_visible"+ ]+ }+ }+ },+ "required": ["required","optional"]+ }+ },+ "required": ["auth_config_creation","connected_account_initiation"]+ },+ "proxy": {+ "type": "object",+ "properties": {+ "base_url": {"type":"string","example":"https://auth.example.com/proxy"}+ },+ "required": ["base_url"]+ },+ "name": {"type":"string","example":"OAuth 2.0"},+ "auth_hint_url": {+ "type": "string",+ "nullable": true,+ "example": "https://github.com/settings/tokens"+ },+ "is_connection_revoke_supported": {"type":"boolean"},+ "deprecated_auth_provider_details": {+ "type": "object",+ "properties": {"authorization_url":{"type":"string"},"token_url":{"type":"string"}},+ "deprecated": true+ }+ },+ "required": ["mode","required_scopes","fields","name","is_connection_revoke_supported"]+ }+ },+ "auth_guide_url": {"type":"string","nullable":true,"example":"https://composio.dev/auth/github"},+ "docs_url": {"type":"string","nullable":true},+ "base_url": {"type":"string","example":"https://api.github.com"},+ "meta": {+ "type": "object",+ "properties": {+ "created_at": {"type":"string","example":"2023-01-15T09:30:00.000Z"},+ "updated_at": {"type":"string","example":"2023-05-20T14:45:00.000Z"},+ "description": {+ "type": "string",+ "example": "Integrate with GitHub repositories, issues, pull requests, and more."+ },+ "logo": {"type":"string","example":"https://assets.composio.dev/logos/github.png"},+ "app_url": {"type":"string","nullable":true,"example":"https://github.com"},+ "categories": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string","example":"Developer Tools"},+ "slug": {"type":"string","example":"developer-tools"}+ },+ "required": ["name","slug"]+ },+ "example": [+ {"name":"Developer Tools","slug":"developer-tools"},+ {"name":"Productivity","slug":"productivity"}+ ]+ },+ "triggers_count": {"type":"number","example":5},+ "tools_count": {"type":"number","example":12},+ "version": {"type":"string","example":"20250905_00"},+ "available_versions": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["20250905_00","20250906_00"]+ }+ },+ "required": [+ "created_at",+ "updated_at",+ "description",+ "logo",+ "categories",+ "triggers_count",+ "tools_count",+ "version",+ "available_versions"+ ]+ },+ "get_current_user_endpoint": {"type":"string"},+ "get_current_user_endpoint_method": {"type":"string","example":"GET"},+ "deprecated": {+ "type": "object",+ "properties": {+ "toolkitId": {"type":"string"},+ "getCurrentUserEndpoint": {"type":"string"},+ "rawProxyInfoByAuthSchemes": {+ "type": "array",+ "items": {"type":"object","additionalProperties":{"nullable":true}}+ }+ },+ "required": ["toolkitId","rawProxyInfoByAuthSchemes"]+ }+ },+ "required": [+ "slug",+ "name",+ "type",+ "toolkit_type",+ "enabled",+ "composio_managed_auth",+ "is_local_toolkit",+ "docs_url",+ "meta",+ "deprecated"+ ]+ }+ }+ }+ },+ "400": {+ "description": "Bad request. The toolkit slug may be invalid or in an incorrect format.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized. Authentication is required or the provided credentials are invalid.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found. The requested toolkit does not exist or is not accessible to the authenticated project.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error. An unexpect ed error occurred while processing the request.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/auth_configs": {+ "get": {+ "operationId": "getV3_1AuthConfigs",+ "responses": {+ "200": {+ "description": "Successfully fetched auth configs",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {"type":"string","format":"authConfigId"},+ "uuid": {"type":"string","deprecated":true},+ "type": {"type":"string","enum":["default","custom"]},+ "toolkit": {+ "type": "object",+ "properties": {+ "slug": {"type":"string"},+ "logo": {"type":"string"},+ "auth_guide_url": {"type":"string","nullable":true},+ "auth_hint_url": {"type":"string","nullable":true}+ },+ "required": ["slug","logo"]+ },+ "name": {"type":"string"},+ "auth_scheme": {+ "type": "string",+ "enum": [+ "OAUTH2",+ "OAUTH1",+ "API_KEY",+ "BASIC",+ "BILLCOM_AUTH",+ "BEARER_TOKEN",+ "GOOGLE_SERVICE_ACCOUNT",+ "NO_AUTH",+ "BASIC_WITH_JWT",+ "CALCOM_AUTH",+ "SERVICE_ACCOUNT",+ "SAML",+ "DCR_OAUTH",+ "CIMD_OAUTH",+ "S2S_OAUTH2"+ ]+ },+ "is_composio_managed": {"type":"boolean"},+ "managed_app_id": {"type":"string","nullable":true},+ "credentials": {"type":"object","additionalProperties":{"nullable":true}},+ "proxy_config": {+ "type": "object",+ "nullable": true,+ "properties": {+ "proxy_url": {"type":"string","format":"uri"},+ "proxy_auth_key": {"type":"string"}+ },+ "required": ["proxy_url"]+ },+ "status": {"type":"string","enum":["ENABLED","DISABLED"]},+ "created_by": {"type":"string"},+ "created_at": {"type":"string"},+ "last_updated_at": {"type":"string"},+ "no_of_connections": {"type":"number"},+ "expected_input_fields": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "name": {"type":"string"},+ "displayName": {"type":"string"},+ "default": {"type":"string","nullable":true},+ "type": {"type":"string"},+ "description": {"type":"string"},+ "required": {"type":"boolean"},+ "is_secret": {"type":"boolean"},+ "legacy_template_name": {"type":"string"},+ "user_visible": {"type":"boolean"},+ "is_available_as_shared_credentials": {"type":"boolean"}+ },+ "required": ["name","displayName","type","description","required","user_visible"]+ }+ },+ "restrict_to_following_tools": {"type":"array","items":{"type":"string"},"deprecated":true},+ "tool_access_config": {+ "type": "object",+ "properties": {+ "tools_for_connected_account_creation": {+ "type": "array",+ "items": {"type":"string"},+ "default": [],+ "deprecated": true+ },+ "tools_available_for_execution": {+ "type": "array",+ "items": {"type":"string"},+ "default": [],+ "deprecated": true+ }+ },+ "deprecated": true+ },+ "shared_credentials": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "deprecated": true+ },+ "shared_connection_fields": {"type":"object","additionalProperties":{"nullable":true}},+ "is_enabled_for_tool_router": {"type":"boolean"}+ },+ "required": [+ "id",+ "uuid",+ "type",+ "toolkit",+ "name",+ "managed_app_id",+ "status",+ "no_of_connections",+ "tool_access_config"+ ]+ }+ },+ "next_cursor": {"type":"string","nullable":true},+ "total_pages": {"type":"number"},+ "current_page": {"type":"number"},+ "total_items": {"type":"number"}+ },+ "required": ["items","total_pages","current_page","total_items"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ },+ "post": {+ "operationId": "postV3_1AuthConfigs",+ "responses": {+ "201": {+ "description": "Successfully created auth config",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "toolkit": {"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]},+ "auth_config": {+ "type": "object",+ "properties": {+ "id": {"type":"string","format":"authConfigId"},+ "auth_scheme": {"type":"string"},+ "is_composio_managed": {"type":"boolean"},+ "managed_app_id": {"type":"string","nullable":true},+ "restrict_to_following_tools": {"type":"array","items":{"type":"string"},"default":[],"deprecated":true}+ },+ "required": ["id","auth_scheme","is_composio_managed","managed_app_id"]+ }+ },+ "required": ["toolkit","auth_config"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - Your role does not allow modifying auth configs",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/connected_accounts/link": {+ "post": {+ "operationId": "postV3_1ConnectedAccountsLink",+ "responses": {+ "201": {+ "description": "Successfully created auth link",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "link_token": {"type":"string"},+ "redirect_url": {"type":"string"},+ "expires_at": {"type":"string"},+ "connected_account_id": {"type":"string","format":"connectedAccountId"},+ "experimental": {+ "type": "object",+ "properties": {+ "account_type": {"type":"string","enum":["PRIVATE","SHARED"],"x-experimental":true},+ "acl_config_for_shared": {+ "type": "object",+ "properties": {+ "allow_all_users": {"type":"boolean"},+ "allowed_user_ids": {"type":"array","items":{"type":"string"}},+ "not_allowed_user_ids": {"type":"array","items":{"type":"string"}}+ },+ "required": ["allow_all_users","allowed_user_ids","not_allowed_user_ids"],+ "x-experimental": true+ }+ },+ "required": ["account_type"],+ "x-experimental": true+ }+ },+ "required": ["link_token","redirect_url","expires_at","connected_account_id"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - Your role does not allow modifying connected accounts",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Auth config not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "422": {+ "description": "Unprocessable entity",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "429": {+ "description": "Too many requests",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "501": {+ "description": "Not implemented",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/connected_accounts": {+ "get": {+ "operationId": "getV3_1ConnectedAccounts",+ "responses": {+ "200": {+ "description": "Successfully retrieved connected accounts",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "toolkit": {+ "type": "object",+ "properties": {"slug":{"type":"string"}},+ "required": ["slug"]+ },+ "auth_config": {+ "type": "object",+ "properties": {+ "id": {"type":"string","format":"authConfigId"},+ "auth_scheme": {+ "type": "string",+ "enum": [+ "OAUTH2",+ "OAUTH1",+ "API_KEY",+ "BASIC",+ "BILLCOM_AUTH",+ "BEARER_TOKEN",+ "GOOGLE_SERVICE_ACCOUNT",+ "NO_AUTH",+ "BASIC_WITH_JWT",+ "CALCOM_AUTH",+ "SERVICE_ACCOUNT",+ "SAML",+ "DCR_OAUTH",+ "CIMD_OAUTH",+ "S2S_OAUTH2"+ ],+ "deprecated": true+ },+ "is_composio_managed": {"type":"boolean"},+ "is_disabled": {"type":"boolean"}+ },+ "required": ["id","auth_scheme","is_composio_managed","is_disabled"]+ },+ "id": {"type":"string","format":"connectedAccountId"},+ "authScheme": {+ "type": "string",+ "enum": [+ "OAUTH2",+ "OAUTH1",+ "API_KEY",+ "BASIC",+ "BILLCOM_AUTH",+ "BEARER_TOKEN",+ "GOOGLE_SERVICE_ACCOUNT",+ "NO_AUTH",+ "BASIC_WITH_JWT",+ "CALCOM_AUTH",+ "SERVICE_ACCOUNT",+ "SAML",+ "DCR_OAUTH",+ "CIMD_OAUTH",+ "S2S_OAUTH2"+ ],+ "deprecated": true+ },+ "word_id": {"type":"string","nullable":true},+ "alias": {"type":"string","nullable":true},+ "user_id": {"type":"string","deprecated":true},+ "status": {+ "type": "string",+ "enum": [+ "INITIALIZING",+ "INITIATED",+ "ACTIVE",+ "FAILED",+ "EXPIRED",+ "INACTIVE",+ "REVOKED"+ ]+ },+ "experimental": {+ "type": "object",+ "properties": {+ "account_type": {"type":"string","enum":["PRIVATE","SHARED"],"x-experimental":true},+ "acl_config_for_shared": {+ "type": "object",+ "properties": {+ "allow_all_users": {"type":"boolean"},+ "allowed_user_ids": {"type":"array","items":{"type":"string"}},+ "not_allowed_user_ids": {"type":"array","items":{"type":"string"}}+ },+ "required": ["allow_all_users","allowed_user_ids","not_allowed_user_ids"],+ "x-experimental": true+ }+ },+ "required": ["account_type"],+ "x-experimental": true+ },+ "created_at": {"type":"string"},+ "updated_at": {"type":"string"},+ "state": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["OAUTH1"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "oauth_token": {"type":"string"},+ "authUri": {"type":"string"},+ "oauth_token_secret": {"type":"string"},+ "redirectUrl": {"type":"string"},+ "callbackUrl": {"type":"string"}+ },+ "required": [+ "status",+ "oauth_token",+ "authUri",+ "oauth_token_secret",+ "redirectUrl"+ ],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "oauth_token": {"type":"string"},+ "oauth_token_secret": {"type":"string"},+ "oauth_verifier": {"type":"string"},+ "consumer_key": {"type":"string"},+ "redirectUrl": {"type":"string"},+ "callback_url": {"type":"string"}+ },+ "required": ["status","oauth_token","oauth_token_secret"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "oauth_token": {"type":"string"},+ "oauth_token_secret": {"type":"string"},+ "oauth_verifier": {"type":"string"},+ "consumer_key": {"type":"string"},+ "redirectUrl": {"type":"string"},+ "callback_url": {"type":"string"}+ },+ "required": ["status","oauth_token","oauth_token_secret"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["OAUTH2"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "code_verifier": {"type":"string"},+ "redirectUrl": {"type":"string"},+ "callback_url": {"type":"string"},+ "finalRedirectUri": {"type":"string"},+ "webhook_signature": {"type":"string"}+ },+ "required": ["status","redirectUrl"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ },+ "webhook_signature": {"type":"string"},+ "authed_user": {+ "type": "object",+ "properties": {+ "access_token": {"type":"string"},+ "scope": {"type":"string"}+ }+ },+ "extra_token_data": {"type":"object","additionalProperties":{"nullable":true}}+ },+ "required": ["status","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ },+ "webhook_signature": {"type":"string"},+ "authed_user": {+ "type": "object",+ "properties": {+ "access_token": {"type":"string"},+ "scope": {"type":"string"}+ }+ },+ "extra_token_data": {"type":"object","additionalProperties":{"nullable":true}}+ },+ "required": ["status","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["REVOKED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "revoked_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["API_KEY"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "generic_api_key": {"type":"string"},+ "api_key": {"type":"string"},+ "bearer_token": {"type":"string"},+ "basic_encoded": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "generic_api_key": {"type":"string"},+ "api_key": {"type":"string"},+ "bearer_token": {"type":"string"},+ "basic_encoded": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["REVOKED"]},+ "generic_api_key": {"type":"string"},+ "api_key": {"type":"string"},+ "bearer_token": {"type":"string"},+ "basic_encoded": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["BASIC"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "username": {"type":"string"},+ "password": {"type":"string"}+ },+ "required": ["status","username"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "username": {"type":"string"},+ "password": {"type":"string"}+ },+ "required": ["status","username"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["BEARER_TOKEN"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "token": {"type":"string"}+ },+ "required": ["status","token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "token": {"type":"string"}+ },+ "required": ["status","token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["GOOGLE_SERVICE_ACCOUNT"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "redirectUrl": {"type":"string"},+ "composio_link_redirect_url": {"type":"string"}+ },+ "required": ["status","redirectUrl"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "credentials_json": {"type":"string"}+ },+ "required": ["status","credentials_json"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "credentials_json": {"type":"string"}+ },+ "required": ["status","credentials_json"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["NO_AUTH"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["CALCOM_AUTH"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["BILLCOM_AUTH"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "redirectUrl": {"type":"string"}+ },+ "required": ["status","redirectUrl"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "sessionId": {"type":"string"},+ "devKey": {"type":"string"}+ },+ "required": ["status","sessionId","devKey"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "sessionId": {"type":"string"},+ "devKey": {"type":"string"}+ },+ "required": ["status","sessionId","devKey"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["BASIC_WITH_JWT"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "username": {"type":"string"},+ "password": {"type":"string"}+ },+ "required": ["status","username","password"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "username": {"type":"string"},+ "password": {"type":"string"}+ },+ "required": ["status","username","password"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "username": {"type":"string"},+ "password": {"type":"string"},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status","username","password"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["SERVICE_ACCOUNT"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "application_id": {"type":"string"},+ "installation_id": {"type":"string"},+ "private_key": {"type":"string"}+ },+ "required": ["status","application_id","installation_id","private_key"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "application_id": {"type":"string"},+ "installation_id": {"type":"string"},+ "private_key": {"type":"string"}+ },+ "required": ["status","application_id","installation_id","private_key"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["SAML"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["DCR_OAUTH"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string"},+ "client_secret": {"type":"string"},+ "redirectUrl": {"type":"string"},+ "callback_url": {"type":"string"},+ "finalRedirectUri": {"type":"string"},+ "client_id_issued_at": {"type":"number"},+ "client_secret_expires_at": {"type":"number"},+ "code_verifier": {"type":"string"}+ },+ "required": ["status","client_id","redirectUrl"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string"},+ "client_secret": {"type":"string"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ },+ "client_id_issued_at": {"type":"number"},+ "client_secret_expires_at": {"type":"number"}+ },+ "required": ["status","client_id","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string"},+ "client_secret": {"type":"string"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ },+ "client_id_issued_at": {"type":"number"},+ "client_secret_expires_at": {"type":"number"}+ },+ "required": ["status","client_id","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["CIMD_OAUTH"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string","format":"uri"},+ "redirectUrl": {"type":"string"},+ "callback_url": {"type":"string"},+ "finalRedirectUri": {"type":"string"},+ "code_verifier": {"type":"string"}+ },+ "required": ["status","client_id","redirectUrl"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string","format":"uri"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ }+ },+ "required": ["status","client_id","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "client_id": {"type":"string","format":"uri"},+ "access_token": {"type":"string"},+ "id_token": {"type":"string","nullable":true},+ "token_type": {"type":"string"},+ "refresh_token": {"type":"string","nullable":true},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ }+ },+ "required": ["status","client_id","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "state_prefix": {"type":"string","maxLength":40},+ "long_redirect_url": {"type":"boolean"},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ },+ {+ "type": "object",+ "properties": {+ "authScheme": {"type":"string","enum":["S2S_OAUTH2"]},+ "val": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIALIZING"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INITIATED"]}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["ACTIVE"]},+ "access_token": {"type":"string"},+ "token_type": {"type":"string"},+ "client_id": {"type":"string"},+ "client_secret": {"type":"string"},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "expires_at": {"type":"string"},+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ }+ },+ "required": ["status","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["INACTIVE"]},+ "access_token": {"type":"string"},+ "token_type": {"type":"string"},+ "client_id": {"type":"string"},+ "client_secret": {"type":"string"},+ "expires_in": {+ "anyOf": [{"type":"number"},{"type":"string"},{"nullable":true}]+ },+ "expires_at": {"type":"string"},+ "scope": {+ "anyOf": [+ {"type":"string"},+ {"type":"array","items":{"type":"string"}},+ {"nullable":true}+ ]+ }+ },+ "required": ["status","access_token"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["FAILED"]},+ "error": {"type":"string"},+ "error_description": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ },+ {+ "type": "object",+ "properties": {+ "subdomain": {"type":"string"},+ "your-domain": {"type":"string"},+ "region": {"type":"string"},+ "shop": {"type":"string"},+ "account_url": {"type":"string"},+ "COMPANYDOMAIN": {"type":"string"},+ "extension": {"type":"string"},+ "form_api_base_url": {"type":"string"},+ "instanceEndpoint": {"type":"string"},+ "api_url": {"type":"string"},+ "borneo_dashboard_url": {"type":"string"},+ "proxy_username": {"type":"string"},+ "proxy_password": {"type":"string"},+ "domain": {"type":"string"},+ "version": {"type":"string"},+ "dc": {"type":"string"},+ "site_name": {"type":"string"},+ "instanceName": {"type":"string"},+ "account_id": {"type":"string"},+ "your_server": {"type":"string"},+ "server_location": {"type":"string"},+ "base_url": {"type":"string"},+ "displayName": {"type":"string"},+ "status": {"type":"string","enum":["EXPIRED"]},+ "expired_at": {"type":"string"}+ },+ "required": ["status"],+ "additionalProperties": {"nullable":true}+ }+ ]+ }+ },+ "required": ["authScheme","val"]+ }+ ]+ },+ "data": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "deprecated": true+ },+ "status_reason": {"type":"string","nullable":true},+ "is_disabled": {"type":"boolean"},+ "test_request_endpoint": {"type":"string"}+ },+ "required": [+ "toolkit",+ "auth_config",+ "id",+ "word_id",+ "alias",+ "user_id",+ "status",+ "created_at",+ "updated_at",+ "state",+ "data",+ "status_reason",+ "is_disabled"+ ]+ }+ },+ "next_cursor": {"type":"string","nullable":true},+ "total_pages": {"type":"number"},+ "current_page": {"type":"number"},+ "total_items": {"type":"number"}+ },+ "required": ["items","total_pages","current_page","total_items"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "422": {+ "description": "Unprocessable entity",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/connected_accounts/{nanoid}/revoke": {+ "post": {+ "operationId": "postV3_1ConnectedAccountsByNanoidRevoke",+ "responses": {+ "200": {+ "description": "Connection revoked. `revoked_tokens` reports which subjects were killed at the provider on this call; an empty array indicates the connection was already revoked.",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "revoked_tokens": {+ "type": "array",+ "items": {"type":"string","enum":["access_token","refresh_token","credential"]}+ },+ "connected_account": {+ "type": "object",+ "properties": {+ "id": {"type":"string"},+ "status": {+ "type": "string",+ "enum": [+ "INITIALIZING",+ "INITIATED",+ "ACTIVE",+ "FAILED",+ "EXPIRED",+ "INACTIVE",+ "REVOKED"+ ]+ }+ },+ "required": ["id","status"]+ }+ },+ "required": ["revoked_tokens","connected_account"],+ "example": {+ "revoked_tokens": ["access_token","refresh_token"],+ "connected_account": {"id":"ca_1a2b3c4d5e6f","status":"REVOKED"}+ }+ }+ }+ }+ },+ "400": {+ "description": "Bad request - non-OAUTH2 auth scheme or toolkit lacks a revoke configuration.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized - Authentication failed",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - Insufficient permissions to revoke this connected account",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found - Connected account does not exist, was deleted, or its parent auth config was removed.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "409": {+ "description": "Conflict - Connection is in a state that cannot be revoked (only ACTIVE / already-REVOKED are accepted).",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error - DB failure, data integrity violation, or every upstream dispatch failed.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/connected_accounts/{nanoid}": {+ "delete": {+ "operationId": "deleteV3_1ConnectedAccountsByNanoid",+ "responses": {+ "200": {+ "description": "Successfully deleted the connected account.",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "success": {"type":"boolean"},+ "revoke_job_id": {"type":"string","example":"pj_1a2b3c4d5e6f"}+ },+ "required": ["success"],+ "example": {"success":true}+ }+ }+ }+ },+ "400": {+ "description": "Bad request - Invalid nanoid format or other validation error",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized - Authentication failed",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - Insufficient permissions to delete this connected account",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Connected account not found - The specified account does not exist or has already been deleted",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error - Failed to delete the connected account due to a server-side issue",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/tools": {+ "get": {+ "operationId": "getV3_1Tools",+ "responses": {+ "200": {+ "description": "Successfully retrieved tools list with pagination information",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/ToolsPaginated"}}}+ },+ "400": {+ "description": "Bad request - Invalid query parameters",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized - Authentication credentials are missing or invalid",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - User does not have permission to access tools",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found - The requested resource was not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "429": {+ "description": "Too many requests - Rate limit exceeded",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error - Something went wrong on the server",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/tools/{tool_slug}": {+ "get": {+ "operationId": "getV3_1ToolsByToolSlug",+ "responses": {+ "200": {+ "description": "Successfully retrieved tool details",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/ToolDetails"}}}+ },+ "400": {+ "description": "Bad request - Invalid tool slug format",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized - Authentication credentials are missing or invalid",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found - Tool with the specified slug does not exist",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error - Something went wrong on the server",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/tools/execute/{tool_slug}": {+ "post": {+ "operationId": "postV3_1ToolsExecuteByToolSlug",+ "responses": {+ "200": {+ "description": "Successfully executed action and received response",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "data": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "example": {+ "run_id": 12345678,+ "status": "queued",+ "created_at": "2023-01-01T12:00:00Z",+ "html_url": "https://github.com/octocat/Hello-World/actions/runs/12345678"+ }+ },+ "error": {"type":"string","nullable":true},+ "successful": {"type":"boolean","example":true},+ "session_info": {+ "nullable": true,+ "example": {"session_id":"session-12345","expires_at":"2023-01-01T13:00:00Z"}+ },+ "log_id": {"type":"string","example":"log_1a2b3c4d5e6f"}+ },+ "required": ["data","error","successful"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request - Invalid request parameters, missing required arguments, or conflicting parameters",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized - Authentication credentials are missing or invalid",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "402": {+ "description": "Payment required - Wallet balance is exhausted; add credits to resume Instant tool calls or connect your account",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden - Connected account does not have permission to execute this tool or access the requested resource",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found - Tool or connected account not found",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "408": {+ "description": "Request timeout - Tool execution exceeded the maximum allowed time",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "410": {+ "description": "Gone - Tool has been deprecated and is no longer available",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "413": {+ "description": "Payload too large - Request or response payload exceeds size limits",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "422": {+ "description": "Unprocessable entity - Invalid state of the connected account",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "429": {+ "description": "Rate limit exceeded - Too many requests to the tool or underlying API",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error - Something went wrong on the server",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "501": {+ "description": "Not implemented",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "502": {+ "description": "Bad gateway - Error communicating with the tool provider API",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "503": {+ "description": "Upstream service unavailable - Tool provider API is currently down or unavailable",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ },+ "/api/v3.1/tool_router/session": {+ "post": {+ "operationId": "postV3_1ToolRouterSession",+ "responses": {+ "201": {+ "description": "Session successfully created. Returns the session ID and MCP server URL for the created session.",+ "content": {+ "application/json": {+ "schema": {+ "type": "object",+ "properties": {+ "session_id": {"type":"string","format":"toolRouterSessionId","example":"trs_1a2b3c4d5e6f"},+ "mcp": {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["http"]},+ "url": {+ "type": "string",+ "format": "uri",+ "example": "https://app.composio.dev/tool_router/v3/trs_1a2b3c4d5e6f/mcp"+ }+ },+ "required": ["type","url"]+ },+ "tool_router_tools": {"type":"array","items":{"type":"string"}},+ "config": {+ "type": "object",+ "properties": {+ "user_id": {"type":"string"},+ "toolkits": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "enabled": {"type":"array","items":{"type":"string"}},+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["enabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "disabled": {"type":"array","items":{"type":"string"}},+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["disabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["require_approval"],+ "additionalProperties": false+ }+ ]+ },+ "auth_configs": {+ "type": "object",+ "additionalProperties": {"type":"string","format":"authConfigId"}+ },+ "instant": {+ "anyOf": [+ {"type":"boolean","enum":[false]},+ {+ "type": "object",+ "properties": {+ "toolkits": {+ "anyOf": [+ {+ "type": "object",+ "properties": {"enabled":{"type":"array","items":{"type":"string"}}},+ "required": ["enabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {"disabled":{"type":"array","items":{"type":"string"}}},+ "required": ["disabled"],+ "additionalProperties": false+ }+ ]+ },+ "tools": {+ "type": "object",+ "additionalProperties": {+ "anyOf": [+ {+ "type": "object",+ "properties": {"enabled":{"type":"array","items":{"type":"string"}}},+ "required": ["enabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {"disabled":{"type":"array","items":{"type":"string"}}},+ "required": ["disabled"],+ "additionalProperties": false+ }+ ]+ }+ },+ "return_instant_charge": {"type":"boolean"},+ "return_prices_in_search": {"type":"boolean","x-experimental":true}+ },+ "required": ["return_instant_charge","return_prices_in_search"],+ "additionalProperties": false+ }+ ]+ },+ "manage_connections": {+ "type": "object",+ "properties": {+ "enabled": {"type":"boolean","default":true},+ "callback_url": {"type":"string","format":"uri"},+ "enable_wait_for_connections": {"type":"boolean","default":false},+ "enable_connection_removal": {"type":"boolean","default":true}+ }+ },+ "tools": {+ "type": "object",+ "additionalProperties": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "enabled": {"type":"array","items":{"type":"string"}},+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["enabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "disabled": {"type":"array","items":{"type":"string"}},+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["disabled"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "tags": {+ "type": "object",+ "properties": {+ "enabled": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ }+ },+ "disabled": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ }+ },+ "require_approval": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ },+ "x-experimental": true+ }+ }+ },+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["tags"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "require_approval": {"type":"array","items":{"type":"string"},"x-experimental":true}+ },+ "required": ["require_approval"],+ "additionalProperties": false+ }+ ]+ }+ },+ "tags": {+ "type": "object",+ "properties": {+ "enabled": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ }+ },+ "disabled": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ }+ },+ "require_approval": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "readOnlyHint",+ "createHint",+ "updateHint",+ "destructiveHint",+ "idempotentHint",+ "openWorldHint"+ ]+ },+ "x-experimental": true+ }+ }+ },+ "workbench": {+ "type": "object",+ "properties": {+ "enable": {"type":"boolean"},+ "tool_execution_enabled": {"type":"boolean"},+ "proxy_execution_enabled": {"type":"boolean"},+ "auto_offload_threshold": {"type":"number","minimum":0,"exclusiveMinimum":true},+ "sandbox_size": {"type":"string","enum":["standard","medium","large","xlarge"]}+ },+ "default": {"enable":true,"proxy_execution_enabled":true}+ },+ "multi_account": {+ "type": "object",+ "properties": {+ "enable": {"type":"boolean"},+ "max_accounts_per_toolkit": {"type":"integer"},+ "require_explicit_selection": {"type":"boolean"}+ }+ },+ "proxy_execute": {+ "type": "object",+ "properties": {"enable":{"type":"boolean"}},+ "required": ["enable"]+ },+ "hooks": {+ "type": "array",+ "items": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["before_execute"]},+ "id": {"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},+ "name": {"type":"string","minLength":1,"maxLength":120},+ "applies_to": {+ "anyOf": [+ {"type":"string","enum":["all"]},+ {+ "type": "object",+ "properties": {+ "toolkits": {+ "type": "array",+ "items": {"type":"string","minLength":1},+ "minItems": 1+ }+ },+ "required": ["toolkits"],+ "additionalProperties": false+ }+ ]+ },+ "handler": {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["condition_check"]},+ "condition": {"type":"string","minLength":1,"maxLength":2000},+ "action": {"type":"string","enum":["block"]}+ },+ "required": ["type","condition","action"],+ "additionalProperties": false+ }+ },+ "required": ["type","id","applies_to","handler"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["after_execute"]},+ "id": {"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},+ "name": {"type":"string","minLength":1,"maxLength":120},+ "applies_to": {+ "anyOf": [+ {"type":"string","enum":["all"]},+ {+ "type": "object",+ "properties": {+ "toolkits": {+ "type": "array",+ "items": {"type":"string","minLength":1},+ "minItems": 1+ }+ },+ "required": ["toolkits"],+ "additionalProperties": false+ }+ ]+ },+ "handler": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["condition_check"]},+ "condition": {"type":"string","minLength":1,"maxLength":2000},+ "action": {"type":"string","enum":["block"]}+ },+ "required": ["type","condition","action"],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "type": {"type":"string","enum":["prompt_injection_check"]},+ "action": {"type":"string","enum":["block"]}+ },+ "required": ["type","action"],+ "additionalProperties": false+ }+ ]+ }+ },+ "required": ["type","id","applies_to","handler"],+ "additionalProperties": false+ }+ ]+ },+ "maxItems": 20+ },+ "preload": {+ "type": "object",+ "properties": {+ "tools": {+ "anyOf": [+ {"type":"array","items":{"type":"string"}},+ {"type":"string","enum":["all"]}+ ]+ }+ },+ "required": ["tools"],+ "additionalProperties": false+ },+ "connected_accounts": {+ "type": "object",+ "additionalProperties": {+ "type": "array",+ "items": {"type":"string","format":"connectedAccountId"},+ "minItems": 1+ }+ },+ "search": {"type":"object","properties":{"enable":{"type":"boolean","default":true}}},+ "execute": {+ "type": "object",+ "properties": {"enable_multi_execute":{"type":"boolean","default":true}}+ }+ },+ "required": ["user_id","instant","preload","search","execute"]+ },+ "config_version": {"type":"integer"},+ "experimental": {+ "type": "object",+ "properties": {+ "assistive_prompt": {"type":"string"},+ "custom_toolkits": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9_-]+$"},+ "name": {"type":"string","minLength":1,"maxLength":128},+ "description": {"type":"string","minLength":1,"maxLength":2048},+ "tools": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "slug": {"type":"string"},+ "name": {"type":"string","minLength":1,"maxLength":128},+ "description": {"type":"string","minLength":1,"maxLength":5120},+ "input_schema": {"type":"object","additionalProperties":{"nullable":true}},+ "output_schema": {"type":"object","additionalProperties":{"nullable":true}},+ "original_slug": {"type":"string"},+ "preload": {"type":"boolean"}+ },+ "required": ["slug","name","description","input_schema","original_slug"]+ }+ },+ "preload": {"type":"boolean"}+ },+ "required": ["slug","name","description","tools"]+ }+ },+ "custom_tools": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "slug": {"type":"string"},+ "name": {"type":"string","minLength":1,"maxLength":128},+ "description": {"type":"string","minLength":1,"maxLength":5120},+ "input_schema": {"type":"object","additionalProperties":{"nullable":true}},+ "output_schema": {"type":"object","additionalProperties":{"nullable":true}},+ "extends_toolkit": {"type":"string","minLength":1},+ "original_slug": {"type":"string"},+ "preload": {"type":"boolean"}+ },+ "required": ["slug","name","description","input_schema","original_slug"]+ }+ },+ "no_elicitation_support_fallback": {"type":"string","enum":["deny","allow"],"x-experimental":true},+ "source_session_config": {+ "type": "object",+ "properties": {"id":{"type":"string","format":"sessionConfigId"}},+ "required": ["id"],+ "x-experimental": true+ }+ },+ "x-experimental": true+ },+ "warnings": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "code": {+ "type": "string",+ "enum": ["PRELOAD_TOOLS_HIGH_CONTEXT_USAGE"],+ "example": "PRELOAD_TOOLS_HIGH_CONTEXT_USAGE"+ },+ "message": {+ "type": "string",+ "example": "Session preloads 25 tools; each preloaded tool adds to the agent context window. Consider keeping the list at or under ~20 tools."+ }+ },+ "required": ["code","message"]+ },+ "default": [],+ "example": [+ {+ "code": "PRELOAD_TOOLS_HIGH_CONTEXT_USAGE",+ "message": "Session preloads 25 tools; each preloaded tool adds to the agent context window. Consider keeping the list at or under ~20 tools."+ }+ ]+ }+ },+ "required": ["session_id","mcp","tool_router_tools","config","config_version"]+ }+ }+ }+ },+ "400": {+ "description": "Bad request. This may occur if the user_id format is invalid, toolkit names are invalid, or auth_config_id IDs are malformed.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "401": {+ "description": "Unauthorized. Authentication is required or the provided credentials are invalid.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "403": {+ "description": "Forbidden. The user is not authorized to create a tool router session.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "404": {+ "description": "Not found. The referenced Session config or another requested resource does not exist in this project.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "408": {+ "description": "Request timeout. The session creation took too long to complete.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "429": {+ "description": "Too many requests. The upstream service is rate limiting the request; retry after a short backoff.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ },+ "500": {+ "description": "Internal server error. An unexpected error occurred while processing the request.",+ "content": {"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}+ }+ }+ }+ }+ },+ "components": {+ "schemas": {+ "DeprecatedToolkitInfo": {+ "type": "object",+ "properties": {"toolkitId":{"type":"string"}},+ "required": ["toolkitId"],+ "deprecated": true,+ "example": {"toolkitId":"550e8400-e29b-41d4-a716-446655440000"}+ },+ "Error": {+ "type": "object",+ "properties": {+ "error": {+ "type": "object",+ "properties": {+ "message": {"type":"string"},+ "code": {"type":"number"},+ "slug": {"type":"string"},+ "status": {"type":"number"},+ "request_id": {"type":"string"},+ "suggested_fix": {"type":"string"},+ "errors": {"type":"array","items":{"type":"string"}}+ },+ "required": ["message","code","slug","status"]+ }+ },+ "required": ["error"]+ },+ "InstantAccount": {+ "type": "object",+ "properties": {+ "supported": {"type":"boolean","enum":[true]},+ "price": {"$ref":"#/components/schemas/ToolPricing"}+ },+ "required": ["supported"]+ },+ "Tool": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT"},+ "name": {"type":"string","example":"GitHub Actions"},+ "description": {+ "type": "string",+ "example": "Automate GitHub workflows including CI/CD, issue management, and release processes"+ },+ "toolkit": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"github"},+ "name": {"type":"string","example":"GitHub"},+ "logo": {+ "type": "string",+ "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"+ }+ },+ "required": ["slug","name","logo"]+ },+ "input_parameters": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "example": {+ "repo_name": {+ "type": "string",+ "description": "GitHub repository name in owner/repo format",+ "required": true,+ "example": "octocat/Hello-World"+ },+ "workflow_id": {+ "type": "string",+ "description": "ID or filename of the workflow to trigger",+ "required": true,+ "example": "main.yml"+ }+ }+ },+ "no_auth": {"type":"boolean","example":false},+ "available_versions": {"type":"array","items":{"type":"string"},"example":["20250905_00","20250906_00"]},+ "version": {"type":"string","example":"20250905_00"},+ "instant": {"$ref":"#/components/schemas/InstantAccount"},+ "output_parameters": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "example": {+ "run_id": {+ "type": "number",+ "description": "ID of the workflow run that was triggered",+ "example": 12345678+ },+ "status": {+ "type": "string",+ "description": "Status of the workflow run",+ "example": "completed",+ "enum": ["queued","in_progress","completed","failed"]+ }+ }+ },+ "scopes": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["https://www.googleapis.com/auth/gmail.modify"]+ },+ "scope_requirements": {+ "type": "object",+ "nullable": true,+ "properties": {+ "all_of": {+ "type": "array",+ "items": {+ "anyOf": [+ {"type":"string"},+ {+ "type": "object",+ "properties": {+ "any_of": {+ "type": "array",+ "items": {+ "anyOf": [+ {"type":"string"},+ {+ "type": "object",+ "properties": {+ "all_of": {"type":"array","items":{"type":"string"},"minItems":1},+ "source": {+ "type": "array",+ "items": {"type":"string","minLength":1},+ "minItems": 1+ }+ },+ "required": ["all_of"]+ }+ ]+ },+ "minItems": 1+ },+ "when": {+ "type": "object",+ "additionalProperties": {"type":"array","items":{"type":"string"},"minItems":1}+ },+ "source": {"type":"array","items":{"type":"string","minLength":1},"minItems":1}+ },+ "required": ["any_of"]+ }+ ]+ }+ },+ "source": {"type":"array","items":{"type":"string","minLength":1},"minItems":1}+ },+ "required": ["all_of"],+ "example": {"all_of":["read:user",{"any_of":["repo","public_repo"]}]}+ },+ "tags": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["ci-cd","github","automation","devops"]+ },+ "human_description": {"type":"string","example":"Create a new issue in a GitHub repository"},+ "is_deprecated": {"type":"boolean","example":false},+ "deprecated": {+ "type": "object",+ "properties": {+ "displayName": {"type":"string","example":"GitHub Actions"},+ "version": {"type":"string","example":"20250905_00"},+ "available_versions": {"type":"array","items":{"type":"string"},"example":["20250905_00","20250906_00"]},+ "is_deprecated": {"type":"boolean","example":false},+ "toolkit": {+ "type": "object",+ "properties": {+ "logo": {+ "type": "string",+ "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"+ }+ },+ "required": ["logo"]+ }+ },+ "required": ["displayName","version","available_versions","is_deprecated","toolkit"]+ }+ },+ "required": [+ "slug",+ "name",+ "description",+ "toolkit",+ "input_parameters",+ "no_auth",+ "available_versions",+ "version",+ "output_parameters",+ "scopes",+ "scope_requirements",+ "tags",+ "is_deprecated",+ "deprecated"+ ]+ },+ "ToolDetails": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT"},+ "name": {"type":"string","example":"GitHub Actions"},+ "description": {+ "type": "string",+ "example": "Automate GitHub workflows including CI/CD, issue management, and release processes"+ },+ "toolkit": {+ "type": "object",+ "properties": {+ "slug": {"type":"string","example":"github"},+ "name": {"type":"string","example":"GitHub"},+ "logo": {+ "type": "string",+ "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"+ }+ },+ "required": ["slug","name","logo"]+ },+ "input_parameters": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "example": {+ "repo_name": {+ "type": "string",+ "description": "GitHub repository name in owner/repo format",+ "required": true,+ "example": "octocat/Hello-World"+ },+ "workflow_id": {+ "type": "string",+ "description": "ID or filename of the workflow to trigger",+ "required": true,+ "example": "main.yml"+ }+ }+ },+ "no_auth": {"type":"boolean","example":false},+ "available_versions": {"type":"array","items":{"type":"string"},"example":["20250905_00","20250906_00"]},+ "version": {"type":"string","example":"20250905_00"},+ "instant": {"$ref":"#/components/schemas/InstantAccount"},+ "output_parameters": {+ "type": "object",+ "additionalProperties": {"nullable":true},+ "example": {+ "run_id": {+ "type": "number",+ "description": "ID of the workflow run that was triggered",+ "example": 12345678+ },+ "status": {+ "type": "string",+ "description": "Status of the workflow run",+ "example": "completed",+ "enum": ["queued","in_progress","completed","failed"]+ }+ }+ },+ "scopes": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["https://www.googleapis.com/auth/gmail.modify"]+ },+ "scope_requirements": {+ "type": "object",+ "nullable": true,+ "properties": {+ "all_of": {+ "type": "array",+ "items": {+ "anyOf": [+ {"type":"string"},+ {+ "type": "object",+ "properties": {+ "any_of": {+ "type": "array",+ "items": {+ "anyOf": [+ {"type":"string"},+ {+ "type": "object",+ "properties": {+ "all_of": {"type":"array","items":{"type":"string"},"minItems":1},+ "source": {+ "type": "array",+ "items": {"type":"string","minLength":1},+ "minItems": 1+ }+ },+ "required": ["all_of"]+ }+ ]+ },+ "minItems": 1+ },+ "when": {+ "type": "object",+ "additionalProperties": {"type":"array","items":{"type":"string"},"minItems":1}+ },+ "source": {"type":"array","items":{"type":"string","minLength":1},"minItems":1}+ },+ "required": ["any_of"]+ }+ ]+ }+ },+ "source": {"type":"array","items":{"type":"string","minLength":1},"minItems":1}+ },+ "required": ["all_of"],+ "example": {"all_of":["read:user",{"any_of":["repo","public_repo"]}]}+ },+ "tags": {+ "type": "array",+ "items": {"type":"string"},+ "example": ["ci-cd","github","automation","devops"]+ },+ "human_description": {"type":"string","example":"Create a new issue in a GitHub repository"},+ "is_deprecated": {"type":"boolean","example":false},+ "deprecated": {+ "type": "object",+ "properties": {+ "displayName": {"type":"string","example":"GitHub Actions"},+ "version": {"type":"string","example":"20250905_00"},+ "available_versions": {"type":"array","items":{"type":"string"},"example":["20250905_00","20250906_00"]},+ "is_deprecated": {"type":"boolean","example":false},+ "toolkit": {+ "type": "object",+ "properties": {+ "logo": {+ "type": "string",+ "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"+ }+ },+ "required": ["logo"]+ }+ },+ "required": ["displayName","version","available_versions","is_deprecated","toolkit"]+ }+ },+ "required": [+ "slug",+ "name",+ "description",+ "toolkit",+ "input_parameters",+ "no_auth",+ "available_versions",+ "version",+ "output_parameters",+ "scopes",+ "scope_requirements",+ "tags",+ "is_deprecated",+ "deprecated"+ ]+ },+ "ToolPricing": {+ "type": "object",+ "properties": {"description":{"type":"string"},"discount":{"type":"string","nullable":true}},+ "additionalProperties": false+ },+ "ToolsPaginated": {+ "type": "object",+ "properties": {+ "items": {"type":"array","items":{"$ref":"#/components/schemas/Tool"}},+ "next_cursor": {"type":"string","nullable":true},+ "total_pages": {"type":"number"},+ "current_page": {"type":"number"},+ "total_items": {"type":"number"}+ },+ "required": ["items","total_pages","current_page","total_items"]+ }+ }+ }+}diff --git a/server/pkg/composio/connected_accounts.go b/server/pkg/composio/connected_accounts.goindex 47fdc74b49..bb68501534 100644--- a/server/pkg/composio/connected_accounts.go+++ b/server/pkg/composio/connected_accounts.go@@ -90,7 +90,6 @@ type ListConnectedAccountsRequest struct {type ConnectedAccount struct {ID string `json:"id"`UserID string `json:"user_id"`- AuthConfigID string `json:"auth_config_id"`AuthConfig AuthConfigRef `json:"auth_config"`Toolkit Toolkit `json:"toolkit"`Status string `json:"status"`@@ -102,7 +101,7 @@ type ConnectedAccount struct {}// AuthConfigRef is the nested auth_config object Composio returns on connected-// accounts. Some responses also include the older top-level auth_config_id.+// accounts, the only place a connected account names its auth config.type AuthConfigRef struct {ID string `json:"id"`AuthScheme string `json:"auth_scheme,omitempty"`diff --git a/server/pkg/composio/toolkits.go b/server/pkg/composio/toolkits.goindex 1a961a4b5c..79731bae51 100644--- a/server/pkg/composio/toolkits.go+++ b/server/pkg/composio/toolkits.go@@ -17,7 +17,6 @@ type Toolkit struct {Name string `json:"name,omitempty"`LogoURL string `json:"logo,omitempty"`Description string `json:"description,omitempty"`- Categories []string `json:"categories,omitempty"`AuthSchemes []string `json:"auth_schemes,omitempty"`Meta map[string]any `json:"meta,omitempty"`// ComposioManagedAuthSchemes lists the schemes Composio can authenticate@@ -86,13 +85,20 @@ type ToolkitCategory struct {Name string}+// Logo returns the toolkit's logo URL: top-level on the toolkit nested in auth+// configs and tools, under meta in the toolkit list.+func (t Toolkit) Logo() string {+ if t.LogoURL != "" {+ return t.LogoURL+ }+ logo, _ := t.Meta["logo"].(string)+ return logo+}+// PrimaryCategory returns the first category the toolkit is listed under, or// a zero value when it has none. The v3.1 list endpoint nests categories under-// meta as {id, name} objects; a top-level list of names is read first.+// meta as {id, name} objects.func (t Toolkit) PrimaryCategory() ToolkitCategory {- if len(t.Categories) > 0 {- return ToolkitCategory{Name: t.Categories[0]}- }list, _ := t.Meta["categories"].([]any)for _, item := range list {switch v := item.(type) {