export const queryKeys = {
  startup: ["startup"],
  readiness: ["startup", "readiness"],
  projects: ["projects"],
  allProjectEdits: ["project-edit"],
  projectEdit: (projectID: string) => ["project-edit", projectID],
  attention: (projectID: string) => ["attention", projectID],
  allWorkspaces: ["workspaces"],
  workspaces: (projectID: string) => ["workspaces", projectID],
  allAttention: ["attention"],
  allBoards: ["board"],
  allWorkflows: ["workflow"],
  allWorkflowDefinitions: ["workflow-definition"],
  allWorkflowValidations: ["workflow-validation"],
  allWorkflowGraphLayouts: ["workflow-graph-layout"],
  allProjectWorkflowLinks: ["project-workflow-links"],
  allTasks: ["task"],
  allActivity: ["activity"],
  allComments: ["comments"],
  allPendingAsks: ["pending-asks"],
  board: (projectID: string, workflowID: string) => ["board", projectID, workflowID],
  workflows: (query: string) => ["workflow", query],
  workflowDefinition: (workflowID: string) => ["workflow-definition", workflowID],
  workflowDraftValidation: (
    workflowID: string,
    sourceVersion: number,
    version: number,
    metadataSignature: string,
  ) => ["workflow-draft-validation", workflowID, sourceVersion, version, metadataSignature],
  workflowDraftDerivedWiring: (workflowID: string, sourceVersion: number, graphSignature: string) => [
    "workflow-draft-derived-wiring",
    workflowID,
    sourceVersion,
    graphSignature,
  ],
  workflowValidation: (workflowID: string, mode: string) => ["workflow-validation", workflowID, mode],
  workflowScriptPathValidation: (workflowID: string, nodeID: string, scriptPath: string) => [
    "workflow-script-path-validation",
    workflowID,
    nodeID,
    scriptPath,
  ],
  workflowGraphLayout: (workflowID: string, version: number, valid: boolean, errors: readonly unknown[]) => [
    "workflow-graph-layout",
    workflowID,
    version,
    valid,
    errors,
  ],
  projectWorkflowLinks: (projectID: string) => ["project-workflow-links", projectID],
  boardNodeCardsRoot: (projectID: string, workflowID: string) => ["board-node-cards", projectID, workflowID],
  boardNodeCards: (projectID: string, workflowID: string, nodeID: string) => [
    "board-node-cards",
    projectID,
    workflowID,
    nodeID,
  ],
  task: (taskID: string) => ["task", taskID],
  activity: (taskID: string) => ["activity", taskID],
  comments: (taskID: string) => ["comments", taskID],
  pendingAsks: (sessionID: string) => ["pending-asks", sessionID],
};
