mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
Organisation.features
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user