@tricoteuses/senat 3.1.18 → 3.1.19

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.
Files changed (65) hide show
  1. package/lib/src/config.d.ts +0 -22
  2. package/lib/src/config.js +7 -17
  3. package/lib/src/conversion_textes.js +1 -5
  4. package/lib/src/databases.d.ts +2 -0
  5. package/lib/src/databases.js +26 -0
  6. package/lib/src/datasets.d.ts +0 -4
  7. package/lib/src/datasets.js +2 -16
  8. package/lib/src/git.d.ts +0 -1
  9. package/lib/src/git.js +11 -45
  10. package/lib/src/loaders.d.ts +12 -12
  11. package/lib/src/loaders.js +8 -14
  12. package/lib/src/model/agenda.d.ts +1 -1
  13. package/lib/src/model/agenda.js +3 -3
  14. package/lib/src/model/ameli.d.ts +52 -64
  15. package/lib/src/model/ameli.js +145 -147
  16. package/lib/src/model/commission.d.ts +4 -5
  17. package/lib/src/model/commission.js +6 -6
  18. package/lib/src/model/debats.d.ts +66 -38
  19. package/lib/src/model/debats.js +93 -110
  20. package/lib/src/model/documents.d.ts +12 -32
  21. package/lib/src/model/documents.js +130 -171
  22. package/lib/src/model/dosleg.d.ts +5 -142
  23. package/lib/src/model/dosleg.js +156 -298
  24. package/lib/src/model/index.d.ts +7 -7
  25. package/lib/src/model/index.js +7 -7
  26. package/lib/src/model/questions.d.ts +45 -54
  27. package/lib/src/model/questions.js +87 -89
  28. package/lib/src/model/scrutins.d.ts +13 -48
  29. package/lib/src/model/scrutins.js +111 -118
  30. package/lib/src/model/seance.d.ts +1 -1
  31. package/lib/src/model/seance.js +7 -7
  32. package/lib/src/model/sens.d.ts +179 -109
  33. package/lib/src/model/sens.js +484 -384
  34. package/lib/src/model/util.d.ts +8 -0
  35. package/lib/src/model/util.js +23 -0
  36. package/lib/src/raw_types/ameli.d.ts +800 -1648
  37. package/lib/src/raw_types/ameli.js +5 -1074
  38. package/lib/src/raw_types/debats.d.ts +180 -353
  39. package/lib/src/raw_types/debats.js +5 -266
  40. package/lib/src/raw_types/dosleg.d.ts +1523 -2858
  41. package/lib/src/raw_types/dosleg.js +5 -2005
  42. package/lib/src/raw_types/questions.d.ts +395 -671
  43. package/lib/src/raw_types/questions.js +5 -493
  44. package/lib/src/raw_types/senat.d.ts +11372 -0
  45. package/lib/src/raw_types/senat.js +5 -0
  46. package/lib/src/raw_types/sens.d.ts +8148 -7743
  47. package/lib/src/raw_types/sens.js +5 -4691
  48. package/lib/src/raw_types_schemats/ameli.d.ts +2 -4
  49. package/lib/src/raw_types_schemats/debats.d.ts +2 -2
  50. package/lib/src/raw_types_schemats/dosleg.d.ts +2 -2
  51. package/lib/src/raw_types_schemats/questions.d.ts +2 -2
  52. package/lib/src/raw_types_schemats/sens.d.ts +4235 -29
  53. package/lib/src/scripts/test_iter_load.d.ts +1 -0
  54. package/lib/src/scripts/test_iter_load.js +12 -0
  55. package/lib/src/types/ameli.d.ts +4 -4
  56. package/lib/src/types/dosleg.d.ts +39 -39
  57. package/lib/src/types/questions.d.ts +2 -2
  58. package/lib/src/types/sens.d.ts +2 -0
  59. package/lib/src/types/texte.d.ts +2 -2
  60. package/lib/src/utils/reunion_odj_building.js +27 -11
  61. package/package.json +1 -1
  62. package/lib/src/databases_postgres.d.ts +0 -4
  63. package/lib/src/databases_postgres.js +0 -23
  64. package/lib/src/scripts/debug_dosleg_query.d.ts +0 -6
  65. package/lib/src/scripts/debug_dosleg_query.js +0 -50
@@ -1,13 +1,5 @@
1
1
  import "dotenv/config";
2
2
  import { z } from "zod";
3
- export declare const dbSchema: z.ZodObject<{
4
- host: z.ZodString;
5
- name: z.ZodString;
6
- password: z.ZodString;
7
- port: z.ZodCoercedNumber<unknown>;
8
- user: z.ZodString;
9
- }, z.core.$strip>;
10
- export type DbConfig = z.infer<typeof dbSchema>;
11
3
  export declare const configSchema: z.ZodObject<{
12
4
  db: z.ZodObject<{
13
5
  host: z.ZodString;
@@ -16,13 +8,6 @@ export declare const configSchema: z.ZodObject<{
16
8
  port: z.ZodCoercedNumber<unknown>;
17
9
  user: z.ZodString;
18
10
  }, z.core.$strip>;
19
- stagingDb: z.ZodObject<{
20
- host: z.ZodString;
21
- name: z.ZodString;
22
- password: z.ZodString;
23
- port: z.ZodCoercedNumber<unknown>;
24
- user: z.ZodString;
25
- }, z.core.$strip>;
26
11
  }, z.core.$strip>;
27
12
  declare const _default: {
28
13
  db: {
@@ -32,12 +17,5 @@ declare const _default: {
32
17
  port: number;
33
18
  user: string;
34
19
  };
35
- stagingDb: {
36
- host: string;
37
- name: string;
38
- password: string;
39
- port: number;
40
- user: string;
41
- };
42
20
  };
43
21
  export default _default;
package/lib/src/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "dotenv/config";
2
2
  import { z } from "zod";
3
- export const dbSchema = z.object({
3
+ const dbSchema = z.object({
4
4
  host: z.string().trim().min(1, "Must not be empty"),
5
5
  name: z.string().trim().min(1, "Must not be empty"),
6
6
  password: z.string().trim().min(1, "Must not be empty"),
@@ -9,29 +9,19 @@ export const dbSchema = z.object({
9
9
  });
10
10
  export const configSchema = z.object({
11
11
  db: dbSchema,
12
- stagingDb: dbSchema,
13
12
  });
14
13
  const config = {
15
14
  db: {
16
- host: process.env["DB_HOST"] || "localhost",
17
- name: process.env["DB_NAME"] || "senat",
18
- password: process.env["DB_PASSWORD"] || "opendata",
19
- port: process.env["DB_PORT"] || 5432,
20
- user: process.env["DB_USER"] || "opendata",
21
- },
22
- stagingDb: {
23
- host: process.env["STAGING_DB_HOST"] || process.env["DB_HOST"] || "localhost",
24
- name: process.env["STAGING_DB_NAME"] || "senat_staging",
25
- password: process.env["STAGING_DB_PASSWORD"] || process.env["DB_PASSWORD"] || "opendata",
26
- port: process.env["STAGING_DB_PORT"] || process.env["DB_PORT"] || 5432,
27
- user: process.env["STAGING_DB_USER"] || process.env["DB_USER"] || "opendata",
15
+ host: process.env["TRICOTEUSES_SENAT_DB_HOST"] || "localhost",
16
+ name: process.env["TRICOTEUSES_SENAT_DB_NAME"] || "postgres",
17
+ password: process.env["TRICOTEUSES_SENAT_DB_PASSWORD"] || "opendata",
18
+ port: process.env["TRICOTEUSES_SENAT_DB_PORT"] || 5432,
19
+ user: process.env["TRICOTEUSES_SENAT_DB_USER"] || "opendata",
28
20
  },
29
21
  };
30
22
  const result = configSchema.safeParse(config);
31
23
  if (!result.success) {
32
- const issues = JSON.stringify(result.error.issues, null, 2);
33
- const serializedConfig = JSON.stringify(config, null, 2);
34
- console.error(`Error in configuration:\n${serializedConfig}\nError:\n${issues}`);
24
+ console.error(`Error in configuration:\n${JSON.stringify(config, null, 2)}\nError:\n${JSON.stringify(result.error.issues, null, 2)}`);
35
25
  process.exit(-1);
36
26
  }
37
27
  export default result.data;
@@ -186,11 +186,7 @@ p.has-alinea {
186
186
  <div class="header-type">${metadata.type || ""}</div>
187
187
  <div class="header-authors">${metadata.authors || ""}</div>
188
188
  ${metadata.commission
189
- ? [
190
- `<div class="header-commission">Envoyée à la ${metadata.commission.toLowerCase()},`,
191
- "sous réserve de la constitution éventuelle d'une commission spéciale dans les conditions prévues",
192
- "par le Règlement.</div>",
193
- ].join(" ")
189
+ ? `<div class="header-commission">Envoyée à la ${metadata.commission.toLowerCase()}, sous réserve de la constitution éventuelle d'une commission spéciale dans les conditions prévues par le Règlement.</div>`
194
190
  : ""}
195
191
  </div>
196
192
  <h1>${metadata.title || ""}</h1>
@@ -0,0 +1,2 @@
1
+ import { Kysely } from "kysely";
2
+ export declare const dbSenat: Kysely<any>;
@@ -0,0 +1,26 @@
1
+ import { Kysely, PostgresDialect } from "kysely";
2
+ import * as pg from "pg";
3
+ import { types } from "pg";
4
+ import Cursor from "pg-cursor";
5
+ import config from "./config";
6
+ // Map int8 to number instead of string
7
+ // https://github.com/brianc/node-pg-types#use
8
+ pg.types.setTypeParser(types.builtins.INT8, (val) => {
9
+ return parseInt(val, 10);
10
+ });
11
+ const senatPool = new pg.Pool({
12
+ database: "senat",
13
+ host: config.db.host,
14
+ user: config.db.user,
15
+ password: config.db.password,
16
+ port: config.db.port,
17
+ max: 10,
18
+ });
19
+ const senatDialect = new PostgresDialect({
20
+ pool: senatPool,
21
+ cursor: Cursor,
22
+ });
23
+ export const dbSenat = new Kysely({
24
+ log: ["error"],
25
+ dialect: senatDialect,
26
+ });
@@ -10,10 +10,6 @@ export interface Dataset {
10
10
  columns: string[];
11
11
  }>;
12
12
  };
13
- mergeKeys?: {
14
- [table: string]: string[];
15
- };
16
- rowMultisetMergeTables?: string[];
17
13
  }
18
14
  export interface Datasets {
19
15
  ameli: Dataset;
@@ -167,12 +167,6 @@ export const datasets = {
167
167
  { name: "idx_senmat", columns: ["senmat"] },
168
168
  ],
169
169
  },
170
- mergeKeys: {
171
- corscr: ["sesann", "scrnum", "corscrord"],
172
- docsea: ["evtseacle", "docseaord"],
173
- gen: ["gencod"],
174
- },
175
- rowMultisetMergeTables: ["amescr"],
176
170
  },
177
171
  questions: {
178
172
  database: "questions",
@@ -189,7 +183,6 @@ export const datasets = {
189
183
  sortquestion: [{ name: "idx_sorquecod", columns: ["sorquecod"] }],
190
184
  etatquestion: [{ name: "idx_etaquecod", columns: ["etaquecod"] }],
191
185
  },
192
- rowMultisetMergeTables: ["tam_reponses"],
193
186
  },
194
187
  sens: {
195
188
  database: "sens",
@@ -220,19 +213,12 @@ export const datasets = {
220
213
  { name: "idx_typmancod", columns: ["typmancod"] },
221
214
  ],
222
215
  },
223
- mergeKeys: {
224
- activite: ["actid"],
225
- },
226
216
  },
227
217
  };
228
- function getEnabledDatasetByName(datasetName) {
229
- const enabledDataset = EnabledDatasets[datasetName];
230
- return typeof enabledDataset === "number" ? enabledDataset : undefined;
231
- }
232
218
  export function getEnabledDatasets(categories) {
233
- categories.map((datasetName) => assert.notStrictEqual(getEnabledDatasetByName(datasetName), undefined, `Unknown name of dataset: ${datasetName}`));
219
+ categories.map((datasetName) => assert.notStrictEqual(EnabledDatasets[datasetName], undefined, `Unknown name of dataset: ${datasetName}`));
234
220
  return categories.reduce((enabledDatasets, datasetName) => {
235
- const enabledDataset = getEnabledDatasetByName(datasetName);
221
+ const enabledDataset = EnabledDatasets[datasetName];
236
222
  return enabledDatasets | (enabledDataset || EnabledDatasets.None);
237
223
  }, EnabledDatasets.None);
238
224
  }
package/lib/src/git.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export declare function initRepo(repositoryDir: string): void;
2
2
  export declare function commit(repositoryDir: string, message: string): boolean;
3
3
  export declare function commitAndPush(repositoryDir: string, message: string, remotes?: string[]): number;
4
- export declare function pull(repositoryDir: string, remote?: string, branch?: string): boolean;
5
4
  export declare function resetAndPull(gitDir: string): boolean;
6
5
  export declare function clone(gitGroupUrl: string | undefined, gitName: string, workingDir: string): void;
7
6
  export declare function run(repositoryDir: string, args: string, verbose?: boolean): string;
package/lib/src/git.js CHANGED
@@ -5,15 +5,6 @@ const MAXBUFFER = 50 * 1024 * 1024;
5
5
  const GIT_LOCK_RETRY_DELAY_MS = 1000;
6
6
  const GIT_LOCK_RETRY_COUNT = 5;
7
7
  const GIT_LOCK_STALE_AFTER_MS = 2 * 60 * 1000;
8
- function asExecSyncError(error) {
9
- return error;
10
- }
11
- function outputToString(output) {
12
- if (output == null) {
13
- return "";
14
- }
15
- return Buffer.isBuffer(output) ? output.toString("utf-8") : output;
16
- }
17
8
  function sleep(ms) {
18
9
  Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
19
10
  }
@@ -21,7 +12,7 @@ function getIndexLockPath(repositoryDir) {
21
12
  return path.join(repositoryDir, ".git", "index.lock");
22
13
  }
23
14
  function isIndexLockError(error) {
24
- const stderr = error instanceof Error ? outputToString(asExecSyncError(error).stderr) : "";
15
+ const stderr = String(error?.stderr || "");
25
16
  return /index\.lock': File exists\./.test(stderr);
26
17
  }
27
18
  function removeStaleIndexLock(repositoryDir) {
@@ -90,9 +81,9 @@ export function commit(repositoryDir, message) {
90
81
  });
91
82
  return true;
92
83
  }
93
- catch (error) {
94
- const childProcess = asExecSyncError(error);
95
- if (childProcess.stdout === null || !/nothing to commit|rien à valider/.test(outputToString(childProcess.stdout))) {
84
+ catch (childProcess) {
85
+ if (childProcess.stdout === null ||
86
+ !/nothing to commit|rien à valider/.test(childProcess.stdout)) {
96
87
  console.error(childProcess.output);
97
88
  throw childProcess;
98
89
  }
@@ -111,11 +102,10 @@ export function commitAndPush(repositoryDir, message, remotes) {
111
102
  stdio: ["ignore", "ignore", "pipe"],
112
103
  });
113
104
  }
114
- catch (error) {
115
- const childProcess = asExecSyncError(error);
105
+ catch (childProcess) {
116
106
  // Don't stop when push fails.
117
107
  console.error(childProcess.output);
118
- exitCode = childProcess.status ?? 1;
108
+ exitCode = childProcess.status;
119
109
  }
120
110
  }
121
111
  }
@@ -125,27 +115,6 @@ export function commitAndPush(repositoryDir, message, remotes) {
125
115
  }
126
116
  return exitCode;
127
117
  }
128
- export function pull(repositoryDir, remote = "origin", branch = "master") {
129
- initRepo(repositoryDir);
130
- const statusOutput = execSync("git status --porcelain", {
131
- cwd: repositoryDir,
132
- env: process.env,
133
- encoding: "utf-8",
134
- stdio: ["ignore", "pipe", "pipe"],
135
- maxBuffer: MAXBUFFER,
136
- }).trim();
137
- if (statusOutput.length > 0) {
138
- return false;
139
- }
140
- execSync(`git pull --rebase ${remote} ${branch}`, {
141
- cwd: repositoryDir,
142
- env: process.env,
143
- encoding: "utf-8",
144
- stdio: ["ignore", "ignore", "pipe"],
145
- maxBuffer: MAXBUFFER,
146
- });
147
- return true;
148
- }
149
118
  export function resetAndPull(gitDir) {
150
119
  execSync("git reset --hard origin/master", {
151
120
  cwd: gitDir,
@@ -185,11 +154,9 @@ export function run(repositoryDir, args, verbose) {
185
154
  console.log(output);
186
155
  return output;
187
156
  }
188
- catch (error) {
189
- const childProcess = asExecSyncError(error);
190
- for (const output of ["stdout", "stderr"]) {
191
- console.error(`${output}: ${outputToString(childProcess[output])}`);
192
- }
157
+ catch (childProcess) {
158
+ for (const output of ["stdout", "stderr"])
159
+ console.error(`${output}: ${childProcess[output]}`);
193
160
  throw childProcess;
194
161
  }
195
162
  }
@@ -208,9 +175,8 @@ export function test(repositoryDir, args, verbose) {
208
175
  console.log(output);
209
176
  return true;
210
177
  }
211
- catch (error) {
212
- const childProcess = asExecSyncError(error);
213
- if (childProcess.status !== 0)
178
+ catch (childProcess) {
179
+ if (childProcess.status != 0)
214
180
  return false;
215
181
  throw childProcess;
216
182
  }
@@ -1,15 +1,15 @@
1
- import { AmendementResult } from "./model/ameli.js";
2
- import { DebatResult } from "./model/debats.js";
3
- import { DossierLegislatifResult } from "./model/dosleg.js";
4
- import { QuestionResult } from "./model/questions.js";
5
- import { ScrutinResult } from "./model/scrutins.js";
6
- import { CirconscriptionResult, OrganismeResult, SenateurResult } from "./model/sens.js";
7
- import { Reunion } from "./types/agenda.js";
8
- import { FlatTexte, DocumentMetadata } from "./types/texte.js";
9
- import { CompteRendu } from "./types/compte_rendu.js";
10
- import { DocumentResult } from "./model/documents.js";
11
- export { EnabledDatasets } from "./datasets.js";
12
- export type { DocumentResult } from "./model/documents.js";
1
+ import { AmendementResult } from "./model/ameli";
2
+ import { DebatResult } from "./model/debats";
3
+ import { DossierLegislatifResult } from "./model/dosleg";
4
+ import { QuestionResult } from "./model/questions";
5
+ import { ScrutinResult } from "./model/scrutins";
6
+ import { CirconscriptionResult, OrganismeResult, SenateurResult } from "./model/sens";
7
+ import { Reunion } from "./types/agenda";
8
+ import { FlatTexte, DocumentMetadata } from "./types/texte";
9
+ import { CompteRendu } from "./types/compte_rendu";
10
+ import { DocumentResult } from "./model/documents";
11
+ export { EnabledDatasets } from "./datasets";
12
+ export type { DocumentResult } from "./model/documents";
13
13
  export declare const AGENDA_FOLDER = "agenda";
14
14
  export declare const COMPTES_RENDUS_FOLDER = "seances";
15
15
  export declare const COMMISSION_FOLDER = "commissions";
@@ -1,10 +1,10 @@
1
1
  import fsex from "fs-extra";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
- import * as git from "./git.js";
5
- import { datasets } from "./datasets.js";
6
- import { UNDEFINED_SESSION } from "./types/sessions.js";
7
- export { EnabledDatasets } from "./datasets.js";
4
+ import * as git from "./git";
5
+ import { datasets } from "./datasets";
6
+ import { UNDEFINED_SESSION } from "./types/sessions";
7
+ export { EnabledDatasets } from "./datasets";
8
8
  export const AGENDA_FOLDER = "agenda";
9
9
  export const COMPTES_RENDUS_FOLDER = "seances";
10
10
  export const COMMISSION_FOLDER = "commissions";
@@ -69,8 +69,7 @@ function* iterLoadSenatItems(dataDir, dataName, legislatureOrSession, subDir, {
69
69
  const itemJson = fs.readFileSync(filePath, { encoding: "utf8" });
70
70
  item = JSON.parse(itemJson);
71
71
  }
72
- catch (error) {
73
- const err = error;
72
+ catch (err) {
74
73
  console.warn(`[iterLoadSenatItems] skipped invalid JSON: ${filePath} (${err.message})`);
75
74
  continue;
76
75
  }
@@ -181,9 +180,6 @@ export function* iterLoadSenatTextes(dataDir, session, options = {}) {
181
180
  const texteItem = iterItem;
182
181
  const texte = texteItem.item;
183
182
  const texteId = texte["id"];
184
- if (!texteId) {
185
- continue;
186
- }
187
183
  const { item: texteContent } = loadSenatTexteContent(dataDir, texte["session"], texteId);
188
184
  if (texteContent) {
189
185
  texteItem.item = { ...texteContent, ...texteItem.item };
@@ -226,11 +222,9 @@ export function* iterLoadSenatAgendas(dataDir, session) {
226
222
  const gr = raw;
227
223
  if (!gr.uid || !gr.date || !gr.titre)
228
224
  continue;
229
- const reunion = {
230
- ...gr,
231
- events: Array.isArray(gr.events) ? gr.events : [],
232
- };
233
- yield { item: reunion };
225
+ if (!Array.isArray(gr.events))
226
+ gr.events = [];
227
+ yield { item: gr };
234
228
  }
235
229
  }
236
230
  export function* iterLoadSenatCirconscriptions(dataDir, options = {}) {
@@ -1,4 +1,4 @@
1
- import { AgendaEvent } from "../types/agenda.js";
1
+ import { AgendaEvent } from "../types/agenda";
2
2
  export declare function getStartAndEndTimes(timeStr: string | null | undefined, dateISO: string): {
3
3
  startTime: string | null;
4
4
  endTime: string | null;
@@ -1,7 +1,7 @@
1
1
  import { JSDOM } from "jsdom";
2
2
  import { DateTime } from "luxon";
3
3
  import path from "path";
4
- import { ID_DATE_FORMAT, STANDARD_DATE_FORMAT } from "../scripts/datautil.js";
4
+ import { ID_DATE_FORMAT, STANDARD_DATE_FORMAT } from "../scripts/datautil";
5
5
  const FR_TZ = "Europe/Paris";
6
6
  function eventIsSeance(eventElement) {
7
7
  return eventElement.classList.contains("evt-seance");
@@ -113,7 +113,7 @@ function transformAgenda(document, fileName) {
113
113
  const { startTime, endTime } = getStartAndEndTimes(timeOriginal, date);
114
114
  const titre = eventElement.querySelector(".titre")?.textContent?.trim() || "";
115
115
  const organe = eventElement.querySelector(".organe")?.textContent?.trim() || null;
116
- const objet = eventElement.querySelector(".objet")?.textContent?.trim()?.replace(/^- /, "") || null;
116
+ const objet = eventElement.querySelector(".objet")?.textContent?.trim()?.replace(/^- /, "") || null;
117
117
  const lieu = eventElement.querySelector(".lieu")?.textContent || null;
118
118
  const videoElement = eventElement.querySelector(".video");
119
119
  const urlDossierSenat = getUrlDossierSenat(eventElement.querySelectorAll(".lien a"));
@@ -142,7 +142,7 @@ export async function parseAgendaFromFile(htmlFilePath) {
142
142
  return transformAgenda(document, fileName);
143
143
  }
144
144
  catch (error) {
145
- console.error(`Could not parse texte with error ${error.message}`);
145
+ console.error(`Could not parse texte with error ${error}`);
146
146
  }
147
147
  return null;
148
148
  }
@@ -1,67 +1,55 @@
1
- export interface AmendementAuteurRow {
2
- group_politique_code: string | null;
3
- groupe_politique_id: number | null;
4
- groupe_politique_libelle: string | null;
5
- groupe_politique_libelle_court: string | null;
6
- homonyme: string | null;
7
- matricule: string | null;
8
- nom: string | null;
9
- prenom: string | null;
10
- qualite: string | null;
11
- rang: string | null;
12
- }
13
- export interface AmendementResult {
14
- accepte_gouvernement: string | null;
15
- alinea: number | null;
16
- auteur_est_gouvernement: boolean;
17
- au_nom_de_commission: string | null;
18
- au_nom_de_groupe_politique: string | null;
19
- auteurs: AmendementAuteurRow[];
20
- avis_commission: string | null;
21
- avis_gouvernement: string | null;
22
- code_commission: string | null;
23
- date_depot: string | null;
24
- discussion_commune_id: number | null;
25
- dispositif: string | null;
1
+ import { InferResult } from "kysely";
2
+ export type AmendementResult = InferResult<typeof findAllAmendementsQuery>[0];
3
+ declare const findAllAmendementsQuery: import("kysely").SelectQueryBuilder<{
4
+ [x: string]: any;
5
+ [x: number]: any;
6
+ [x: symbol]: any;
7
+ }, "ameli.amd" | "ameli.sub" | "ameli.typsub" | "ameli.typrect" | "ameli.txt_ameli" | "ameli.etatxt" | "ameli.ses" | "ameli.typses" | "ameli.nat" | "ameli.lec_ameli" | "dosleg.texte" | "dosleg.lecass" | "ameli.mot" | "ameli.avicom" | "ameli.avigvt" | "ameli.sor" | "ameli.irr" | "ameli.grppol_ameli" | "ameli.com_ameli" | "ameli.cab", {
8
+ [x: string]: any;
9
+ nature: string;
10
+ date_depot: string;
26
11
  etat: string;
27
- etat_texte: string | null;
28
- etat_texte_libelle: string | null;
29
- id: number;
30
- identique_id: number | null;
31
- intitule_texte: string | null;
32
- lecture: string | null;
33
- motion_libelle: string | null;
12
+ sort: any;
13
+ url: string;
14
+ au_nom_de_commission: string;
15
+ code_commission: string;
16
+ auteur_est_gouvernement: boolean;
17
+ scrutin_num: any;
18
+ auteurs: {
19
+ prenom: any;
20
+ homonyme: any;
21
+ nom: any;
22
+ qualite: any;
23
+ rang: any;
24
+ matricule: any;
25
+ groupe_politique_id: any;
26
+ group_politique_code: any;
27
+ groupe_politique_libelle_court: any;
28
+ groupe_politique_libelle: any;
29
+ }[];
30
+ }>;
31
+ export declare function findAllAmendements(fromSession?: number): AsyncIterableIterator<{
32
+ [x: string]: any;
34
33
  nature: string;
35
- nature_texte: string | null;
36
- nature_texte_libelle: string | null;
37
- numero: string;
38
- numero_absolu: string | null;
39
- numero_adoption_texte: string | null;
40
- numero_texte: string | null;
41
- objet: string | null;
42
- observations: string | null;
43
- observations_additionnelles: string | null;
44
- ordre: number | null;
45
- parent_id: number | null;
46
- revision: string | null;
47
- session: string;
48
- session_libelle: string;
49
- signet_dossier_legislatif: string | null;
50
- sort: string | null;
51
- scrutin_num: string | null;
52
- subdivision_commission_id: number | null;
53
- subdivision_dupliquee: string | null;
54
- subdivision_libelle: string | null;
55
- subdivision_libelle_court: string | null;
56
- subdivision_mere_id: number | null;
57
- subdivision_position_discussion: number | null;
58
- subdivision_position_texte: number | null;
59
- subdivision_signet: string | null;
60
- subdivision_type: string | null;
61
- texte_id: number | null;
62
- type_rectification: string | null;
63
- type_session: string | null;
64
- type_texte: string | null;
34
+ date_depot: string;
35
+ etat: string;
36
+ sort: any;
65
37
  url: string;
66
- }
67
- export declare function findAllAmendements(fromSession?: number): AsyncGenerator<AmendementResult, void, unknown>;
38
+ au_nom_de_commission: string;
39
+ code_commission: string;
40
+ auteur_est_gouvernement: boolean;
41
+ scrutin_num: any;
42
+ auteurs: {
43
+ prenom: any;
44
+ homonyme: any;
45
+ nom: any;
46
+ qualite: any;
47
+ rang: any;
48
+ matricule: any;
49
+ groupe_politique_id: any;
50
+ group_politique_code: any;
51
+ groupe_politique_libelle_court: any;
52
+ groupe_politique_libelle: any;
53
+ }[];
54
+ }>;
55
+ export {};