/**
 * Wire types for the /v1/tenants/* endpoints. Mirrors the Go
 * authd.Tenant struct in internal/authd/tenants.go. Kept in this
 * feature folder (not in /lib) because the types belong to the
 * Companies feature, not to the wider app.
 */

export type TenantStatus = 'active' | 'suspended' | 'archived';

export interface Tenant {
  id: string;
  slug: string;
  display_name: string;
  status: TenantStatus;
  contact_email: string;
  rate_limit_per_sec: number;
  fcm_shared: boolean;
  created_at: string; // RFC3339 from the server
  updated_at: string;
  archived_at?: string | null;
}

export interface ListTenantsResponse {
  items: Tenant[];
  total: number;
  limit: number;
  offset: number;
}

export interface CreateTenantInput {
  slug: string;
  display_name: string;
  contact_email: string;
  rate_limit_per_sec: number;
  fcm_shared: boolean;
}

export interface UpdateTenantInput {
  display_name?: string;
  contact_email?: string;
  rate_limit_per_sec?: number;
  fcm_shared?: boolean;
}
