feat(httpapi): bridge catalog read endpoints (#24353)

This commit is contained in:
Kit Langton
2026-04-25 14:00:30 -04:00
committed by GitHub
parent 705f792e87
commit eb0219988b
9 changed files with 208 additions and 81 deletions
+5 -4
View File
@@ -22,13 +22,14 @@ export const Action = Schema.Literals(["allow", "deny", "ask"])
.pipe(withStatics((s) => ({ zod: zod(s) })))
export type Action = Schema.Schema.Type<typeof Action>
export class Rule extends Schema.Class<Rule>("PermissionRule")({
export const Rule = Schema.Struct({
permission: Schema.String,
pattern: Schema.String,
action: Action,
}) {
static readonly zod = zod(this)
}
})
.annotate({ identifier: "PermissionRule" })
.pipe(withStatics((s) => ({ zod: zod(s) })))
export type Rule = Schema.Schema.Type<typeof Rule>
export const Ruleset = Schema.mutable(Schema.Array(Rule))
.annotate({ identifier: "PermissionRuleset" })