UNPKG

@tricoteuses/senat

Version:

Handle French Sénat's open data

24 lines (23 loc) 1.18 kB
import { DateTime } from "luxon"; import { AgendaEvent, Reunion } from "../types/agenda"; import { DossierLegislatifResult } from "../model/dosleg"; import * as cheerio from "cheerio"; type KnownType = "SP" | "COM" | "MC" | "OD" | "ID"; type DossierBySenatUrl = Record<string, DossierLegislatifResult>; type ReunionBucket = "IDS" | "IDC" | "IDM" | "IDO" | "IDI"; type ReunionsByBucket = Record<ReunionBucket, Reunion[]>; export declare function buildReunionsByBucket(events: AgendaEvent[], dossierBySenatUrl: DossierBySenatUrl): ReunionsByBucket; export declare function makeReunionUid(dateISO: string, kind: KnownType, agendaEventId: string, organe?: string | null): string; export declare function formatYYYYMMDD(dateYYYYMMDD: string): string; export declare function deriveTimesForEvent(ev: AgendaEvent): { startISO: string | null; endISO: string | null; }; export type SommaireBlock = { text: string; startIndex: number; targetId?: string | null; }; export declare function extractSommaireBlocks($: cheerio.CheerioAPI, idx: Map<any, number>): SommaireBlock[]; export declare function parseISO(iso: string | null | undefined): DateTime | null; export {};