refactor(contracts): compose DesktopApi from per-domain sub-interfaces
Split the flat 134-method DesktopApi interface into 12 domain sub-interfaces (companies, agents, tasks, runs, approvals, communication, threads, credentials, skills, budget, automation, window) under src/shared/contracts/desktop-api/. desktop-api.ts now intersects them to preserve the exact external flat shape; window.agentCompany consumers and preload wiring are untouched.
This commit is contained in:
1 parent
0f881097bc
commit
5f147e0b9a
14 files changed
+319
-283
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import type { z } from "zod";
|
||||
import type { ApprovalRecord } from "../../types";
|
||||
import type { approvalDecisionSchema, approvalInputSchema } from "../schemas-approvals";
|
||||
import type { deleteEntitySchema, entityGetterSchema } from "../schemas-badges";
|
||||
import type { DesktopResult } from "./common";
|
||||
|
||||
export type ApprovalsApi = {
|
||||
requestApproval: (input: z.infer<typeof approvalInputSchema>) => Promise<DesktopResult<string>>;
|
||||
decideApproval: (input: z.infer<typeof approvalDecisionSchema>) => Promise<DesktopResult<boolean>>;
|
||||
deleteApproval: (input: z.infer<typeof deleteEntitySchema>) => Promise<DesktopResult<boolean>>;
|
||||
getApproval: (input: z.infer<typeof entityGetterSchema>) => Promise<DesktopResult<ApprovalRecord>>;
|
||||
};
|
||||
Reference in new issue
Block a user