2026-03-25 14:47:40 +00:00
|
|
|
import { Schema } from "effect"
|
|
|
|
|
|
|
|
|
|
import { Identifier } from "@/id/id"
|
2026-06-25 15:42:22 +00:00
|
|
|
import { statics } from "@opencode-ai/core/schema"
|
2026-03-25 14:47:40 +00:00
|
|
|
|
2026-05-10 03:12:21 +00:00
|
|
|
export const EventID = Schema.String.check(Schema.isStartsWith("evt")).pipe(
|
2026-03-25 14:47:40 +00:00
|
|
|
Schema.brand("EventID"),
|
2026-06-25 15:42:22 +00:00
|
|
|
statics((s) => ({
|
2026-04-11 03:06:28 +00:00
|
|
|
ascending: (id?: string) => s.make(Identifier.ascending("event", id)),
|
2026-03-25 14:47:40 +00:00
|
|
|
})),
|
|
|
|
|
)
|