@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 17 lines 638 Bytes
Raw
1 import * as Domain from "@alchemy.run/domain";
2 import * as Schema from "effect/Schema";
3 import { CustomerId } from "./Customer.id.ts";
4 import { Username } from "./Username.ts";
5
6 /** The registration failed; the customer may register again. */
7 export class RegistrationRejected extends Domain.Event("RegistrationRejected", {
8 username: Username,
9 reason: Schema.String,
10 }) {}
11
12 /** The username could not be claimed. Reports an outcome, so it never rejects. */
13 export class RejectRegistration extends Domain.Command("RejectRegistration", {
14 target: CustomerId,
15 input: { reason: Schema.String },
16 events: [RegistrationRejected],
17 }) {}