Files
openconcho/src/api/keys.ts
Offending Commit 45e0183439 feat: wire all remaining API endpoints
- src/api/keys.ts: QK singleton for all 20+ query key patterns
- src/api/queries.ts: rewritten with QK + full mutation coverage:
  deleteWorkspace, updateWorkspace, scheduleDream,
  updatePeer, setPeerCard, searchPeer,
  deleteSession, updateSession, cloneSession, searchSession,
  createMessages, updateMessage,
  useSessionPeers, addPeersToSession, setSessionPeers,
  removePeersFromSession, setPeerConfig,
  createConclusion, deleteConclusion,
  useWebhooks, createWebhook, deleteWebhook, testWebhook,
  createKey

Shared primitives (just-in-time):
- ConfirmDialog: animated modal with keyboard/click-out dismiss
- FormModal: reusable modal shell
- InlineEditor: click-to-edit with commit/cancel

New surfaces:
- WorkspaceDetail: delete + schedule dream buttons
- ScheduleDreamModal: Zod-validated observer/session form
- WebhookManager: full CRUD + test emit (new /webhooks route)
- SessionDetail: delete, clone, session search, peer membership tab
- PeerDetail: editable peer card, semantic search tab
- ConclusionBrowser: create conclusion modal (Zod), per-row delete
2026-04-24 21:42:04 -05:00

32 lines
1.8 KiB
TypeScript

export const QK = {
workspaces: (page: number, size: number) => ["workspaces", page, size] as const,
workspace: (id: string) => ["workspace", id] as const,
queueStatus: (wsId: string) => ["queue-status", wsId] as const,
workspaceSearch: (wsId: string, q: string) => ["workspace-search", wsId, q] as const,
peers: (wsId: string, page: number, size: number) => ["peers", wsId, page, size] as const,
peer: (wsId: string, pId: string) => ["peer", wsId, pId] as const,
peerRepresentation: (wsId: string, pId: string) => ["peer-representation", wsId, pId] as const,
peerCard: (wsId: string, pId: string) => ["peer-card", wsId, pId] as const,
peerContext: (wsId: string, pId: string) => ["peer-context", wsId, pId] as const,
peerSessions: (wsId: string, pId: string, page: number, size: number) =>
["peer-sessions", wsId, pId, page, size] as const,
sessions: (wsId: string, page: number, size: number) => ["sessions", wsId, page, size] as const,
session: (wsId: string, sId: string) => ["session", wsId, sId] as const,
sessionMessages: (wsId: string, sId: string, page: number, size: number) =>
["session-messages", wsId, sId, page, size] as const,
sessionSummaries: (wsId: string, sId: string) => ["session-summaries", wsId, sId] as const,
sessionContext: (wsId: string, sId: string) => ["session-context", wsId, sId] as const,
sessionPeers: (wsId: string, sId: string) => ["session-peers", wsId, sId] as const,
peerConfig: (wsId: string, sId: string, pId: string) =>
["peer-config", wsId, sId, pId] as const,
conclusions: (wsId: string, filters: Record<string, unknown>, page: number, size: number) =>
["conclusions", wsId, filters, page, size] as const,
conclusionsQuery: (wsId: string, q: string, filters: Record<string, unknown>) =>
["conclusions-query", wsId, q, filters] as const,
webhooks: (wsId: string) => ["webhooks", wsId] as const,
};