feat(id): brand PermissionID, PtyID, QuestionID, and ToolID (#17042)

This commit is contained in:
Kit Langton
2026-03-11 21:49:57 -04:00
committed by GitHub
parent b0bca6342e
commit 2a4dedc210
19 changed files with 127 additions and 52 deletions

View File

@@ -3,13 +3,13 @@ import { Schema } from "effect"
import { withStatics } from "@/util/schema"
export const AccountID = Schema.String.pipe(
Schema.brand("AccountId"),
Schema.brand("AccountID"),
withStatics((s) => ({ make: (id: string) => s.makeUnsafe(id) })),
)
export type AccountID = Schema.Schema.Type<typeof AccountID>
export const OrgID = Schema.String.pipe(
Schema.brand("OrgId"),
Schema.brand("OrgID"),
withStatics((s) => ({ make: (id: string) => s.makeUnsafe(id) })),
)
export type OrgID = Schema.Schema.Type<typeof OrgID>