import httpRequest, { type BaseResponse } from "../httpRequest"; import { addTxnRecord } from "../txn"; import type { OperationCmd } from "./cmdTypes"; export function debugCmd(params: { command: OperationCmd; params: Record }) { const commandId = addTxnRecord({ ...params, category: "debug" }); return httpRequest>({ url: "/api/cmd/", params: { ...params, commandId }, method: "POST" }); } export function taskCmd(params: { command: OperationCmd; params: Record }) { const commandId = addTxnRecord({ ...params, category: "task" }); return httpRequest>({ url: "/api/cmd/", params: { ...params, commandId }, method: "POST" }); }