Organisation.features

This commit is contained in:
2026-01-24 14:49:01 +00:00
parent 1c763d74d5
commit 9d8aee7a74
8 changed files with 953 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import {
USER_NAME_MAX_LENGTH,
USER_USERNAME_MAX_LENGTH,
} from "./constants";
import { DEFAULT_FEATURES } from "./schema";
// error response
@@ -164,6 +165,13 @@ export const OrgUpdateRequestSchema = z.object({
`Status keys must be <= ${ISSUE_STATUS_MAX_LENGTH} characters`,
)
.optional(),
features: z
.record(z.boolean())
.refine(
(obj) => Object.keys(obj).length === Object.keys(DEFAULT_FEATURES).length,
"Features must include all default features",
)
.optional(),
});
export type OrgUpdateRequest = z.infer<typeof OrgUpdateRequestSchema>;