@gouvfr-anct/cartographie-nationale
Version:
<h2 id="about">🪧 À propos</h2>
66 lines (65 loc) • 2.7 kB
TypeScript
import { Departement, Region } from '../../libraries/collectivites';
import { LieuDetails, LieuListItem } from '../../libraries/inclusion-numerique-api';
export type RegionWithCount = Region & {
nombreLieux: number;
};
export type DepartementWithCount = Departement & {
nombreLieux: number;
};
export declare const buildExportUrl: (path: string, searchParams?: URLSearchParams) => string;
export type AllStats = {
regions: RegionWithCount[];
departements: DepartementWithCount[];
};
export declare const fetchAllStats: (searchParams?: URLSearchParams) => Promise<AllStats>;
export declare const fetchRegionsStats: (searchParams?: URLSearchParams) => Promise<RegionWithCount[]>;
export declare const fetchDepartementsStats: (searchParams?: URLSearchParams) => Promise<DepartementWithCount[]>;
export declare const fetchTotalLieux: (searchParams?: URLSearchParams) => Promise<number>;
export declare const fetchRegionTotalLieux: (slug: string, searchParams?: URLSearchParams) => Promise<number>;
export type DepartementLieuxResponse = {
lieux: LieuListItem[];
totalLieux: number;
};
export declare const fetchDepartementLieux: (code: string, page?: number, limit?: number, searchParams?: URLSearchParams) => Promise<DepartementLieuxResponse>;
export type LieuxResponse = {
lieux: LieuListItem[];
totalLieux: number;
};
export declare const fetchAllLieux: (page?: number, limit?: number, searchParams?: URLSearchParams) => Promise<LieuxResponse>;
export declare const fetchRegionLieux: (slug: string, page?: number, limit?: number, searchParams?: URLSearchParams) => Promise<LieuxResponse>;
export declare const fetchLieu: (id: string) => Promise<LieuDetails | null>;
export type LieuChunk = {
id: string;
nom: string;
latitude: number;
longitude: number;
};
export declare const fetchLieuxForChunk: (latitude: number, longitude: number, searchParams?: URLSearchParams) => Promise<LieuChunk[]>;
export type LieuSearchResult = {
id: string;
nom: string;
adresse: {
numero_voie: string;
repetition: string;
nom_voie: string;
commune: string;
code_postal: string;
code_insee: string;
};
};
export declare const fetchLieuxSearch: (query: string) => Promise<LieuSearchResult[]>;
export type MediateurLieu = {
id: string;
nom: string;
commune: string;
code_postal: string;
code_insee: string;
adresse: string;
};
export type MediateurSearchResult = {
prenom: string;
nom: string;
lieux: MediateurLieu[];
};
export declare const fetchMediateursSearch: (query: string) => Promise<MediateurSearchResult[]>;
export declare const fetchSources: () => Promise<string[]>;