mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
feat: add getMyAccess request/response schemas
This commit is contained in:
parent
fdfba4bb4a
commit
86cac96fe0
1 changed files with 17 additions and 0 deletions
|
|
@ -239,6 +239,21 @@ export const acceptInviteResponse = z.object({
|
||||||
search_space_id: z.number(),
|
search_space_id: z.number(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get my access
|
||||||
|
*/
|
||||||
|
export const getMyAccessRequest = z.object({
|
||||||
|
search_space_id: z.number(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getMyAccessResponse = z.object({
|
||||||
|
user_id: z.string(),
|
||||||
|
search_space_id: z.number(),
|
||||||
|
is_owner: z.boolean(),
|
||||||
|
permissions: z.array(z.string()),
|
||||||
|
role_name: z.string().nullable(),
|
||||||
|
});
|
||||||
|
|
||||||
export type Role = z.infer<typeof role>;
|
export type Role = z.infer<typeof role>;
|
||||||
export type Membership = z.infer<typeof membership>;
|
export type Membership = z.infer<typeof membership>;
|
||||||
export type Invite = z.infer<typeof invite>;
|
export type Invite = z.infer<typeof invite>;
|
||||||
|
|
@ -274,3 +289,5 @@ export type GetInviteInfoRequest = z.infer<typeof getInviteInfoRequest>;
|
||||||
export type GetInviteInfoResponse = z.infer<typeof getInviteInfoResponse>;
|
export type GetInviteInfoResponse = z.infer<typeof getInviteInfoResponse>;
|
||||||
export type AcceptInviteRequest = z.infer<typeof acceptInviteRequest>;
|
export type AcceptInviteRequest = z.infer<typeof acceptInviteRequest>;
|
||||||
export type AcceptInviteResponse = z.infer<typeof acceptInviteResponse>;
|
export type AcceptInviteResponse = z.infer<typeof acceptInviteResponse>;
|
||||||
|
export type GetMyAccessRequest = z.infer<typeof getMyAccessRequest>;
|
||||||
|
export type GetMyAccessResponse = z.infer<typeof getMyAccessResponse>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue