Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
557 B
Raw Blame
import { queryOptions } from "@tanstack/react-query";
import { api } from "../api";

export const weixinKeys = {
  all: (wsId: string) => ["weixin", wsId] as const,
  installations: (wsId: string) =>
    [...weixinKeys.all(wsId), "installations"] as const,
  login: (wsId: string, id: string) =>
    [...weixinKeys.all(wsId), "login", id] as const,
};

export const weixinInstallationsOptions = (wsId: string) =>
  queryOptions({
    queryKey: weixinKeys.installations(wsId),
    queryFn: () => api.listWeixinInstallations(wsId),
    enabled: !!wsId,
  });