import type { UniqueID } from "@repo/rdx-ddd"; import type { Result } from "@repo/rdx-utils"; import type { SupportConnection } from "../domain/support-connection.aggregate"; import type { SupportTool } from "../domain/support-tool.aggregate"; import type { SupportError } from "../domain/support-values"; export type SupportContext = Readonly<{ connections: readonly SupportConnection[]; tools: readonly SupportTool[]; assetRetired: boolean; actorNames: ReadonlyMap; }>; export interface ISupportRepository { remove(company: UniqueID, asset: UniqueID, id: UniqueID): Promise>; get(company: UniqueID, asset: UniqueID): Promise>; save( company: UniqueID, asset: UniqueID, action: (context: SupportContext) => Result ): Promise< Result<{ connection: SupportConnection; actorNames: ReadonlyMap }, SupportError> >; tools(): Promise; saveTool( action: (tools: readonly SupportTool[]) => Result ): Promise>; }