{"openapi":"3.1.0","info":{"title":"Multi-Map RESTful Graph API","version":"1.0.0","description":"Comprehensive RESTful API for programmatically reading, querying, mutating, and sharing spatial graph mind-maps within the Multi-Map operating system.","contact":{"name":"Multi-Map Support","url":"https://multimap.me/info?tab=api"}},"servers":[{"url":"https://multimap.me","description":"Production Edge Gateway (Recommended — paths include /api/v1 prefix)"},{"url":"http://localhost:5173","description":"Local Development Proxy (paths include /api/v1 prefix)"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"paths":{"/api/v1/stage":{"post":{"summary":"Zero-Auth Map Staging","description":"Creates a temporary 7-day staged map draft from Universal Tagged Markdown or MapState JSON without requiring authentication. Returns a stable forkUrl and a private editKey for in-place revisions.","security":[],"parameters":[{"name":"mapType","in":"query","schema":{"type":"string","enum":["generic","colab","plan","web","prompt","agent","file","flow","orbital","person"],"default":"generic"}},{"name":"collab","in":"query","schema":{"type":"string","enum":["keyed","open"],"default":"keyed"}},{"name":"linkedRoomToken","in":"query","schema":{"type":"string"},"description":"Optional parent collaboration room token (tok_...) to spin off a linked phase room"},{"name":"title","in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Draft staged successfully; returns token, editKey, forkUrl, and expiresAt."},"400":{"description":"Invalid or empty payload."},"413":{"description":"Payload exceeds 512 KB or 500 node limit."}}}},"/api/v1/stage/{token}":{"put":{"summary":"Revise Staged Map In-Place","description":"Updates an existing staged draft in-place while preserving its forkUrl. Requires the X-Edit-Key header returned at creation.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Edit-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Draft updated in-place; forkUrl unchanged."},"401":{"description":"Missing X-Edit-Key header."},"403":{"description":"Invalid X-Edit-Key."},"404":{"description":"Staged draft not found."},"410":{"description":"Staged draft has expired."}}}},"/api/v1/fork/{token}":{"get":{"summary":"Preview Staged Map Draft","description":"Publicly reads a staged draft for interactive browser preview or AI agent inspection. Supports ?format=markdown for token-efficient Tagged Markdown output.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","markdown"],"default":"json"}}],"responses":{"200":{"description":"Staged map payload (JSON or text/markdown)."},"404":{"description":"Staged draft not found."},"410":{"description":"Staged draft has expired."}}}},"/api/v1/fork/{token}/accept":{"post":{"summary":"Record Fork Acceptance","description":"Increments the fork count when a user accepts a staged map into their workspace.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fork acceptance recorded."},"404":{"description":"Staged draft not found."},"410":{"description":"Staged draft has expired."}}}},"/api/v1/resolve":{"get":{"summary":"Resolve Canonical Multi-Map URL","description":"Edge resolver that converts any Multi-Map canonical browser URL (/@handle/projects/slug/maps/slug) into structured IDs and API endpoints.","security":[],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Resolved handle, projectId, mapId, and endpoint metadata."}}}},"/api/v1/assistant":{"post":{"summary":"Assistant Action Planner & Auto-Navigation","description":"Stateless AI assistant endpoint that processes natural language requests against a Sitemap State Graph (SSG) and returns structured Action Manifests containing navigation targets, graph mutations, and project lifecycle commands for optimistic client execution.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"User natural language command or question"},"ssg":{"type":"object","description":"Sitemap State Graph representing active route, engine, project, and canvas nodes","properties":{"location":{"type":"object","properties":{"route":{"type":"string"},"engine":{"type":"string"},"drawer":{"type":"string"},"modal":{"type":"string"}}},"project":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"pages":{"type":"array","items":{"type":"object"}}}},"graph":{"type":"object","properties":{"mapId":{"type":"string"},"title":{"type":"string"},"selectedNodeId":{"type":"string"},"nodes":{"type":"array","items":{"type":"object"}},"connections":{"type":"array","items":{"type":"object"}}}}}},"history":{"type":"array","items":{"type":"object","properties":{"sender":{"type":"string","enum":["user","assistant","system"]},"text":{"type":"string"}}}},"userApiKey":{"type":"string","description":"Optional user-provided Gemini API key override"},"model":{"type":"string","default":"gemini-2.5-flash"}}}}}},"responses":{"200":{"description":"Action Manifest with conversational reply and structured instructions","content":{"application/json":{"schema":{"type":"object","properties":{"replyText":{"type":"string"},"manifest":{"type":"object","properties":{"navigate":{"type":"object","nullable":true},"graphMutations":{"type":"array","items":{"type":"object"}},"projectMutations":{"type":"array","items":{"type":"object"}}}},"usage":{"type":"object","properties":{"tokens_in":{"type":"integer"},"tokens_out":{"type":"integer"},"latency_ms":{"type":"integer"}}},"quota":{"type":"object"}}}}}},"400":{"description":"Bad Request (missing prompt)"},"429":{"description":"Rate Limit or Daily Token Quota Exceeded"},"500":{"description":"Internal Server Error"}}}},"/api/v1/maps":{"get":{"summary":"List Maps","description":"Lists all accessible maps across personal projects, collaborative spaces, and active shares.","parameters":[{"name":"projectId","in":"query","schema":{"type":"string"},"description":"Filter by specific project ID (e.g. default_project)"},{"name":"scope","in":"query","schema":{"type":"string","enum":["all","mine","shared","colab"],"default":"all"},"description":"Map ownership/access scope"},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Filter maps by meta tag"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Search term for map title or description"},{"name":"limit","in":"query","schema":{"type":"integer","default":50},"description":"Maximum number of map summaries to return"}],"responses":{"200":{"description":"List of map metadata summaries","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"count":{"type":"integer"},"maps":{"type":"array","items":{"$ref":"#/components/schemas/MapSummary"}}}}}}}}},"post":{"summary":"Create Map","description":"Creates a new map from raw MapState JSON, a nested hierarchical tree, a list array, or a Markdown outline.","parameters":[{"name":"projectId","in":"query","schema":{"type":"string","default":"default_project"}},{"name":"format","in":"query","schema":{"type":"string","enum":["mapstate","tree","list","markdown","auto"],"default":"auto"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MapState"},{"type":"object","description":"Tree or Key-Value structure"},{"type":"array","items":{"type":"string"},"description":"Item list"}]}},"text/markdown":{"schema":{"type":"string","description":"Markdown outline with # headings and - bullets"}}}},"responses":{"201":{"description":"Map created successfully","headers":{"ETag":{"schema":{"type":"string"},"description":"Current revision ETag"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"mapId":{"type":"string"},"map":{"$ref":"#/components/schemas/MapState"}}}}}}}}},"/api/v1/maps/{mapId}":{"get":{"summary":"Get Map by ID","description":"Fetches the complete spatial graph for a given map ID or share token.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","schema":{"type":"string","enum":["submaps","none"],"default":"none"},"description":"Whether to recursively inline child submaps/portals"},{"name":"depth","in":"query","schema":{"type":"integer","default":1},"description":"Submap recursion depth"},{"name":"format","in":"query","schema":{"type":"string","enum":["json","tree","markdown","tagged-markdown"],"default":"json"},"description":"Desired serialization format"}],"responses":{"200":{"description":"The requested map graph","headers":{"ETag":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapState"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Map not found"}}},"put":{"summary":"Replace Map","description":"Overwrites the entire MapState document. Supports If-Match header for optimistic concurrency control.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"},"description":"Revision ETag required for concurrency verification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapState"}}}},"responses":{"200":{"description":"Map updated successfully"},"409":{"description":"Conflict: Map modified by another session"}}},"patch":{"summary":"Patch Map Metadata","description":"Updates partial map metadata (title, description, tags, settings).","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapMeta"}}}},"responses":{"200":{"description":"Map metadata updated"}}},"delete":{"summary":"Delete Map","description":"Deletes a map document from the user project workspace.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Map deleted successfully"}}}},"/api/v1/maps/{mapId}/nodes":{"get":{"summary":"List Nodes","description":"Returns all nodes inside the specified map with optional type and query filters.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"query","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of nodes","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"count":{"type":"integer"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/MapNode"}}}}}}}}},"post":{"summary":"Add Node","description":"Appends a new node into the map and optionally creates a structural connection to a parent node.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"type":{"type":"string","default":"concept"},"content":{"type":"string"},"parentId":{"type":"string"},"connectionType":{"type":"string","default":"structural"},"x":{"type":"number"},"y":{"type":"number"},"data":{"type":"object"}}}}}},"responses":{"201":{"description":"Node created and linked"}}}},"/api/v1/maps/{mapId}/nodes/{nodeId}":{"get":{"summary":"Get Node","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested node and its immediate connections","content":{"application/json":{"schema":{"type":"object","properties":{"node":{"$ref":"#/components/schemas/MapNode"},"connections":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}}}}}}}}},"patch":{"summary":"Update Node","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"type":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Node updated"}}},"delete":{"summary":"Delete Node","description":"Deletes a node and cascades removal of any connected edges.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Node and connected edges deleted"}}}},"/api/v1/maps/{mapId}/connections":{"get":{"summary":"List Connections","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of edge connections","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"connections":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}}}}}}}}},"post":{"summary":"Create Connection","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string","enum":["structural","association","flow","dependency"],"default":"structural"},"label":{"type":"string"}}}}}},"responses":{"201":{"description":"Connection created"}}}},"/api/v1/maps/{mapId}/connections/{connId}":{"delete":{"summary":"Delete Connection","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Connection deleted"}}}},"/api/v1/maps/{mapId}/batch":{"post":{"summary":"Atomic Batch Mutation","description":"Executes multiple node and connection additions, edits, and deletions in a single transaction.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["operations"],"properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/BatchOperation"}}}}}}},"responses":{"200":{"description":"Batch executed successfully"}}}},"/api/v1/maps/{mapId}/share":{"post":{"summary":"Publish Share Link","description":"Publishes the map to public shared_maps with optional expiration in days.","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInDays":{"type":"integer","default":30}}}}}},"responses":{"200":{"description":"Share published","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"shareUrl":{"type":"string"},"token":{"type":"string"},"expiresAt":{"type":"string"}}}}}}}},"delete":{"summary":"Revoke Share Link","parameters":[{"name":"mapId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Share link revoked"}}}},"/api/v1/shared/{shareToken}":{"get":{"summary":"Get Public Shared Map","description":"Unauthenticated public read endpoint for shared constellations.","security":[],"parameters":[{"name":"shareToken","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public map state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapState"}}}}}}},"/api/v1/health":{"get":{"summary":"Gateway health, protocol version, and registered MCP tools","tags":["Agent Desk & Health"],"responses":{"200":{"description":"Healthy status payload"}}}},"/api/v1/stage/{token}/nodes":{"patch":{"summary":"Surgically upsert/remove nodes and typed stance connections on a staged or open-collab room","description":"Recommended write path for multi-AI collaboration rooms (collab=open). Supports optimistic concurrency via If-Match: <revision> and author attribution via X-Source-Client.","tags":["Staging & Multi-AI Collab"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Staged room token (e.g. tok_...)"},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Expected current revision number (returns 409 REVISION_CONFLICT on stale writes)"},{"name":"X-Source-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Author attribution label (e.g. ChatGPT, Grok, Gemini, Claude, Antigravity)"},{"name":"X-Edit-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Required only for keyed drafts; omit for collab=open rooms"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upsertNodes":{"type":"array","description":"Nodes to insert or update in-place by id.","items":{"type":"object","required":["id","title"],"properties":{"id":{"type":"string","example":"grok_note_1"},"parentId":{"type":"string","description":"Parent node ID for structural attachment"},"type":{"type":"string","default":"note"},"title":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["todo","in-progress","in-review","done","blocked"]},"priority":{"type":"string","enum":["low","med","high","urgent"]},"progress":{"type":"number"},"phaseMeta":{"type":"object","description":"Optional phase engine attribution metadata (engine, mapType, promotedFromId, proposalState)"},"projectRef":{"type":"object","description":"Optional canonical project/map/node reference"},"author":{"type":"string"}}}},"removeNodeIds":{"type":"array","items":{"type":"string"}},"addConnections":{"type":"array","description":"Cross-branch or stance connections to add.","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string","enum":["association","flow","dependency","assignment","agree","disagree","question","build-on"]},"label":{"type":"string"}}}},"removeConnections":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"id":{"type":"string"}}}},"phaseContext":{"type":"object","description":"Optional multi-phase context: { activeEngine, intent, sourceEngine }","properties":{"activeEngine":{"type":"string"},"intent":{"type":"string"},"sourceEngine":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Patch applied and revision incremented"},"404":{"description":"Staged room not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredError"}}}},"409":{"description":"Optimistic concurrency revision conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredError"}}}}}}},"/api/v1/fork/{token}/changes":{"get":{"summary":"Read compact revision change feed since revision N","tags":["Staging & Multi-AI Collab"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"integer","default":0},"description":"Return only revisions strictly greater than this number"}],"responses":{"200":{"description":"Compact revisionLog entries and touched node summaries"},"404":{"description":"Staged room not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredError"}}}}}}},"/api/v1/desk":{"get":{"summary":"Read the permanent append-only Multi-Map Agent Desk","tags":["Agent Desk & Health"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["md","json"],"default":"md"}}],"responses":{"200":{"description":"Permanent Agent Desk in Markdown or JSON"}}}},"/api/v1/desk/ask":{"post":{"summary":"Append a question, check-in, or feature proposal to the permanent Agent Desk","tags":["Agent Desk & Health"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":160},"content":{"type":"string","maxLength":2000},"category":{"type":"string","enum":["question","proposal","checkin"],"default":"question"},"sourceClient":{"type":"string"}}}}}},"responses":{"201":{"description":"Appended to Agent Desk"},"429":{"description":"Rate limit exceeded"}}}},"/api/v1/stage/{token}/webhooks":{"post":{"summary":"Register a signed HTTPS webhook callback for staged room updates (Layer 2)","tags":["Staging & Multi-AI Collab"],"security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"subscriberClient":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["patch","spinoff","human_note"]}},"mentions":{"type":"array","items":{"type":"string"}},"cooldownSeconds":{"type":"number","default":5}}}}}},"responses":{"201":{"description":"Webhook created with signingSecret + manageToken"},"400":{"description":"Invalid or disallowed SSRF URL"}}},"get":{"summary":"List sanitized webhook subscriptions on a staged room","tags":["Staging & Multi-AI Collab"],"security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sanitized list of registered webhooks (secrets omitted)"}}}},"/api/v1/stage/{token}/webhooks/{webhookId}":{"delete":{"summary":"Delete a room webhook subscription","tags":["Staging & Multi-AI Collab"],"security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Manage-Token","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook removed"},"403":{"description":"Invalid manageToken or X-Edit-Key"}}}},"/api/v1/architecture":{"get":{"summary":"Read Multi-Map live system architecture overview (architecture.md)","tags":["Agent Desk & Health"],"security":[],"parameters":[{"name":"section","in":"query","required":false,"schema":{"type":"string"},"description":"Optional heading filter substring"}],"responses":{"200":{"description":"Architecture overview in text/markdown"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Personal or Service API Key (mm_live_...)"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Firebase Auth ID Token"}},"schemas":{"MapSummary":{"type":"object","properties":{"map_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"node_count":{"type":"integer"},"connection_count":{"type":"integer"},"created":{"type":"string"},"last_modified":{"type":"string"},"project_id":{"type":"string"},"shared":{"type":"boolean"},"share_token":{"type":"string","nullable":true},"source":{"type":"string","enum":["project","collaborative","shared"]},"writable":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"revision":{"type":"string"}}},"MapState":{"type":"object","required":["map_id","meta","nodes","connections"],"properties":{"map_id":{"type":"string"},"meta":{"$ref":"#/components/schemas/MapMeta"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/MapNode"}},"connections":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}}}},"MapMeta":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"created":{"type":"string"},"last_modified":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string"},"shared":{"type":"boolean"},"share_token":{"type":"string","nullable":true}}},"MapNode":{"type":"object","required":["id","title","type","data"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"content":{"type":"string"},"data":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"isCore":{"type":"boolean"},"collapsed":{"type":"boolean"},"color":{"type":"string"}}},"submap":{"type":"object"}}},"Connection":{"type":"object","required":["id","from","to"],"properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string","enum":["structural","association","flow","dependency","assignment","agree","disagree","question","build-on"]},"label":{"type":"string"}}},"StructuredError":{"type":"object","required":["ok","requestId","operation","errorCode","message"],"properties":{"ok":{"type":"boolean","enum":[false]},"requestId":{"type":"string","example":"http_mx4d0bbj_bb8daf"},"operation":{"type":"string","example":"fork_get_staged_map"},"errorCode":{"type":"string","example":"STAGE_NOT_FOUND"},"message":{"type":"string"},"error":{"type":"string"}}},"BatchOperation":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["add_node","update_node","delete_node","add_connection","delete_connection"]},"nodeId":{"type":"string"},"node":{"type":"object"},"connectionId":{"type":"string"},"connection":{"type":"object"}}}}}}