The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Domain from "@alchemy.run/domain"; |
| 2 | import * as Schema from "effect/Schema"; |
| 3 | import { TransferId } from "./Transfer.id.ts"; |
| 4 | |
| 5 | export class TransferFailed extends Domain.Event("TransferFailed", { |
| 6 | transferId: TransferId, |
| 7 | reason: Schema.String, |
| 8 | }) {} |
| 9 | |
| 10 | /** Reports an outcome, so it never rejects. */ |
| 11 | export class FailTransfer extends Domain.Command("FailTransfer", { |
| 12 | target: TransferId, |
| 13 | input: { reason: Schema.String }, |
| 14 | events: [TransferFailed], |
| 15 | }) {} |