mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
feat: create permissions.types.ts with single responsibility
This commit is contained in:
parent
86cac96fe0
commit
ec9ed9d215
1 changed files with 17 additions and 0 deletions
17
surfsense_web/contracts/types/permissions.types.ts
Normal file
17
surfsense_web/contracts/types/permissions.types.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
export const permissionInfo = z.object({
|
||||||
|
value: z.string(),
|
||||||
|
name: z.string(),
|
||||||
|
category: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get permissions
|
||||||
|
*/
|
||||||
|
export const getPermissionsResponse = z.object({
|
||||||
|
permissions: z.array(permissionInfo),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type PermissionInfo = z.infer<typeof permissionInfo>;
|
||||||
|
export type GetPermissionsResponse = z.infer<typeof getPermissionsResponse>;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue