export type LauncherGlobalRole =
  | "root_admin"
  | "support_admin"
  | "client_owner"
  | "client_admin"
  | "member";

export type LauncherUserStatus = "invited" | "active" | "blocked";

export interface LauncherUser {
  id: string;
  authentikUserId?: string | null;
  email: string;
  name: string;
  phone?: string | null;
  position?: string | null;
  notes?: string | null;
  avatarUrl?: string | null;
  globalStatus: LauncherUserStatus;
  createdAt: string;
  updatedAt: string;
}

export type ClientMembershipRole = "client_owner" | "client_admin" | "member";
export type ClientMembershipStatus = "active" | "disabled";
export type CoreAssistantAccessRole = "blocked" | "member" | "admin";

export interface ClientMembership {
  id: string;
  clientId: string;
  userId: string;
  role: ClientMembershipRole;
  status: ClientMembershipStatus;
  coreAssistantRole?: CoreAssistantAccessRole;
  invitedByUserId?: string | null;
  inviteId?: string | null;
  source?: "launcher" | "access_request" | "tasker_workspace_invite" | "engine_workflow_access_request" | null;
  sourceTaskerInviteRequestId?: string | null;
  sourceEngineWorkflowAccessRequestId?: string | null;
  createdAt: string;
  updatedAt: string;
}

export interface ClientGroup {
  id: string;
  clientId: string;
  name: string;
  description?: string | null;
  memberIds: string[];
  createdAt: string;
  updatedAt: string;
}
