@tricoteuses/senat
Version:
Handle French Sénat's open data
73 lines (72 loc) • 1.82 kB
TypeScript
import { DocumentResult } from "../loaders";
export declare enum DivisionType {
tome = 1,
part = 2,
book = 3,
title = 4,
subtitle = 5,
chapter = 6,
section = 7,
subsection = 8,
paragraph = 9,
article = 10,
alinea = 11,
division = 12
}
export type DivisionTag = keyof typeof DivisionType;
export interface DocumentMetadata {
name: string;
session: number | null | undefined;
date?: string | null;
url_expose_des_motifs?: URL;
url_xml?: URL;
url_html: URL;
url_pdf: URL;
}
export interface FlatTexte extends DocumentResult {
titre: string | null;
titre_court: string | null;
url_dossier_senat: string | null;
url_dossier_assemblee: string | null;
date_presentation: Date | null;
date_depot: Date | null;
date_publication_xml: Date | null;
version: Version | null;
divisions: Division[];
expose_motifs?: ExposeDesMotifs | null;
}
export type Version = "RECT" | "RECT_BIS" | "RECT_TER" | "RECT_QUATER" | "RECT_QUINQUIES";
export interface Step {
eId: string;
date: Date | null;
type: string | null;
session: string | null;
numero: string | null;
version: Version | null;
outcome: string | null;
}
export interface Division {
index: number;
eId: string;
tag: DivisionTag;
level: number;
headings: DivisionContent[];
}
export interface Article extends Division {
alineas: Alinea[];
}
export interface DivisionContent {
text: string | null;
html?: string | null;
}
export interface Alinea extends DivisionContent {
eId: string;
heading: DivisionContent;
pastille: string | null;
text_avec_liens?: string | null;
html_avec_liens?: string | null;
}
export interface ExposeDesMotifs {
text: string | null;
html: string | null;
}