import { Document, Model, Types } from "mongoose";

//#region src/types/showcaseProject.types.d.ts
interface ShowcaseScanDetails {
  score: number;
  langTag: string;
  htmlDir: string;
  hreflangs: string[];
  hasXDefault: boolean;
  hasCanonical: boolean;
  hasLocalizedLinks: boolean;
  allAnchorsLocalized: boolean;
  robotsTxt: {
    accessible: boolean;
    disallowWithoutLocaleAlternates: boolean;
  };
  sitemapXml: {
    urlsDiscoveredCount: number;
    alternatesPresent: boolean;
    xDefaultPresent: boolean;
  };
}
type ShowcaseProjectStatus = 'pending_scan' | 'active' | 'scan_failed';
interface ShowcaseProject {
  _id: Types.ObjectId;
  title: string;
  description: string;
  imageUrl: string;
  logoUrl?: string;
  websiteUrl: string;
  githubUrl?: string;
  tags: string[];
  upvoters: string[];
  downvoters: string[];
  isOpenSource: boolean;
  createdAt: Date;
  intlayerVersion?: string;
  libsUsed: string[];
  /** Map of package name → version for all detected intlayer-related packages */
  packageDetails?: Record<string, string>;
  lastScanDate?: Date;
  scanDetails?: ShowcaseScanDetails;
  owner?: string;
  status?: ShowcaseProjectStatus;
}
interface ShowcaseProjectData {
  title: string;
  description: string;
  imageUrl?: string;
  logoUrl?: string;
  websiteUrl: string;
  githubUrl?: string;
  tags?: string[];
  isOpenSource?: boolean;
  intlayerVersion?: string;
  libsUsed?: string[];
  packageDetails?: Record<string, string>;
  scanDetails?: ShowcaseScanDetails;
  owner?: string;
  status?: ShowcaseProjectStatus;
}
interface ShowcaseProjectAPI extends Omit<ShowcaseProject, '_id' | 'createdAt' | 'lastScanDate' | 'upvoters' | 'downvoters'> {
  id: string;
  upvotes: number;
  isUpVoted: boolean;
  downvotes: number;
  isDownVoted: boolean;
  createdAt: string;
  lastScanDate?: string;
  isOwner?: boolean;
}
type ShowcaseProjectDocument = ShowcaseProject & Document;
type ShowcaseProjectModelType = Model<ShowcaseProjectDocument>;
//#endregion
export { ShowcaseProject, ShowcaseProjectAPI, ShowcaseProjectData, ShowcaseProjectDocument, ShowcaseProjectModelType, ShowcaseProjectStatus, ShowcaseScanDetails };
//# sourceMappingURL=showcaseProject.types.d.ts.map