Restructure MIs to more generic Identity

This commit is contained in:
Tuan Dang
2023-12-09 22:18:38 +07:00
parent 89d0c0e3c3
commit 50ef23e8a0
102 changed files with 3652 additions and 2981 deletions
+26
View File
@@ -0,0 +1,26 @@
import { z } from "zod";
import { NO_ACCESS } from "../variables";
export const CreateIdentityV1 = z.object({
body: z.object({
name: z.string().trim(),
organizationId: z.string().trim(),
role: z.string().trim().min(1).default(NO_ACCESS)
})
});
export const UpdateIdentityV1 = z.object({
params: z.object({
identityId: z.string()
}),
body: z.object({
name: z.string().trim().optional(),
role: z.string().trim().min(1).optional()
}),
});
export const DeleteIdentityV1 = z.object({
params: z.object({
identityId: z.string()
}),
});