Fix team authorization, invite revocation, and slug handling
This commit is contained in:
@@ -3,7 +3,7 @@ export interface Team {
|
||||
slug: string;
|
||||
members: TeamMember[];
|
||||
multi_factor_required: boolean;
|
||||
created_at: string
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type TeamMemberRole = 'admin' | 'member';
|
||||
@@ -21,7 +21,6 @@ export interface TeamMember extends User {
|
||||
|
||||
export interface TeamInvite {
|
||||
invitedEmail: string;
|
||||
team: Team;
|
||||
invitedBy: User;
|
||||
invitedAt: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import type { Team, TeamInvite } from '@/types/models';
|
||||
|
||||
export type TeamEditPageProps = {
|
||||
team: Team;
|
||||
};
|
||||
|
||||
export type TeamShowPageProps = {
|
||||
team: Team;
|
||||
canManageTeam: boolean;
|
||||
teamInvites?: TeamInvite[];
|
||||
};
|
||||
|
||||
export type TeamIndexPageProps = {
|
||||
teams: Team[];
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
export type TeamSlugProps = {
|
||||
name: string;
|
||||
ignoredSlug?: string;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export type TeamSlugRequest = {
|
||||
name: string;
|
||||
ignored_slug: string | null;
|
||||
};
|
||||
|
||||
export type TeamSlugResponse = {
|
||||
name: string;
|
||||
slug: string;
|
||||
taken: boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user