feat: define housekeeping foundation contracts
This commit is contained in:
1 parent
3b3d7780c9
commit
7d62a04f0e
10 files changed
+338
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import type { HousekeepingDomainId } from "../../migration/types";
|
||||
import type {
|
||||
CapabilityRequirement,
|
||||
HousekeepingCapabilityContext,
|
||||
} from "./capability";
|
||||
import type { HousekeepingResult } from "./result";
|
||||
|
||||
export interface HousekeepingCommand<I, O> {
|
||||
id: string;
|
||||
owner: HousekeepingDomainId;
|
||||
risk: "safe" | "sensitive";
|
||||
capability: CapabilityRequirement;
|
||||
requiresReason: boolean;
|
||||
execute(
|
||||
context: HousekeepingCapabilityContext,
|
||||
input: I,
|
||||
): Promise<HousekeepingResult<O>>;
|
||||
}
|
||||
Reference in new issue
Block a user