export interface Entity {
	id: string;
	label: string;
}

export interface Role {
	id: string;
	entityID: string;
	permissions: string[];
	label: string;
}

export interface EntityWithRoles extends Entity {
	roles: Role[];
}

export type WithEntity<T> = T extends {entities: {id: string; role: string}[]}
	? Omit<T, "entities"> & {entities: {entity?: Entity; role?: Role}[]}
	: T;
