export type ClientType = "company" | "person";
export type ClientStatus = "active" | "suspended" | "demo" | "expired";
export type TaskManagerWorkspaceManagedBy = "launcher" | "tasker";

export interface ClientTaskManagerWorkspaceBinding {
  slug: string;
  name?: string | null;
  isPrimary?: boolean;
  managedBy?: TaskManagerWorkspaceManagedBy;
}

export interface Client {
  id: string;
  type: ClientType;
  name: string;
  legalName?: string | null;
  inn?: string | null;
  status: ClientStatus;
  contractStartsAt?: string | null;
  contractEndsAt?: string | null;
  paidUntil?: string | null;
  demoEndsAt?: string | null;
  contactName?: string | null;
  contactEmail?: string | null;
  avatarUrl?: string | null;
  integrations?: {
    taskManager?: {
      workspaceSlug?: string | null;
      workspaceName?: string | null;
      workspaces?: ClientTaskManagerWorkspaceBinding[];
    };
  };
  notes?: string | null;
  createdAt: string;
  updatedAt: string;
}
