@tricoteuses/senat 2.9.8 → 2.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/databases.d.ts +26 -10
- package/lib/loaders.d.ts +4 -4
- package/lib/loaders.js +4 -4
- package/lib/model/ameli.d.ts +44 -22
- package/lib/model/ameli.js +11 -0
- package/lib/model/debats.d.ts +18 -9
- package/lib/model/dosleg.d.ts +48 -178
- package/lib/model/dosleg.js +4 -4
- package/lib/model/questions.d.ts +6 -6
- package/lib/model/sens.d.ts +44 -44
- package/lib/raw_types/ameli.d.ts +1521 -778
- package/lib/raw_types/ameli.js +345 -5
- package/lib/raw_types/debats.d.ts +306 -163
- package/lib/raw_types/debats.js +84 -5
- package/lib/raw_types/dosleg.d.ts +2297 -1353
- package/lib/raw_types/dosleg.js +550 -5
- package/lib/raw_types/kysely-table-types.d.ts +5 -0
- package/lib/raw_types/kysely-table-types.js +1 -0
- package/lib/raw_types/questions.d.ts +519 -374
- package/lib/raw_types/questions.js +84 -5
- package/lib/raw_types/sens.d.ts +12562 -6720
- package/lib/raw_types/sens.js +2944 -5
- package/lib/raw_types_schemats/ameli.d.ts +1 -1
- package/lib/raw_types_schemats/debats.d.ts +1 -1
- package/lib/raw_types_schemats/dosleg.d.ts +1 -1
- package/lib/raw_types_schemats/questions.d.ts +1 -1
- package/lib/raw_types_schemats/sens.d.ts +1 -1
- package/lib/scripts/convert_data.js +3 -3
- package/lib/scripts/retrieve_open_data.js +1 -2
- package/package.json +2 -2
package/lib/databases.d.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { Kysely } from "kysely";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { TableTypes as AmeliTableTypes } from "./raw_types/ameli";
|
|
3
|
+
import { TableTypes as DebatsTableTypes } from "./raw_types/debats";
|
|
4
|
+
import { TableTypes as DoslegTableTypes } from "./raw_types/dosleg";
|
|
5
|
+
import { TableTypes as QuestionsTableTypes } from "./raw_types/questions";
|
|
6
|
+
import { TableTypes as SensTableTypes } from "./raw_types/sens";
|
|
7
|
+
type AmeliDb = {
|
|
8
|
+
[K in keyof AmeliTableTypes]: AmeliTableTypes[K]["select"];
|
|
9
|
+
};
|
|
10
|
+
type DebatsDb = {
|
|
11
|
+
[K in keyof DebatsTableTypes]: DebatsTableTypes[K]["select"];
|
|
12
|
+
};
|
|
13
|
+
type DoslegDb = {
|
|
14
|
+
[K in keyof DoslegTableTypes]: DoslegTableTypes[K]["select"];
|
|
15
|
+
};
|
|
16
|
+
type QuestionsDb = {
|
|
17
|
+
[K in keyof QuestionsTableTypes]: QuestionsTableTypes[K]["select"];
|
|
18
|
+
};
|
|
19
|
+
type SensDb = {
|
|
20
|
+
[K in keyof SensTableTypes]: SensTableTypes[K]["select"];
|
|
21
|
+
};
|
|
22
|
+
export declare const dbAmeli: Kysely<AmeliDb>;
|
|
23
|
+
export declare const dbDebats: Kysely<DebatsDb>;
|
|
24
|
+
export declare const dbDosleg: Kysely<DoslegDb>;
|
|
25
|
+
export declare const dbQuestions: Kysely<QuestionsDb>;
|
|
26
|
+
export declare const dbSens: Kysely<SensDb>;
|
|
27
|
+
export {};
|
package/lib/loaders.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type IterItem<T> = {
|
|
|
26
26
|
};
|
|
27
27
|
export interface TexteMetadata {
|
|
28
28
|
name: string;
|
|
29
|
-
session:
|
|
29
|
+
session: number | null | undefined;
|
|
30
30
|
url_expose_des_motifs?: URL;
|
|
31
31
|
url_xml: URL;
|
|
32
32
|
url_html: URL;
|
|
@@ -34,7 +34,7 @@ export interface TexteMetadata {
|
|
|
34
34
|
}
|
|
35
35
|
export interface RapportMetadata {
|
|
36
36
|
name: string;
|
|
37
|
-
session:
|
|
37
|
+
session: number | null | undefined;
|
|
38
38
|
url_html: URL;
|
|
39
39
|
url_pdf: URL;
|
|
40
40
|
}
|
|
@@ -45,13 +45,13 @@ export interface DossierLegislatifDocumentResult {
|
|
|
45
45
|
type_lecture: string;
|
|
46
46
|
libelle_lecture: string;
|
|
47
47
|
libelle_organisme: string | null;
|
|
48
|
-
numero:
|
|
48
|
+
numero: number | null;
|
|
49
49
|
id: string | null;
|
|
50
50
|
url: string;
|
|
51
51
|
origine?: string | null | undefined;
|
|
52
52
|
type: string;
|
|
53
53
|
date: string;
|
|
54
|
-
session:
|
|
54
|
+
session: number | null;
|
|
55
55
|
auteurs: {
|
|
56
56
|
prenom: string | null;
|
|
57
57
|
nom_usuel: string;
|
package/lib/loaders.js
CHANGED
|
@@ -99,14 +99,14 @@ export function* iterLoadSenatDossiersLegislatifsTexteUrls(dataDir, session) {
|
|
|
99
99
|
}
|
|
100
100
|
export function* iterLoadSenatDossiersLegislatifsDocuments(dataDir, session, documentType, options = {}) {
|
|
101
101
|
for (const { item: dossierLegislatif } of iterLoadSenatDossiersLegislatifs(dataDir, session, options)) {
|
|
102
|
-
for (const lecture of dossierLegislatif
|
|
102
|
+
for (const lecture of dossierLegislatif["lectures"]) {
|
|
103
103
|
const lecturesSenat = lecture.lectures_assemblee.filter((lectureAssemblee) => lectureAssemblee.assemblee === "Sénat");
|
|
104
104
|
for (const lectureSenat of lecturesSenat) {
|
|
105
105
|
for (const document of lectureSenat[documentType]) {
|
|
106
106
|
const enrichedDocument = {
|
|
107
|
-
signet_dossier: dossierLegislatif
|
|
108
|
-
url_dossier_senat: dossierLegislatif
|
|
109
|
-
url_dossier_assemblee_nationale: dossierLegislatif
|
|
107
|
+
signet_dossier: dossierLegislatif["signet"],
|
|
108
|
+
url_dossier_senat: dossierLegislatif["url"],
|
|
109
|
+
url_dossier_assemblee_nationale: dossierLegislatif["url_dossier_assemblee_nationale"],
|
|
110
110
|
type_lecture: lecture.type_lecture,
|
|
111
111
|
libelle_lecture: lecture.libelle,
|
|
112
112
|
libelle_organisme: lectureSenat.libelle_organisme,
|
package/lib/model/ameli.d.ts
CHANGED
|
@@ -2,101 +2,123 @@ import { InferResult } from "kysely";
|
|
|
2
2
|
export type AmendementResult = InferResult<typeof findAllQuery>[0];
|
|
3
3
|
declare const findAllQuery: import("kysely").SelectQueryBuilder<{
|
|
4
4
|
amd: import("../raw_types/ameli").Amd;
|
|
5
|
-
|
|
5
|
+
mot: import("../raw_types/ameli").Mot;
|
|
6
|
+
sub: import("kysely").Nullable<import("../raw_types/ameli").Sub>;
|
|
7
|
+
ent: import("../raw_types/ameli").Ent;
|
|
8
|
+
sor: import("kysely").Nullable<import("../raw_types/ameli").Sor>;
|
|
6
9
|
avicom: import("kysely").Nullable<import("../raw_types/ameli").Avicom>;
|
|
7
10
|
avigvt: import("kysely").Nullable<import("../raw_types/ameli").Avigvt>;
|
|
11
|
+
irr: import("kysely").Nullable<import("../raw_types/ameli").Irr>;
|
|
12
|
+
txt_ameli: import("kysely").Nullable<import("../raw_types/ameli").TxtAmeli>;
|
|
13
|
+
typrect: import("../raw_types/ameli").Typrect;
|
|
14
|
+
amdsen: import("../raw_types/ameli").Amdsen;
|
|
15
|
+
sen_ameli: import("../raw_types/ameli").SenAmeli;
|
|
16
|
+
grppol_ameli: import("kysely").Nullable<import("../raw_types/ameli").GrppolAmeli>;
|
|
8
17
|
cab: import("kysely").Nullable<import("../raw_types/ameli").Cab>;
|
|
9
18
|
com_ameli: import("kysely").Nullable<import("../raw_types/ameli").ComAmeli>;
|
|
10
|
-
ent: import("../raw_types/ameli").Ent;
|
|
11
19
|
etatxt: import("../raw_types/ameli").Etatxt;
|
|
12
20
|
fbu: import("../raw_types/ameli").Fbu;
|
|
13
|
-
|
|
21
|
+
ses: import("kysely").Nullable<import("../raw_types/ameli").Ses>;
|
|
14
22
|
gvt: import("../raw_types/ameli").Gvt;
|
|
15
23
|
intora: import("../raw_types/ameli").Intora;
|
|
16
|
-
|
|
24
|
+
sea: import("../raw_types/ameli").Sea;
|
|
25
|
+
orarol: import("../raw_types/ameli").Orarol;
|
|
17
26
|
lec_ameli: import("kysely").Nullable<import("../raw_types/ameli").LecAmeli>;
|
|
18
|
-
mot: import("../raw_types/ameli").Mot;
|
|
19
27
|
nat: import("kysely").Nullable<import("../raw_types/ameli").Nat>;
|
|
20
|
-
orarol: import("../raw_types/ameli").Orarol;
|
|
21
28
|
sai: import("../raw_types/ameli").Sai;
|
|
22
29
|
saisen: import("../raw_types/ameli").Saisen;
|
|
23
|
-
sea: import("../raw_types/ameli").Sea;
|
|
24
|
-
sen_ameli: import("../raw_types/ameli").SenAmeli;
|
|
25
|
-
ses: import("kysely").Nullable<import("../raw_types/ameli").Ses>;
|
|
26
|
-
sor: import("kysely").Nullable<import("../raw_types/ameli").Sor>;
|
|
27
|
-
sub: import("kysely").Nullable<import("../raw_types/ameli").Sub>;
|
|
28
|
-
txt_ameli: import("kysely").Nullable<import("../raw_types/ameli").TxtAmeli>;
|
|
29
|
-
typrect: import("../raw_types/ameli").Typrect;
|
|
30
30
|
typses: import("../raw_types/ameli").Typses;
|
|
31
31
|
typsub: import("kysely").Nullable<import("../raw_types/ameli").Typsub>;
|
|
32
32
|
w_nivrec: import("../raw_types/ameli").WNivrec;
|
|
33
|
-
}, "amd" | "
|
|
34
|
-
session:
|
|
33
|
+
}, "amd" | "sub" | "sor" | "avicom" | "avigvt" | "irr" | "txt_ameli" | "grppol_ameli" | "cab" | "com_ameli" | "ses" | "lec_ameli" | "nat" | "typsub", {
|
|
34
|
+
session: number | null;
|
|
35
35
|
signet_dossier_legislatif: string | null;
|
|
36
36
|
nature_texte: string | null;
|
|
37
37
|
numero_texte: number | null;
|
|
38
|
+
numero_adoption_texte: number | null;
|
|
38
39
|
intitule_texte: string | null;
|
|
39
40
|
lecture: string | null;
|
|
40
41
|
nature: string;
|
|
41
42
|
id: number;
|
|
42
43
|
parent_id: number | null;
|
|
44
|
+
rendu_similaire_id: number | null;
|
|
45
|
+
identique_id: number | null;
|
|
43
46
|
numero: string | null;
|
|
44
|
-
numero_absolu:
|
|
45
|
-
ordre:
|
|
47
|
+
numero_absolu: number | null;
|
|
48
|
+
ordre: number | null;
|
|
49
|
+
accepte_gouvernement: string | null;
|
|
46
50
|
subdivision_libelle: string | null;
|
|
47
51
|
subdivision_libelle_court: string | null;
|
|
48
52
|
subdivision_type: string | null;
|
|
49
53
|
alinea: number | null;
|
|
54
|
+
commentaire_probleme: string | null;
|
|
55
|
+
observations: string | null;
|
|
56
|
+
observations_additionnelles: string | null;
|
|
50
57
|
date_depot: string;
|
|
51
58
|
dispositif: string | null;
|
|
59
|
+
discussion_commune_id: number | null;
|
|
52
60
|
objet: string | null;
|
|
53
61
|
etat: string;
|
|
54
62
|
avis_commission: string | null;
|
|
55
63
|
avis_gouvernement: string | null;
|
|
56
64
|
sort: string | null;
|
|
57
|
-
revision:
|
|
65
|
+
revision: number;
|
|
58
66
|
url: string;
|
|
59
67
|
au_nom_de_groupe_politique: string | null;
|
|
60
68
|
au_nom_de_commission: string | null;
|
|
61
69
|
auteur_est_gouvernement: boolean;
|
|
62
70
|
auteurs: {
|
|
63
71
|
prenom: string | null;
|
|
72
|
+
homonyme: string | null;
|
|
64
73
|
nom: string | null;
|
|
74
|
+
qualite: string | null;
|
|
75
|
+
rang: number | null;
|
|
65
76
|
matricule: string | null;
|
|
66
77
|
}[];
|
|
67
78
|
}>;
|
|
68
79
|
export declare function findAll(): AsyncIterableIterator<{
|
|
69
|
-
session:
|
|
80
|
+
session: number | null;
|
|
70
81
|
signet_dossier_legislatif: string | null;
|
|
71
82
|
nature_texte: string | null;
|
|
72
83
|
numero_texte: number | null;
|
|
84
|
+
numero_adoption_texte: number | null;
|
|
73
85
|
intitule_texte: string | null;
|
|
74
86
|
lecture: string | null;
|
|
75
87
|
nature: string;
|
|
76
88
|
id: number;
|
|
77
89
|
parent_id: number | null;
|
|
90
|
+
rendu_similaire_id: number | null;
|
|
91
|
+
identique_id: number | null;
|
|
78
92
|
numero: string | null;
|
|
79
|
-
numero_absolu:
|
|
80
|
-
ordre:
|
|
93
|
+
numero_absolu: number | null;
|
|
94
|
+
ordre: number | null;
|
|
95
|
+
accepte_gouvernement: string | null;
|
|
81
96
|
subdivision_libelle: string | null;
|
|
82
97
|
subdivision_libelle_court: string | null;
|
|
83
98
|
subdivision_type: string | null;
|
|
84
99
|
alinea: number | null;
|
|
100
|
+
commentaire_probleme: string | null;
|
|
101
|
+
observations: string | null;
|
|
102
|
+
observations_additionnelles: string | null;
|
|
85
103
|
date_depot: string;
|
|
86
104
|
dispositif: string | null;
|
|
105
|
+
discussion_commune_id: number | null;
|
|
87
106
|
objet: string | null;
|
|
88
107
|
etat: string;
|
|
89
108
|
avis_commission: string | null;
|
|
90
109
|
avis_gouvernement: string | null;
|
|
91
110
|
sort: string | null;
|
|
92
|
-
revision:
|
|
111
|
+
revision: number;
|
|
93
112
|
url: string;
|
|
94
113
|
au_nom_de_groupe_politique: string | null;
|
|
95
114
|
au_nom_de_commission: string | null;
|
|
96
115
|
auteur_est_gouvernement: boolean;
|
|
97
116
|
auteurs: {
|
|
98
117
|
prenom: string | null;
|
|
118
|
+
homonyme: string | null;
|
|
99
119
|
nom: string | null;
|
|
120
|
+
qualite: string | null;
|
|
121
|
+
rang: number | null;
|
|
100
122
|
matricule: string | null;
|
|
101
123
|
}[];
|
|
102
124
|
}>;
|
package/lib/model/ameli.js
CHANGED
|
@@ -8,7 +8,10 @@ function auteurs(amendementId) {
|
|
|
8
8
|
.where("amdsen.amdid", "=", amendementId)
|
|
9
9
|
.select([
|
|
10
10
|
"amdsen.prenomuse as prenom",
|
|
11
|
+
"amdsen.hom as homonyme",
|
|
11
12
|
"amdsen.nomuse as nom",
|
|
13
|
+
"amdsen.qua as qualite",
|
|
14
|
+
"amdsen.rng as rang",
|
|
12
15
|
"sen_ameli.mat as matricule",
|
|
13
16
|
])
|
|
14
17
|
.orderBy("amdsen.rng asc"));
|
|
@@ -33,6 +36,7 @@ const findAllQuery = dbAmeli
|
|
|
33
36
|
"txt_ameli.doslegsignet as signet_dossier_legislatif",
|
|
34
37
|
"nat.libcourt as nature_texte",
|
|
35
38
|
"txt_ameli.numabs as numero_texte",
|
|
39
|
+
"txt_ameli.numado as numero_adoption_texte",
|
|
36
40
|
"txt_ameli.int as intitule_texte",
|
|
37
41
|
"lec_ameli.lib as lecture",
|
|
38
42
|
eb
|
|
@@ -48,15 +52,22 @@ const findAllQuery = dbAmeli
|
|
|
48
52
|
.as("nature"),
|
|
49
53
|
"amd.id as id",
|
|
50
54
|
"amd.amdperid as parent_id",
|
|
55
|
+
"amd.amdrendusim as rendu_similaire_id",
|
|
56
|
+
"amd.ideid as identique_id",
|
|
51
57
|
"amd.num as numero",
|
|
52
58
|
"amd.numabs as numero_absolu",
|
|
53
59
|
"amd.ord as ordre",
|
|
60
|
+
"amd.accgou as accepte_gouvernement",
|
|
54
61
|
"sub.lib as subdivision_libelle",
|
|
55
62
|
"sub.lic as subdivision_libelle_court",
|
|
56
63
|
"typsub.lib as subdivision_type",
|
|
57
64
|
"amd.alinea as alinea",
|
|
65
|
+
"amd.commentprobleme as commentaire_probleme",
|
|
66
|
+
"amd.obs as observations",
|
|
67
|
+
"amd.mot as observations_additionnelles",
|
|
58
68
|
toDateString(ref("amd.datdep")).as("date_depot"),
|
|
59
69
|
"amd.dis as dispositif",
|
|
70
|
+
"amd.discomid as discussion_commune_id",
|
|
60
71
|
"amd.obj as objet",
|
|
61
72
|
eb
|
|
62
73
|
.case()
|
package/lib/model/debats.d.ts
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { InferResult } from "kysely";
|
|
2
2
|
export type DebatResult = InferResult<typeof findAllQuery>[0];
|
|
3
|
-
declare const findAllQuery: import("kysely").SelectQueryBuilder<
|
|
3
|
+
declare const findAllQuery: import("kysely").SelectQueryBuilder<{
|
|
4
|
+
debats: import("../raw_types/debats").Debats;
|
|
5
|
+
intdivers: import("../raw_types/debats").Intdivers;
|
|
6
|
+
intpjl: import("../raw_types/debats").Intpjl;
|
|
7
|
+
lecassdeb: import("../raw_types/debats").Lecassdeb;
|
|
8
|
+
secdis: import("../raw_types/debats").Secdis;
|
|
9
|
+
secdivers: import("../raw_types/debats").Secdivers;
|
|
10
|
+
syndeb: import("../raw_types/debats").Syndeb;
|
|
11
|
+
typsec: import("../raw_types/debats").Typsec;
|
|
12
|
+
}, "debats", {
|
|
4
13
|
id: string;
|
|
5
14
|
date_seance: string;
|
|
6
|
-
numero:
|
|
15
|
+
numero: number | null;
|
|
7
16
|
url: string | null;
|
|
8
17
|
etat_synchronisation: string | null;
|
|
9
18
|
sections: {
|
|
10
|
-
id:
|
|
19
|
+
id: number | null;
|
|
11
20
|
numero: string | null;
|
|
12
21
|
objet: string | null;
|
|
13
22
|
url: string | null;
|
|
14
23
|
type: string | null;
|
|
15
24
|
categorie: string | null;
|
|
16
25
|
interventions: {
|
|
17
|
-
id:
|
|
26
|
+
id: number | null;
|
|
18
27
|
auteur_code: string;
|
|
19
28
|
fonction_intervenant: string | null;
|
|
20
29
|
url: string | null;
|
|
@@ -28,7 +37,7 @@ declare const findAllQuery: import("kysely").SelectQueryBuilder<import("../raw_t
|
|
|
28
37
|
libelle: string | null;
|
|
29
38
|
objet: string | null;
|
|
30
39
|
interventions: {
|
|
31
|
-
id:
|
|
40
|
+
id: number | null;
|
|
32
41
|
auteur_code: string;
|
|
33
42
|
fonction_intervenant: string | null;
|
|
34
43
|
url: string | null;
|
|
@@ -42,18 +51,18 @@ declare const findAllQuery: import("kysely").SelectQueryBuilder<import("../raw_t
|
|
|
42
51
|
export declare function findAll(): AsyncIterableIterator<{
|
|
43
52
|
id: string;
|
|
44
53
|
date_seance: string;
|
|
45
|
-
numero:
|
|
54
|
+
numero: number | null;
|
|
46
55
|
url: string | null;
|
|
47
56
|
etat_synchronisation: string | null;
|
|
48
57
|
sections: {
|
|
49
|
-
id:
|
|
58
|
+
id: number | null;
|
|
50
59
|
numero: string | null;
|
|
51
60
|
objet: string | null;
|
|
52
61
|
url: string | null;
|
|
53
62
|
type: string | null;
|
|
54
63
|
categorie: string | null;
|
|
55
64
|
interventions: {
|
|
56
|
-
id:
|
|
65
|
+
id: number | null;
|
|
57
66
|
auteur_code: string;
|
|
58
67
|
fonction_intervenant: string | null;
|
|
59
68
|
url: string | null;
|
|
@@ -67,7 +76,7 @@ export declare function findAll(): AsyncIterableIterator<{
|
|
|
67
76
|
libelle: string | null;
|
|
68
77
|
objet: string | null;
|
|
69
78
|
interventions: {
|
|
70
|
-
id:
|
|
79
|
+
id: number | null;
|
|
71
80
|
auteur_code: string;
|
|
72
81
|
fonction_intervenant: string | null;
|
|
73
82
|
url: string | null;
|
package/lib/model/dosleg.d.ts
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
|
-
import { InferResult } from "kysely";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { InferResult, SelectQueryBuilder } from "kysely";
|
|
2
|
+
declare const findAllDossiersQuery: SelectQueryBuilder<any, any, any>;
|
|
3
|
+
export declare function findAllDossiers(): AsyncIterableIterator<DossierLegislatifResult>;
|
|
4
|
+
export declare function findAllScrutins(): AsyncIterableIterator<{
|
|
5
|
+
numero: number;
|
|
6
|
+
votes: {
|
|
7
|
+
matricule_votant: string;
|
|
8
|
+
matricule_delegant: string | null;
|
|
9
|
+
position: string | null;
|
|
10
|
+
statut_votant: string | null;
|
|
11
|
+
titre_votant: string | null;
|
|
12
|
+
}[];
|
|
13
|
+
session: number;
|
|
14
|
+
date_scrutin: string;
|
|
15
|
+
date_scrutin_effective: string;
|
|
16
|
+
lecture_id: string | null;
|
|
17
|
+
intitule: string | null;
|
|
18
|
+
note: string | null;
|
|
19
|
+
nombre_majorite: number | null;
|
|
20
|
+
nombre_majorite_seance: number | null;
|
|
21
|
+
nombre_votants: number | null;
|
|
22
|
+
nombre_votants_seance: number | null;
|
|
23
|
+
nombre_suffrages: number | null;
|
|
24
|
+
nombre_suffrages_seance: number | null;
|
|
25
|
+
nombre_contre: number | null;
|
|
26
|
+
nombre_contre_seance: number | null;
|
|
27
|
+
nombre_pour: number | null;
|
|
28
|
+
nombre_pour_seance: number | null;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function findSenatTexteUrls(sessions?: number[]): AsyncIterableIterator<{
|
|
31
|
+
session: number | null | undefined;
|
|
32
|
+
url: string;
|
|
33
|
+
hasExposeDesMotifs: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
export declare function findSenatRapportUrls(sessions?: number[]): AsyncIterableIterator<{
|
|
36
|
+
url: string;
|
|
37
|
+
session: number | null | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
declare const findAuteursQuery: SelectQueryBuilder<{
|
|
9
40
|
amescr: import("../raw_types/dosleg").Amescr;
|
|
10
41
|
ass: import("../raw_types/dosleg").Ass;
|
|
11
42
|
aud: import("../raw_types/dosleg").Aud;
|
|
@@ -20,13 +51,15 @@ declare const findAllDossiersQuery: import("kysely").SelectQueryBuilder<{
|
|
|
20
51
|
docatt: import("../raw_types/dosleg").Docatt;
|
|
21
52
|
docsea: import("../raw_types/dosleg").Docsea;
|
|
22
53
|
ecr: import("../raw_types/dosleg").Ecr;
|
|
23
|
-
etaloi: import("
|
|
54
|
+
etaloi: import("../raw_types/dosleg").Etaloi;
|
|
24
55
|
evtsea: import("../raw_types/dosleg").Evtsea;
|
|
25
56
|
forpub: import("../raw_types/dosleg").Forpub;
|
|
26
57
|
gen: import("../raw_types/dosleg").Gen;
|
|
27
58
|
lecass: import("../raw_types/dosleg").Lecass;
|
|
28
59
|
lecassrap: import("../raw_types/dosleg").Lecassrap;
|
|
60
|
+
lecture: import("../raw_types/dosleg").Lecture;
|
|
29
61
|
lnkrap: import("../raw_types/dosleg").Lnkrap;
|
|
62
|
+
loi: import("../raw_types/dosleg").Loi;
|
|
30
63
|
loithe: import("../raw_types/dosleg").Loithe;
|
|
31
64
|
natloi: import("../raw_types/dosleg").Natloi;
|
|
32
65
|
org: import("../raw_types/dosleg").Org;
|
|
@@ -34,11 +67,13 @@ declare const findAllDossiersQuery: import("kysely").SelectQueryBuilder<{
|
|
|
34
67
|
orippr: import("../raw_types/dosleg").Orippr;
|
|
35
68
|
oritxt: import("../raw_types/dosleg").Oritxt;
|
|
36
69
|
posvot: import("../raw_types/dosleg").Posvot;
|
|
70
|
+
qua: import("../raw_types/dosleg").Qua;
|
|
37
71
|
rap: import("../raw_types/dosleg").Rap;
|
|
38
72
|
raporg: import("../raw_types/dosleg").Raporg;
|
|
39
73
|
rapthe: import("../raw_types/dosleg").Rapthe;
|
|
40
74
|
rolsig: import("../raw_types/dosleg").Rolsig;
|
|
41
75
|
scr: import("../raw_types/dosleg").Scr;
|
|
76
|
+
ses: import("../raw_types/dosleg").Ses;
|
|
42
77
|
stavot: import("../raw_types/dosleg").Stavot;
|
|
43
78
|
texte: import("../raw_types/dosleg").Texte;
|
|
44
79
|
texte_ancien: import("../raw_types/dosleg").TexteAncien;
|
|
@@ -49,180 +84,13 @@ declare const findAllDossiersQuery: import("kysely").SelectQueryBuilder<{
|
|
|
49
84
|
typdoc: import("../raw_types/dosleg").Typdoc;
|
|
50
85
|
typevtsea: import("../raw_types/dosleg").Typevtsea;
|
|
51
86
|
typlec: import("../raw_types/dosleg").Typlec;
|
|
52
|
-
typloi: import("
|
|
87
|
+
typloi: import("../raw_types/dosleg").Typloi;
|
|
53
88
|
typorg: import("../raw_types/dosleg").Typorg;
|
|
54
89
|
typrap: import("../raw_types/dosleg").Typrap;
|
|
55
90
|
typtxt: import("../raw_types/dosleg").Typtxt;
|
|
56
91
|
typurl: import("../raw_types/dosleg").Typurl;
|
|
57
92
|
votsen: import("../raw_types/dosleg").Votsen;
|
|
58
|
-
}, "
|
|
59
|
-
url: string;
|
|
60
|
-
signet: string;
|
|
61
|
-
titre: string;
|
|
62
|
-
titre_court: string;
|
|
63
|
-
code_nature_dossier: string;
|
|
64
|
-
libelle_type_dossier: string;
|
|
65
|
-
etat_dossier: string;
|
|
66
|
-
date_decision_CoC: string;
|
|
67
|
-
date_saisine_CoC: string;
|
|
68
|
-
date_promulgation: string;
|
|
69
|
-
titre_JO: string;
|
|
70
|
-
date_publication_JO: string;
|
|
71
|
-
lectures: {
|
|
72
|
-
type_lecture: string;
|
|
73
|
-
libelle: string;
|
|
74
|
-
ordre_lecture: string | null;
|
|
75
|
-
lectures_assemblee: {
|
|
76
|
-
assemblee: string;
|
|
77
|
-
libelle_organisme: string | null;
|
|
78
|
-
code_organisme: string | null;
|
|
79
|
-
ordre_lecture_assemblee: string;
|
|
80
|
-
session: string | null;
|
|
81
|
-
textes: {
|
|
82
|
-
url: string;
|
|
83
|
-
numero: string | null;
|
|
84
|
-
id: string | null;
|
|
85
|
-
origine: string;
|
|
86
|
-
type: string;
|
|
87
|
-
date: string;
|
|
88
|
-
session: string | null;
|
|
89
|
-
auteurs: {
|
|
90
|
-
prenom: string | null;
|
|
91
|
-
nom_usuel: string;
|
|
92
|
-
matricule: string | null;
|
|
93
|
-
}[];
|
|
94
|
-
}[];
|
|
95
|
-
rapports: {
|
|
96
|
-
url: string;
|
|
97
|
-
id: string | null;
|
|
98
|
-
type: string;
|
|
99
|
-
date: string;
|
|
100
|
-
session: string;
|
|
101
|
-
auteurs: {
|
|
102
|
-
prenom: string | null;
|
|
103
|
-
nom_usuel: string;
|
|
104
|
-
matricule: string | null;
|
|
105
|
-
}[];
|
|
106
|
-
numero: string | null;
|
|
107
|
-
}[];
|
|
108
|
-
dates_seances: {
|
|
109
|
-
date: string;
|
|
110
|
-
}[];
|
|
111
|
-
}[];
|
|
112
|
-
}[];
|
|
113
|
-
themes: {
|
|
114
|
-
libelle: string;
|
|
115
|
-
}[];
|
|
116
|
-
url_dossier_assemblee_nationale: string | null;
|
|
117
|
-
num_decision_CoC: string | null;
|
|
118
|
-
url_decision_CoC: string | null;
|
|
119
|
-
condition_saisine_CoC: string | null;
|
|
120
|
-
numero_loi: string | null;
|
|
121
|
-
numero_JO: string | null;
|
|
122
|
-
url_JO: string | null;
|
|
123
|
-
}>;
|
|
124
|
-
export declare function findAllDossiers(): AsyncIterableIterator<{
|
|
125
|
-
url: string;
|
|
126
|
-
signet: string;
|
|
127
|
-
titre: string;
|
|
128
|
-
titre_court: string;
|
|
129
|
-
code_nature_dossier: string;
|
|
130
|
-
libelle_type_dossier: string;
|
|
131
|
-
etat_dossier: string;
|
|
132
|
-
date_decision_CoC: string;
|
|
133
|
-
date_saisine_CoC: string;
|
|
134
|
-
date_promulgation: string;
|
|
135
|
-
titre_JO: string;
|
|
136
|
-
date_publication_JO: string;
|
|
137
|
-
lectures: {
|
|
138
|
-
type_lecture: string;
|
|
139
|
-
libelle: string;
|
|
140
|
-
ordre_lecture: string | null;
|
|
141
|
-
lectures_assemblee: {
|
|
142
|
-
assemblee: string;
|
|
143
|
-
libelle_organisme: string | null;
|
|
144
|
-
code_organisme: string | null;
|
|
145
|
-
ordre_lecture_assemblee: string;
|
|
146
|
-
session: string | null;
|
|
147
|
-
textes: {
|
|
148
|
-
url: string;
|
|
149
|
-
numero: string | null;
|
|
150
|
-
id: string | null;
|
|
151
|
-
origine: string;
|
|
152
|
-
type: string;
|
|
153
|
-
date: string;
|
|
154
|
-
session: string | null;
|
|
155
|
-
auteurs: {
|
|
156
|
-
prenom: string | null;
|
|
157
|
-
nom_usuel: string;
|
|
158
|
-
matricule: string | null;
|
|
159
|
-
}[];
|
|
160
|
-
}[];
|
|
161
|
-
rapports: {
|
|
162
|
-
url: string;
|
|
163
|
-
id: string | null;
|
|
164
|
-
type: string;
|
|
165
|
-
date: string;
|
|
166
|
-
session: string;
|
|
167
|
-
auteurs: {
|
|
168
|
-
prenom: string | null;
|
|
169
|
-
nom_usuel: string;
|
|
170
|
-
matricule: string | null;
|
|
171
|
-
}[];
|
|
172
|
-
numero: string | null;
|
|
173
|
-
}[];
|
|
174
|
-
dates_seances: {
|
|
175
|
-
date: string;
|
|
176
|
-
}[];
|
|
177
|
-
}[];
|
|
178
|
-
}[];
|
|
179
|
-
themes: {
|
|
180
|
-
libelle: string;
|
|
181
|
-
}[];
|
|
182
|
-
url_dossier_assemblee_nationale: string | null;
|
|
183
|
-
num_decision_CoC: string | null;
|
|
184
|
-
url_decision_CoC: string | null;
|
|
185
|
-
condition_saisine_CoC: string | null;
|
|
186
|
-
numero_loi: string | null;
|
|
187
|
-
numero_JO: string | null;
|
|
188
|
-
url_JO: string | null;
|
|
189
|
-
}>;
|
|
190
|
-
export declare function findAllScrutins(): AsyncIterableIterator<{
|
|
191
|
-
session: string;
|
|
192
|
-
numero: string;
|
|
193
|
-
date_scrutin: string;
|
|
194
|
-
date_scrutin_effective: string;
|
|
195
|
-
votes: {
|
|
196
|
-
matricule_votant: string;
|
|
197
|
-
matricule_delegant: string | null;
|
|
198
|
-
position: string | null;
|
|
199
|
-
statut_votant: string | null;
|
|
200
|
-
titre_votant: string | null;
|
|
201
|
-
}[];
|
|
202
|
-
lecture_id: string | null;
|
|
203
|
-
intitule: string | null;
|
|
204
|
-
note: string | null;
|
|
205
|
-
nombre_majorite: string | null;
|
|
206
|
-
nombre_majorite_seance: string | null;
|
|
207
|
-
nombre_votants: string | null;
|
|
208
|
-
nombre_votants_seance: string | null;
|
|
209
|
-
nombre_suffrages: string | null;
|
|
210
|
-
nombre_suffrages_seance: string | null;
|
|
211
|
-
nombre_contre: string | null;
|
|
212
|
-
nombre_contre_seance: string | null;
|
|
213
|
-
nombre_pour: string | null;
|
|
214
|
-
nombre_pour_seance: string | null;
|
|
215
|
-
}>;
|
|
216
|
-
export declare function findSenatTexteUrls(sessions?: number[]): AsyncIterableIterator<{
|
|
217
|
-
session: string | null | undefined;
|
|
218
|
-
url: string;
|
|
219
|
-
hasExposeDesMotifs: boolean;
|
|
220
|
-
}>;
|
|
221
|
-
export declare function findSenatRapportUrls(sessions?: number[]): AsyncIterableIterator<{
|
|
222
|
-
url: string;
|
|
223
|
-
session: string | null | undefined;
|
|
224
|
-
}>;
|
|
225
|
-
declare const findAuteursQuery: import("kysely").SelectQueryBuilder<import("../raw_types/dosleg").DB, "auteur", {
|
|
93
|
+
}, "auteur", {
|
|
226
94
|
code: string;
|
|
227
95
|
nom: string;
|
|
228
96
|
prenom: string | null;
|
|
@@ -240,4 +108,6 @@ export declare function findAuteur(auteurCode: string): Promise<{
|
|
|
240
108
|
prenom: string | null;
|
|
241
109
|
matricule: string | null;
|
|
242
110
|
} | undefined>;
|
|
111
|
+
export type DossierLegislatifResult = InferResult<typeof findAllDossiersQuery>[0];
|
|
112
|
+
export type AuteurResult = InferResult<typeof findAuteursQuery>[0];
|
|
243
113
|
export {};
|
package/lib/model/dosleg.js
CHANGED
|
@@ -216,12 +216,12 @@ export function findAllScrutins() {
|
|
|
216
216
|
return findAllScrutinsQuery.stream();
|
|
217
217
|
}
|
|
218
218
|
export function findSenatTexteUrls(sessions = []) {
|
|
219
|
-
const
|
|
219
|
+
const sessionsList = sessions.map(session => session);
|
|
220
220
|
return dbDosleg
|
|
221
221
|
.selectFrom("texte")
|
|
222
222
|
.where("texurl", "is not", null)
|
|
223
223
|
.where("typurl", "=", "I")
|
|
224
|
-
.$if(
|
|
224
|
+
.$if(sessionsList.length > 0, (qb) => qb.where("sesann", "in", sessionsList))
|
|
225
225
|
.select(({ eb, ref }) => [
|
|
226
226
|
"sesann as session",
|
|
227
227
|
rtrim(ref("texurl")).as("url"),
|
|
@@ -237,12 +237,12 @@ export function findSenatTexteUrls(sessions = []) {
|
|
|
237
237
|
.stream();
|
|
238
238
|
}
|
|
239
239
|
export function findSenatRapportUrls(sessions = []) {
|
|
240
|
-
const
|
|
240
|
+
const sessionsList = sessions.map(session => session);
|
|
241
241
|
return dbDosleg
|
|
242
242
|
.selectFrom("rap")
|
|
243
243
|
.where("rapurl", "is not", null)
|
|
244
244
|
.where("typurl", "=", "I")
|
|
245
|
-
.$if(
|
|
245
|
+
.$if(sessionsList.length > 0, (qb) => qb.where("sesann", "in", sessionsList))
|
|
246
246
|
.select(({ ref }) => [
|
|
247
247
|
"sesann as session",
|
|
248
248
|
rtrim(ref("rapurl")).as("url"),
|