// `geoalgeria` is a CommonJS module (`module.exports = {…}`), so its types use // `export = algeriaGeodata`. An export assignment cannot coexist with other // top-level `export` statements (TS2309), so every public type lives inside the // `algeriaGeodata` namespace and merges with the value of the same name. Consumers // reach them through the import: e.g. `import geo = require("geoalgeria")` then // `geo.Wilaya`, or with esModuleInterop `import geo from "geoalgeria"`. declare namespace algeriaGeodata { export interface Wilaya { code: number; name_fr: string; name_ar: string; phone_code: string | null; postal_code: string; latitude: number; longitude: number; created: "original" | "2019" | "2025"; parent_wilaya?: string; } export interface WilayaDetailed { code: number; name_fr: string; name_ar: string; name_en: string; created: number; dairas_count: number; communes_count: number; law?: string; mother_wilaya_code?: number; note?: string; dairas_source?: string; dairas?: DairaDetail[]; communes?: CommuneBasic[]; } export interface DairaDetail { name_ar: string; name_fr: string; communes?: CommuneBasic[]; } export interface CommuneBasic { name_ar: string; name_fr: string; } export interface WilayaDataset { metadata: DatasetMetadata; wilayas: WilayaDetailed[]; } export interface DatasetMetadata { title: string; total_wilayas: number; total_communes: number; total_dairas: number; reforms: Reform[]; sources: string[]; last_updated: string; notes: string[]; } export interface Reform { year: number; law: string; journal_officiel?: string; description: string; wilayas_added?: string; } export interface Commune { name_fr: string; name_ar: string; wilaya_code: number; daira: string | null; postal_code: string | null; latitude: number | null; longitude: number | null; code_commune: number | null; } export interface Daira { id: number; wilaya_code: number; name_fr: string; commune_count: number; } export interface CommuneEcommerce { id: number; commune_name_fr: string; commune_name_ar: string; daira_name_fr: string | null; wilaya_code: number; wilaya_name_fr: string; wilaya_name_ar: string; postal_code: string | null; } export interface WilayaWithCommunes extends Wilaya { communes: Commune[]; } export interface DeliveryZone { wilaya_code: number; wilaya_name_fr: string; zone: string | null; home_delivery: boolean | null; desk_delivery: boolean | null; estimated_days: number | null; } export interface DeliveryProvider { provider: string; provider_name: string; last_updated: string | null; zones: DeliveryZone[]; } export interface PostOffice { id: number; name: string | null; name_ar: string | null; class: string | null; postal_code: string | null; postal_code_old: string | null; address: string | null; commune_code: string | null; commune_fr: string | null; commune_ar: string | null; wilaya_code: string | null; wilaya_fr: string | null; wilaya_ar: string | null; lat: number | null; lng: number | null; } export interface Atm { id: string; name: string | null; status: string | null; postal_code: string | null; postal_code_old: string | null; address: string | null; commune_fr: string | null; commune_ar: string | null; wilaya_code: string | null; wilaya_fr: string | null; wilaya_ar: string | null; lat: number | null; lng: number | null; } } declare const algeriaGeodata: { readonly wilayas: algeriaGeodata.Wilaya[]; readonly communes: algeriaGeodata.Commune[]; readonly dairas: algeriaGeodata.Daira[]; readonly ecommerce: algeriaGeodata.CommuneEcommerce[]; readonly all: algeriaGeodata.WilayaWithCommunes[]; readonly postOffices: algeriaGeodata.PostOffice[]; readonly atms: algeriaGeodata.Atm[]; getWilaya(code: number): algeriaGeodata.Wilaya | undefined; getCommunesByWilaya(wilayaCode: number): algeriaGeodata.Commune[]; getDairasByWilaya(wilayaCode: number): algeriaGeodata.Daira[]; findCommune(name: string): algeriaGeodata.Commune[]; findByPostalCode(postalCode: string): algeriaGeodata.Commune[]; getPostOfficesByCommune(codeCommune: number | string): algeriaGeodata.PostOffice[]; }; export = algeriaGeodata;