@tricoteuses/senat 2.9.8 → 2.9.10

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.
@@ -1,11 +1,42 @@
1
- import { InferResult } from "kysely";
2
- export type DossierLegislatifResult = InferResult<typeof findAllDossiersQuery>[0];
3
- export type AuteurResult = InferResult<typeof findAuteursQuery>[0];
4
- declare const findAllDossiersQuery: import("kysely").SelectQueryBuilder<{
5
- ses: import("../raw_types/dosleg").Ses;
6
- qua: import("../raw_types/dosleg").Qua;
7
- lecture: import("../raw_types/dosleg").Lecture;
8
- loi: import("../raw_types/dosleg").Loi;
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("kysely").Nullable<import("../raw_types/dosleg").Etaloi>;
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("kysely").Nullable<import("../raw_types/dosleg").Typloi>;
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
- }, "loi" | "etaloi" | "typloi", {
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 {};
@@ -216,12 +216,12 @@ export function findAllScrutins() {
216
216
  return findAllScrutinsQuery.stream();
217
217
  }
218
218
  export function findSenatTexteUrls(sessions = []) {
219
- const sessionsStr = sessions.map(session => String(session));
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(sessions.length > 0, (qb) => qb.where("sesann", "in", sessionsStr))
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 sessionsStr = sessions.map(session => String(session));
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(sessions.length > 0, (qb) => qb.where("sesann", "in", sessionsStr))
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"),
@@ -2,17 +2,17 @@ import { InferResult } from "kysely";
2
2
  export type QuestionResult = InferResult<typeof findAllQuery>[0];
3
3
  declare const findAllQuery: import("kysely").SelectQueryBuilder<{
4
4
  the: import("../raw_types/questions").The;
5
- tam_questions: import("../raw_types/questions").TamQuestions;
6
5
  etatquestion: import("kysely").Nullable<import("../raw_types/questions").Etatquestion>;
7
6
  legquestion: import("../raw_types/questions").Legquestion;
8
7
  naturequestion: import("kysely").Nullable<import("../raw_types/questions").Naturequestion>;
9
8
  sortquestion: import("kysely").Nullable<import("../raw_types/questions").Sortquestion>;
10
9
  tam_ministeres: import("kysely").Nullable<import("../raw_types/questions").TamMinisteres>;
10
+ tam_questions: import("../raw_types/questions").TamQuestions;
11
11
  tam_reponses: import("../raw_types/questions").TamReponses;
12
- }, "tam_questions" | "etatquestion" | "naturequestion" | "sortquestion" | "tam_ministeres", {
12
+ }, "etatquestion" | "naturequestion" | "sortquestion" | "tam_ministeres" | "tam_questions", {
13
13
  date_publication_JO: string;
14
- republique: string | null;
15
- legislature: string | null;
14
+ republique: number | null;
15
+ legislature: number | null;
16
16
  sort: string | null;
17
17
  nature: string | null;
18
18
  numero: string | null;
@@ -48,8 +48,8 @@ declare const findAllQuery: import("kysely").SelectQueryBuilder<{
48
48
  }>;
49
49
  export declare function findAll(): AsyncIterableIterator<{
50
50
  date_publication_JO: string;
51
- republique: string | null;
52
- legislature: string | null;
51
+ republique: number | null;
52
+ legislature: number | null;
53
53
  sort: string | null;
54
54
  nature: string | null;
55
55
  numero: string | null;