@tricoteuses/senat 1.1.2 → 1.3.2

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 (155) hide show
  1. package/README.md +53 -15
  2. package/lib/config.d.ts +1 -0
  3. package/lib/config.js +14 -45
  4. package/lib/databases.d.ts +9 -0
  5. package/lib/databases.js +90 -117
  6. package/lib/datasets.js +78 -83
  7. package/lib/index.d.ts +8 -7
  8. package/lib/index.js +42 -523
  9. package/lib/legislatures.json +38 -0
  10. package/lib/loaders.d.ts +64 -0
  11. package/lib/loaders.js +177 -0
  12. package/lib/model/ameli.d.ts +105 -4
  13. package/lib/model/ameli.js +88 -166
  14. package/lib/model/debats.d.ts +0 -4
  15. package/lib/model/debats.js +0 -122
  16. package/lib/model/dosleg.d.ts +227 -29
  17. package/lib/model/dosleg.js +205 -839
  18. package/lib/model/index.d.ts +4 -5
  19. package/lib/model/index.js +12 -47
  20. package/lib/model/questions.d.ts +88 -2
  21. package/lib/model/questions.js +75 -51
  22. package/lib/model/sens.d.ts +524 -2
  23. package/lib/model/sens.js +449 -56
  24. package/lib/model/texte.d.ts +7 -0
  25. package/lib/model/texte.js +251 -0
  26. package/lib/model/util.d.ts +7 -1
  27. package/lib/model/util.js +26 -59
  28. package/lib/raw_types/ameli.d.ts +912 -538
  29. package/lib/raw_types/ameli.js +3 -42
  30. package/lib/raw_types/debats.d.ts +204 -124
  31. package/lib/raw_types/debats.js +3 -21
  32. package/lib/raw_types/dosleg.d.ts +3533 -2024
  33. package/lib/raw_types/dosleg.js +3 -95
  34. package/lib/raw_types/questions.d.ts +404 -220
  35. package/lib/raw_types/questions.js +3 -21
  36. package/lib/raw_types/sens.d.ts +4391 -2706
  37. package/lib/raw_types/sens.js +3 -111
  38. package/lib/raw_types_schemats/ameli.d.ts +541 -0
  39. package/lib/raw_types_schemats/ameli.js +3 -0
  40. package/lib/raw_types_schemats/debats.d.ts +127 -0
  41. package/lib/raw_types_schemats/debats.js +3 -0
  42. package/lib/raw_types_schemats/dosleg.d.ts +2029 -0
  43. package/lib/raw_types_schemats/dosleg.js +3 -0
  44. package/lib/raw_types_schemats/questions.d.ts +233 -0
  45. package/lib/raw_types_schemats/questions.js +3 -0
  46. package/lib/raw_types_schemats/sens.d.ts +2709 -0
  47. package/lib/raw_types_schemats/sens.js +3 -0
  48. package/lib/scripts/convert_data.js +184 -275
  49. package/lib/scripts/datautil.d.ts +5 -0
  50. package/lib/scripts/datautil.js +21 -0
  51. package/lib/scripts/parse_textes.js +49 -0
  52. package/lib/scripts/retrieve_documents.js +255 -0
  53. package/lib/scripts/retrieve_open_data.js +211 -360
  54. package/lib/scripts/retrieve_senateurs_photos.js +144 -257
  55. package/lib/scripts/shared/cli_helpers.d.ts +44 -0
  56. package/lib/scripts/shared/cli_helpers.js +35 -0
  57. package/lib/scripts/shared/util.d.ts +3 -0
  58. package/lib/scripts/shared/util.js +36 -0
  59. package/lib/strings.js +20 -45
  60. package/lib/types/ameli.d.ts +2 -2
  61. package/lib/types/ameli.js +14 -25
  62. package/lib/types/debats.d.ts +2 -2
  63. package/lib/types/debats.js +3 -21
  64. package/lib/types/dosleg.d.ts +3 -3
  65. package/lib/types/dosleg.js +152 -119
  66. package/lib/types/questions.d.ts +2 -2
  67. package/lib/types/questions.js +1 -13
  68. package/lib/types/sens.d.ts +2 -4
  69. package/lib/types/sens.js +1 -16
  70. package/lib/types/sessions.d.ts +42 -0
  71. package/lib/types/sessions.js +46 -0
  72. package/lib/types/texte.d.ts +65 -0
  73. package/lib/types/texte.js +19 -0
  74. package/lib/validators/config.js +47 -111
  75. package/lib/validators/senat.js +1 -5
  76. package/package.json +35 -32
  77. package/lib/aggregates.d.ts +0 -54
  78. package/lib/aggregates.js +0 -1122
  79. package/lib/aggregates.mjs +0 -802
  80. package/lib/aggregates.ts +0 -947
  81. package/lib/config.mjs +0 -16
  82. package/lib/config.ts +0 -26
  83. package/lib/databases.mjs +0 -26
  84. package/lib/databases.ts +0 -32
  85. package/lib/datasets.mjs +0 -78
  86. package/lib/datasets.ts +0 -118
  87. package/lib/fields.d.ts +0 -10
  88. package/lib/fields.js +0 -68
  89. package/lib/fields.mjs +0 -22
  90. package/lib/fields.ts +0 -29
  91. package/lib/index.mjs +0 -7
  92. package/lib/index.ts +0 -63
  93. package/lib/inserters.d.ts +0 -102
  94. package/lib/inserters.js +0 -518
  95. package/lib/inserters.mjs +0 -376
  96. package/lib/inserters.ts +0 -545
  97. package/lib/model/ameli.mjs +0 -57
  98. package/lib/model/ameli.ts +0 -86
  99. package/lib/model/debats.mjs +0 -43
  100. package/lib/model/debats.ts +0 -68
  101. package/lib/model/dosleg.mjs +0 -337
  102. package/lib/model/dosleg.ts +0 -558
  103. package/lib/model/index.mjs +0 -5
  104. package/lib/model/index.ts +0 -11
  105. package/lib/model/questions.mjs +0 -8
  106. package/lib/model/questions.ts +0 -14
  107. package/lib/model/sens.mjs +0 -9
  108. package/lib/model/sens.ts +0 -18
  109. package/lib/model/util.mjs +0 -10
  110. package/lib/model/util.ts +0 -16
  111. package/lib/raw_types/ameli.mjs +0 -2
  112. package/lib/raw_types/ameli.ts +0 -601
  113. package/lib/raw_types/debats.mjs +0 -2
  114. package/lib/raw_types/debats.ts +0 -145
  115. package/lib/raw_types/dosleg.mjs +0 -2
  116. package/lib/raw_types/dosleg.ts +0 -2193
  117. package/lib/raw_types/questions.mjs +0 -2
  118. package/lib/raw_types/questions.ts +0 -249
  119. package/lib/raw_types/sens.mjs +0 -2
  120. package/lib/raw_types/sens.ts +0 -2907
  121. package/lib/scripts/convert_data.mjs +0 -146
  122. package/lib/scripts/convert_data.ts +0 -182
  123. package/lib/scripts/fix_db.js +0 -144
  124. package/lib/scripts/fix_db.mjs +0 -64
  125. package/lib/scripts/fix_db.ts +0 -75
  126. package/lib/scripts/images/transparent_150x192.jpg +0 -0
  127. package/lib/scripts/images/transparent_155x225.jpg +0 -0
  128. package/lib/scripts/retrieve_open_data.mjs +0 -218
  129. package/lib/scripts/retrieve_open_data.ts +0 -258
  130. package/lib/scripts/retrieve_senateurs_photos.mjs +0 -164
  131. package/lib/scripts/retrieve_senateurs_photos.ts +0 -200
  132. package/lib/scripts/retrieve_textes.js +0 -179
  133. package/lib/scripts/retrieve_textes.mjs +0 -77
  134. package/lib/scripts/retrieve_textes.ts +0 -95
  135. package/lib/strings.mjs +0 -18
  136. package/lib/strings.ts +0 -26
  137. package/lib/types/ameli.mjs +0 -13
  138. package/lib/types/ameli.ts +0 -21
  139. package/lib/types/debats.mjs +0 -2
  140. package/lib/types/debats.ts +0 -6
  141. package/lib/types/dosleg.mjs +0 -151
  142. package/lib/types/dosleg.ts +0 -284
  143. package/lib/types/questions.mjs +0 -1
  144. package/lib/types/questions.ts +0 -3
  145. package/lib/types/sens.mjs +0 -23
  146. package/lib/types/sens.ts +0 -36
  147. package/lib/typings/windows-1252.d.js +0 -2
  148. package/lib/typings/windows-1252.d.mjs +0 -2
  149. package/lib/typings/windows-1252.d.ts +0 -11
  150. package/lib/validators/config.mjs +0 -54
  151. package/lib/validators/config.ts +0 -79
  152. package/lib/validators/senat.mjs +0 -24
  153. package/lib/validators/senat.ts +0 -26
  154. /package/lib/scripts/{fix_db.d.ts → parse_textes.d.ts} +0 -0
  155. /package/lib/scripts/{retrieve_textes.d.ts → retrieve_documents.d.ts} +0 -0
@@ -1,77 +0,0 @@
1
- import assert from "assert";
2
- import commandLineArgs from "command-line-args";
3
- import fetch from "cross-fetch";
4
- import fs from "fs-extra";
5
- import path from "path";
6
- import { texteFieldsToParseInt, texteFieldsToTrim } from "../types/dosleg";
7
- import { checkDatabase } from "../databases";
8
- import { parseIntFields, trimFieldsRight } from "../fields";
9
- const optionsDefinitions = [
10
- {
11
- alias: "s",
12
- help: "don't log anything",
13
- name: "silent",
14
- type: Boolean,
15
- },
16
- {
17
- alias: "v",
18
- help: "verbose logs",
19
- name: "verbose",
20
- type: Boolean,
21
- },
22
- {
23
- defaultOption: true,
24
- help: "directory containing Sénat open data files",
25
- name: "dataDir",
26
- type: String,
27
- },
28
- ];
29
- const options = commandLineArgs(optionsDefinitions);
30
- async function main() {
31
- const dataDir = options.dataDir;
32
- assert(dataDir, "Missing argument: data directory");
33
- const db = await checkDatabase("dosleg");
34
- const legDir = path.join(dataDir, "leg");
35
- fs.ensureDirSync(legDir);
36
- const textes = (await db.any(`
37
- SELECT *
38
- FROM texte
39
- `)).map((texte) => parseIntFields(texteFieldsToParseInt, trimFieldsRight(texteFieldsToTrim, texte)));
40
- for (const texte of textes) {
41
- if (texte.texurl === null) {
42
- continue;
43
- }
44
- if (texte.typurl !== "I") {
45
- // This is not an "I"nternal URL.
46
- continue;
47
- }
48
- if (texte.texurl.endsWith(".pdf")) {
49
- continue;
50
- }
51
- const url = new URL(texte.texurl, "http://www.senat.fr/leg/").toString();
52
- if (!options.silent) {
53
- console.log(`Retrieving page ${url}…`);
54
- }
55
- const response = await fetch(url);
56
- const page = await response.text();
57
- if (!response.ok) {
58
- if (response.status === 404) {
59
- console.log(`Page ${url} not found`);
60
- }
61
- else {
62
- console.error(`An error occurred while retrieving page ${url}: ${response.status} ${response.statusText}\n${page}`);
63
- }
64
- continue;
65
- }
66
- const pathParsed = path.parse(path.join(legDir, ...texte.texurl.split("/").filter(Boolean)));
67
- const pageDir = path.join(pathParsed.dir, pathParsed.name);
68
- fs.ensureDirSync(pageDir);
69
- fs.writeFileSync(path.join(pageDir, "index" + pathParsed.ext), page);
70
- }
71
- }
72
- main()
73
- .then(() => process.exit(0))
74
- .catch((error) => {
75
- console.log(error);
76
- process.exit(1);
77
- });
@@ -1,95 +0,0 @@
1
- import assert from "assert"
2
- import commandLineArgs from "command-line-args"
3
- import fetch from "cross-fetch"
4
- import fs from "fs-extra"
5
- import path from "path"
6
-
7
- import { Texte, texteFieldsToParseInt, texteFieldsToTrim } from "../types/dosleg"
8
- import { checkDatabase } from "../databases"
9
- import { parseIntFields, trimFieldsRight } from "../fields"
10
-
11
- const optionsDefinitions = [
12
- {
13
- alias: "s",
14
- help: "don't log anything",
15
- name: "silent",
16
- type: Boolean,
17
- },
18
- {
19
- alias: "v",
20
- help: "verbose logs",
21
- name: "verbose",
22
- type: Boolean,
23
- },
24
- {
25
- defaultOption: true,
26
- help: "directory containing Sénat open data files",
27
- name: "dataDir",
28
- type: String,
29
- },
30
- ]
31
- const options = commandLineArgs(optionsDefinitions)
32
-
33
- async function main() {
34
- const dataDir = options.dataDir
35
- assert(dataDir, "Missing argument: data directory")
36
-
37
- const db = await checkDatabase("dosleg")
38
-
39
- const legDir = path.join(dataDir, "leg")
40
- fs.ensureDirSync(legDir)
41
- const textes: Texte[] = (
42
- await db.any(
43
- `
44
- SELECT *
45
- FROM texte
46
- `,
47
- )
48
- ).map((texte: Texte) =>
49
- parseIntFields(
50
- texteFieldsToParseInt,
51
- trimFieldsRight(texteFieldsToTrim, texte),
52
- ),
53
- )
54
- for (const texte of textes) {
55
- if (texte.texurl === null) {
56
- continue
57
- }
58
- if (texte.typurl !== "I") {
59
- // This is not an "I"nternal URL.
60
- continue
61
- }
62
- if (texte.texurl.endsWith(".pdf")) {
63
- continue
64
- }
65
- const url = new URL(texte.texurl, "http://www.senat.fr/leg/").toString()
66
- if (!options.silent) {
67
- console.log(`Retrieving page ${url}…`)
68
- }
69
- const response = await fetch(url)
70
- const page = await response.text()
71
- if (!response.ok) {
72
- if (response.status === 404) {
73
- console.log(`Page ${url} not found`)
74
- } else {
75
- console.error(
76
- `An error occurred while retrieving page ${url}: ${response.status} ${response.statusText}\n${page}`,
77
- )
78
- }
79
- continue
80
- }
81
- const pathParsed = path.parse(
82
- path.join(legDir, ...texte.texurl.split("/").filter(Boolean)),
83
- )
84
- const pageDir = path.join(pathParsed.dir, pathParsed.name)
85
- fs.ensureDirSync(pageDir)
86
- fs.writeFileSync(path.join(pageDir, "index" + pathParsed.ext), page)
87
- }
88
- }
89
-
90
- main()
91
- .then(() => process.exit(0))
92
- .catch((error) => {
93
- console.log(error)
94
- process.exit(1)
95
- })
package/lib/strings.mjs DELETED
@@ -1,18 +0,0 @@
1
- import originalSlugify from "slug";
2
- const slugifyCharmap = {
3
- ...originalSlugify.defaults.charmap,
4
- "'": " ",
5
- "@": " ",
6
- ".": " ",
7
- "-": "_",
8
- };
9
- export function slugify(string, replacement) {
10
- const options = {
11
- charmap: slugifyCharmap,
12
- mode: "rfc3986",
13
- };
14
- if (replacement) {
15
- options.replacement = replacement;
16
- }
17
- return originalSlugify(string, options);
18
- }
package/lib/strings.ts DELETED
@@ -1,26 +0,0 @@
1
- import originalSlugify from "slug"
2
-
3
- const slugifyCharmap = {
4
- ...originalSlugify.defaults.charmap,
5
- "'": " ",
6
- "@": " ",
7
- ".": " ",
8
- "-": "_",
9
- }
10
-
11
- interface Options {
12
- charmap: { [c: string]: string }
13
- mode: string
14
- replacement?: string
15
- }
16
-
17
- export function slugify(string: string, replacement?: string): string {
18
- const options: Options = {
19
- charmap: slugifyCharmap,
20
- mode: "rfc3986",
21
- }
22
- if (replacement) {
23
- options.replacement = replacement
24
- }
25
- return originalSlugify(string, options)
26
- }
@@ -1,13 +0,0 @@
1
- export const sesFieldsToParseInt = ["ann"];
2
- export const sesFieldsToTrim = ["lil"];
3
- export const subFieldsToParseInt = ["pos", "posder", "prires"];
4
- export const subFieldsToTrim = ["lic", "lib", "sig", "style"];
5
- export const txtAmeliFieldsToTrim = [
6
- "num",
7
- "int",
8
- "inl",
9
- "libdelim",
10
- "libcplnat",
11
- "doslegsignet",
12
- "ordsnddelib",
13
- ];
@@ -1,21 +0,0 @@
1
- import { ses as Ses, sub as Sub, subFields, txt_ameli } from "../raw_types/ameli"
2
-
3
- export { Ses, Sub }
4
-
5
- export interface TxtAmeli extends txt_ameli {
6
- subids?: subFields.id[]
7
- }
8
-
9
- export const sesFieldsToParseInt = ["ann"]
10
- export const sesFieldsToTrim = ["lil"]
11
- export const subFieldsToParseInt = ["pos", "posder", "prires"]
12
- export const subFieldsToTrim = ["lic", "lib", "sig", "style"]
13
- export const txtAmeliFieldsToTrim = [
14
- "num",
15
- "int",
16
- "inl",
17
- "libdelim",
18
- "libcplnat",
19
- "doslegsignet",
20
- "ordsnddelib",
21
- ]
@@ -1,2 +0,0 @@
1
- export const debatsFieldsToTrim = ["deburl", "libspec"];
2
- export const lecassdebFieldsToTrim = ["lecassidt"];
@@ -1,6 +0,0 @@
1
- import { debats as Debat, lecassdeb as LecAssDeb } from "../raw_types/debats"
2
-
3
- export { Debat, LecAssDeb }
4
-
5
- export const debatsFieldsToTrim = ["deburl", "libspec"]
6
- export const lecassdebFieldsToTrim = ["lecassidt"]
@@ -1,151 +0,0 @@
1
- export const assFieldsToTrim = ["libass"];
2
- export const audFieldsToTrim = ["lecassidt", "audtit", "audurl", "orgcod"];
3
- export const auteurFieldsToTrim = [
4
- "autcod",
5
- "quacod",
6
- "typautcod",
7
- "nomuse",
8
- "prenom",
9
- "nomtec",
10
- "autmat",
11
- "autfct",
12
- ];
13
- export const dateSeanceFieldsToTrim = ["lecidt", "statut"];
14
- export const deccocFieldsToTrim = ["deccoccod", "deccoclib"];
15
- export const denrapFieldsToTrim = [
16
- "coddenrap",
17
- "typraprap",
18
- "libdenrap",
19
- "denrapmin",
20
- "denraptit",
21
- "denrapstymin",
22
- "solnatrapcod",
23
- ];
24
- export const docattFieldsToParseInt = ["docattcle", "rapcod"];
25
- export const docattFieldsToTrim = ["docatturl"];
26
- export const ecrFieldsToTrim = ["autcod", "ecrqua"];
27
- export const etaloiFieldsToTrim = ["etaloilib"];
28
- export const lecassFieldsToTrim = [
29
- "lecassidt",
30
- "lecidt",
31
- "ptlurl",
32
- "ptlnumcpl",
33
- "ptlnot",
34
- "ptlurl2",
35
- "ptlnot2",
36
- "ptlurl3",
37
- "ptlnot3",
38
- "ptlnumcpl2",
39
- "ptlnumcpl3",
40
- "lecassame",
41
- "orgcod",
42
- "loiintmod",
43
- "reucom",
44
- "debatsurl",
45
- "libppr",
46
- "ptlurlcom",
47
- "aliasppr",
48
- "lecassamecom",
49
- ];
50
- export const lecassrapFieldsToTrim = ["lecassidt"];
51
- export const lectureFieldsToTrim = ["lecidt", "loicod", "typleccod", "leccom"];
52
- export const loiFieldsToTrim = [
53
- "loicod",
54
- "typloicod",
55
- "deccoccod",
56
- "numero",
57
- "loient",
58
- "motclef",
59
- "loitit",
60
- "loiint",
61
- "url_jo",
62
- "loinumjo",
63
- "loititjo",
64
- "url_jo2",
65
- "loinumjo2",
66
- "deccocurl",
67
- "num_decision",
68
- "loicodmai",
69
- "loinoudelibcod",
70
- "motionloiorigcod",
71
- "url_ordonnance",
72
- "saisine_par",
73
- "loinumjo3",
74
- "url_jo3",
75
- "url_an",
76
- "url_presart",
77
- "signetalt",
78
- "orgcod",
79
- "doscocurl",
80
- "loiintori",
81
- ];
82
- export const orgFieldsToTrim = [
83
- "orgcod",
84
- "typorgcod",
85
- "orgnom",
86
- "orgliblon",
87
- "orglibaff",
88
- "orgurl",
89
- "orglibcou",
90
- "org_de",
91
- "urltra",
92
- "inttra",
93
- "orgnomcouv",
94
- "senorgcod",
95
- "html_color",
96
- ];
97
- export const oritxtFieldsToTrim = ["oritxtcod", "oritxtlib", "oritxtlibfem"];
98
- export const quaFieldsToTrim = ["quacod", "qualic", "quaabr", "quaabrplu"];
99
- export const rapFieldsToParseInt = ["rapcod", "sesann", "rapnum", "rapnuman"];
100
- export const rapFieldsToTrim = [
101
- "coddenrap",
102
- "blecod",
103
- "raptitcou",
104
- "raptil",
105
- "rapurl",
106
- "url2",
107
- "url3",
108
- "url4",
109
- "url2txt",
110
- "url3txt",
111
- "url4txt",
112
- "prix",
113
- "numerobis",
114
- "rapsoustit",
115
- "rapres",
116
- "forpubcod",
117
- ];
118
- export const raporgFieldsToTrim = ["orgcod"];
119
- export const scrFieldsToTrim = ["scrint", "soslib"];
120
- export const texteFieldsToParseInt = ["texcod", "sesann", "texnum"];
121
- export const texteFieldsToTrim = [
122
- "oritxtcod",
123
- "typtxtcod",
124
- "lecassidt",
125
- "orgcod",
126
- "texurl",
127
- "url2",
128
- "url3",
129
- "url4",
130
- "url2txt",
131
- "url3txt",
132
- "url4txt",
133
- "prix",
134
- "numerobis",
135
- "reserve_comspe",
136
- ];
137
- export const typattFieldsToTrim = ["typattlib"];
138
- export const typlecFieldsToTrim = ["typleccod", "typleclib"];
139
- export const typloiFieldsToTrim = [
140
- "typloicod",
141
- "typloilib",
142
- "groupe",
143
- "typloiden",
144
- "typloigen",
145
- "typloitit",
146
- "typloidenplu",
147
- "typloide",
148
- "typloiabr",
149
- ];
150
- export const typtxtFieldsToTrim = ["typtxtcod", "typtxtlib"];
151
- export const typurlFieldsToTrim = ["libtypurl"];
@@ -1,284 +0,0 @@
1
- import { txt_ameliFields } from "../raw_types/ameli"
2
- import {
3
- ass as Ass,
4
- aud,
5
- audFields,
6
- auteur,
7
- date_seance,
8
- date_seanceFields as dateSeanceFields,
9
- deccoc as DecCoc,
10
- denrap as DenRap,
11
- docatt,
12
- docattFields,
13
- ecr,
14
- ecrFields,
15
- etaloi as EtaLoi,
16
- lecass,
17
- lecassFields,
18
- lecassrap,
19
- lecture,
20
- lectureFields,
21
- loi,
22
- org as Org,
23
- oritxt as OriTxt,
24
- qua as Qua,
25
- rap,
26
- raporg as RapOrg,
27
- raporgFields,
28
- scr as Scr,
29
- texte,
30
- texteFields,
31
- typatt as TypAtt,
32
- typlec as TypLec,
33
- typloi as TypLoi,
34
- typtxt as TypTxt,
35
- typurl as TypUrl,
36
- typurlFields,
37
- } from "../raw_types/dosleg"
38
- import { Debat } from "./debats"
39
- import { TxtAmeli } from "./ameli"
40
-
41
- export {
42
- Ass,
43
- DecCoc,
44
- DenRap,
45
- EtaLoi,
46
- Org,
47
- OriTxt,
48
- Qua,
49
- RapOrg,
50
- Scr,
51
- TypAtt,
52
- TypLec,
53
- TypLoi,
54
- TypTxt,
55
- TypUrl,
56
- }
57
-
58
- export interface Aud extends aud {
59
- org?: Org
60
- }
61
-
62
- export interface Auteur extends auteur {
63
- qua?: Qua
64
- }
65
-
66
- export interface DateSeance extends date_seance {
67
- debat?: Debat
68
- scrids?: string[]
69
- scrs?: Scr[]
70
- }
71
-
72
- export interface DocAtt extends docatt {
73
- rap?: Rap
74
- typatt?: TypAtt
75
- }
76
-
77
- export interface Ecr extends ecr {
78
- aut?: Auteur
79
- }
80
-
81
- export interface LecAss extends lecass {
82
- ass?: Ass
83
- auds?: Aud[]
84
- audcles?: audFields.audcle[]
85
- datesSeances?: DateSeance[]
86
- datesSeancesCodes?: dateSeanceFields.code[]
87
- debatdatseas: Date[]
88
- lecassraps?: LecAssRap[]
89
- lecassrapids?: string[]
90
- org?: Org
91
- texcods: texteFields.texcod[]
92
- textes?: Texte[]
93
- }
94
-
95
- export interface LecAssRap extends lecassrap {
96
- rap?: Rap
97
- }
98
-
99
- export interface Lecture extends lecture {
100
- typlec?: TypLec
101
- lecassidts?: lecassFields.lecassidt[]
102
- lecasss?: LecAss[]
103
- }
104
-
105
- export interface Loi extends loi {
106
- deccoc?: DecCoc
107
- etaloi?: EtaLoi
108
- lecidts?: lectureFields.lecidt[]
109
- lectures?: Lecture[]
110
- typloi?: TypLoi
111
- }
112
-
113
- export interface Rap extends rap {
114
- denrap?: DenRap
115
- docattcles?: docattFields.docattcle[]
116
- docatts?: DocAtt[]
117
- ecrnums?: ecrFields.ecrnum[]
118
- ecrs?: Ecr[]
119
- orgcods?: raporgFields.orgcod[]
120
- orgs?: Org[]
121
- }
122
-
123
- export interface Texte extends texte {
124
- ecrs?: Ecr[]
125
- ecrnums?: ecrFields.ecrnum[]
126
- libtypurl?: typurlFields.libtypurl
127
- org?: Org
128
- oritxt: OriTxt
129
- typtxt?: TypTxt
130
- txtAmeli?: TxtAmeli
131
- txtAmeliId: txt_ameliFields.id
132
- }
133
-
134
- export const assFieldsToTrim = ["libass"]
135
- export const audFieldsToTrim = ["lecassidt", "audtit", "audurl", "orgcod"]
136
- export const auteurFieldsToTrim = [
137
- "autcod",
138
- "quacod",
139
- "typautcod",
140
- "nomuse",
141
- "prenom",
142
- "nomtec",
143
- "autmat",
144
- "autfct",
145
- ]
146
- export const dateSeanceFieldsToTrim = ["lecidt", "statut"]
147
- export const deccocFieldsToTrim = ["deccoccod", "deccoclib"]
148
- export const denrapFieldsToTrim = [
149
- "coddenrap",
150
- "typraprap",
151
- "libdenrap",
152
- "denrapmin",
153
- "denraptit",
154
- "denrapstymin",
155
- "solnatrapcod",
156
- ]
157
- export const docattFieldsToParseInt = ["docattcle", "rapcod"]
158
- export const docattFieldsToTrim = ["docatturl"]
159
- export const ecrFieldsToTrim = ["autcod", "ecrqua"]
160
- export const etaloiFieldsToTrim = ["etaloilib"]
161
- export const lecassFieldsToTrim = [
162
- "lecassidt",
163
- "lecidt",
164
- "ptlurl",
165
- "ptlnumcpl",
166
- "ptlnot",
167
- "ptlurl2",
168
- "ptlnot2",
169
- "ptlurl3",
170
- "ptlnot3",
171
- "ptlnumcpl2",
172
- "ptlnumcpl3",
173
- "lecassame",
174
- "orgcod",
175
- "loiintmod",
176
- "reucom",
177
- "debatsurl",
178
- "libppr",
179
- "ptlurlcom",
180
- "aliasppr",
181
- "lecassamecom",
182
- ]
183
- export const lecassrapFieldsToTrim = ["lecassidt"]
184
- export const lectureFieldsToTrim = ["lecidt", "loicod", "typleccod", "leccom"]
185
- export const loiFieldsToTrim = [
186
- "loicod",
187
- "typloicod",
188
- "deccoccod",
189
- "numero",
190
- "loient",
191
- "motclef",
192
- "loitit",
193
- "loiint",
194
- "url_jo",
195
- "loinumjo",
196
- "loititjo",
197
- "url_jo2",
198
- "loinumjo2",
199
- "deccocurl",
200
- "num_decision",
201
- "loicodmai",
202
- "loinoudelibcod",
203
- "motionloiorigcod",
204
- "url_ordonnance",
205
- "saisine_par",
206
- "loinumjo3",
207
- "url_jo3",
208
- "url_an",
209
- "url_presart",
210
- "signetalt",
211
- "orgcod",
212
- "doscocurl",
213
- "loiintori",
214
- ]
215
- export const orgFieldsToTrim = [
216
- "orgcod",
217
- "typorgcod",
218
- "orgnom",
219
- "orgliblon",
220
- "orglibaff",
221
- "orgurl",
222
- "orglibcou",
223
- "org_de",
224
- "urltra",
225
- "inttra",
226
- "orgnomcouv",
227
- "senorgcod",
228
- "html_color",
229
- ]
230
- export const oritxtFieldsToTrim = ["oritxtcod", "oritxtlib", "oritxtlibfem"]
231
- export const quaFieldsToTrim = ["quacod", "qualic", "quaabr", "quaabrplu"]
232
- export const rapFieldsToParseInt = ["rapcod", "sesann", "rapnum", "rapnuman"]
233
- export const rapFieldsToTrim = [
234
- "coddenrap",
235
- "blecod",
236
- "raptitcou",
237
- "raptil",
238
- "rapurl",
239
- "url2",
240
- "url3",
241
- "url4",
242
- "url2txt",
243
- "url3txt",
244
- "url4txt",
245
- "prix",
246
- "numerobis",
247
- "rapsoustit",
248
- "rapres",
249
- "forpubcod",
250
- ]
251
- export const raporgFieldsToTrim = ["orgcod"]
252
- export const scrFieldsToTrim = ["scrint", "soslib"]
253
- export const texteFieldsToParseInt = ["texcod", "sesann", "texnum"]
254
- export const texteFieldsToTrim = [
255
- "oritxtcod",
256
- "typtxtcod",
257
- "lecassidt",
258
- "orgcod",
259
- "texurl",
260
- "url2",
261
- "url3",
262
- "url4",
263
- "url2txt",
264
- "url3txt",
265
- "url4txt",
266
- "prix",
267
- "numerobis",
268
- "reserve_comspe",
269
- ]
270
- export const typattFieldsToTrim = ["typattlib"]
271
- export const typlecFieldsToTrim = ["typleccod", "typleclib"]
272
- export const typloiFieldsToTrim = [
273
- "typloicod",
274
- "typloilib",
275
- "groupe",
276
- "typloiden",
277
- "typloigen",
278
- "typloitit",
279
- "typloidenplu",
280
- "typloide",
281
- "typloiabr",
282
- ]
283
- export const typtxtFieldsToTrim = ["typtxtcod", "typtxtlib"]
284
- export const typurlFieldsToTrim = ["libtypurl"]
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { tam_questions as Question } from "../raw_types/questions"
2
-
3
- export { Question }