@tricoteuses/assemblee 2.5.31 → 3.0.1

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 (94) hide show
  1. package/LICENSE.md +16 -6
  2. package/README.md +1 -19
  3. package/lib/amendements-CXmsqoof.js +170 -0
  4. package/lib/amendements-CZHXlq07.js +4198 -0
  5. package/lib/cleaners/acteurs.d.ts +2 -1
  6. package/lib/cleaners/amendements.d.ts +2 -1
  7. package/lib/cleaners/debats.d.ts +2 -1
  8. package/lib/cleaners/documents.d.ts +2 -1
  9. package/lib/cleaners/dossiers_legislatifs.d.ts +2 -1
  10. package/lib/cleaners/organes.d.ts +2 -1
  11. package/lib/cleaners/questions.d.ts +2 -1
  12. package/lib/cleaners/reunions.d.ts +2 -1
  13. package/lib/cleaners/scrutins.d.ts +2 -1
  14. package/lib/cleaners/xml.d.ts +5 -5
  15. package/lib/cleaners.js +186 -179
  16. package/lib/datasets.d.ts +5 -7
  17. package/lib/dossiers_legislatifs.d.ts +5 -2
  18. package/lib/file_systems.d.ts +9 -4
  19. package/lib/index.d.ts +24 -19
  20. package/lib/index.js +390 -1234
  21. package/lib/inserters.d.ts +466 -9
  22. package/lib/loaders.d.ts +13 -12
  23. package/lib/loaders.js +1900 -538
  24. package/lib/organes.d.ts +1 -1
  25. package/lib/parsers/compte_rendu.d.ts +2 -1
  26. package/lib/parsers/compte_rendu_commission.d.ts +1 -1
  27. package/lib/parsers/recherche_amendements.d.ts +2 -2
  28. package/lib/parsers/textes_lois.d.ts +1 -1
  29. package/lib/parsers.js +2109 -2075
  30. package/lib/questions-DTO3nK5V.js +2777 -0
  31. package/lib/questions-DXAzvI1T.js +230 -0
  32. package/lib/registries.d.ts +112 -0
  33. package/lib/schemas/clean/acteurs_et_organes.d.ts +2377 -0
  34. package/lib/schemas/clean/agendas.d.ts +830 -0
  35. package/lib/schemas/clean/amendements.d.ts +2305 -0
  36. package/lib/schemas/clean/debats.d.ts +300 -0
  37. package/lib/schemas/clean/dossiers_legislatifs.d.ts +1365 -0
  38. package/lib/schemas/clean/questions.d.ts +625 -0
  39. package/lib/schemas/clean/scrutins.d.ts +1137 -0
  40. package/lib/schemas/enriched/acteurs_et_organes.d.ts +112 -0
  41. package/lib/schemas/enriched/agendas.d.ts +501 -0
  42. package/lib/schemas/enriched/amendements.d.ts +1230 -0
  43. package/lib/schemas/enriched/debats.d.ts +308 -0
  44. package/lib/schemas/enriched/dossiers_legislatifs.d.ts +1131 -0
  45. package/lib/schemas/enriched/questions.d.ts +589 -0
  46. package/lib/schemas/enriched/scrutins.d.ts +1094 -0
  47. package/lib/schemas/raw/acteurs_et_organes.d.ts +5870 -0
  48. package/lib/schemas/raw/agendas.d.ts +1734 -0
  49. package/lib/schemas/raw/amendements.d.ts +4758 -0
  50. package/lib/schemas/raw/debats.d.ts +410 -0
  51. package/lib/schemas/raw/dossiers_legislatifs.d.ts +3252 -0
  52. package/lib/schemas/raw/questions.d.ts +983 -0
  53. package/lib/schemas/raw/scrutins.d.ts +2763 -0
  54. package/lib/scripts/retrieve_deputes_photos.d.ts +58 -4
  55. package/lib/scripts/retrieve_documents.d.ts +100 -12
  56. package/lib/scripts/retrieve_open_data.d.ts +75 -4
  57. package/lib/scripts/retrieve_videos.d.ts +1 -1
  58. package/lib/scripts/shared/cli_helpers.d.ts +103 -77
  59. package/lib/scripts/shared/photos.d.ts +106 -0
  60. package/lib/scripts/shared/utils.d.ts +4 -1
  61. package/lib/urls.d.ts +2 -2
  62. package/package.json +16 -12
  63. package/lib/amendements-40Z7OJLT.js +0 -682
  64. package/lib/amendements-J6Sx61n8.js +0 -154
  65. package/lib/datasets-Cb3wpfRH.js +0 -3580
  66. package/lib/parse-Ccs6wcUg.js +0 -2512
  67. package/lib/raw_types/acteurs_et_organes.d.ts +0 -464
  68. package/lib/raw_types/agendas.d.ts +0 -265
  69. package/lib/raw_types/amendements.d.ts +0 -365
  70. package/lib/raw_types/debats.d.ts +0 -140
  71. package/lib/raw_types/dossiers_legislatifs.d.ts +0 -567
  72. package/lib/raw_types/questions.d.ts +0 -115
  73. package/lib/raw_types/scrutins.d.ts +0 -187
  74. package/lib/schemas/acteurs_et_organes.json +0 -1167
  75. package/lib/schemas/agendas.json +0 -1757
  76. package/lib/schemas/amendements.json +0 -2087
  77. package/lib/schemas/compte_rendu_commission/CompteRenduCommission.json +0 -63
  78. package/lib/schemas/debats.json +0 -847
  79. package/lib/schemas/dossiers_legislatifs.json +0 -3884
  80. package/lib/schemas/legislatures.json +0 -17
  81. package/lib/schemas/questions.json +0 -711
  82. package/lib/schemas/scrutins.json +0 -701
  83. package/lib/scripts/copy-schemas.d.ts +0 -1
  84. package/lib/scripts/generate-json-schemas.d.ts +0 -1
  85. package/lib/shared_types/acteurs_et_organes.d.ts +0 -149
  86. package/lib/shared_types/dossiers_legislatifs.d.ts +0 -222
  87. package/lib/types/acteurs_et_organes.d.ts +0 -598
  88. package/lib/types/agendas.d.ts +0 -442
  89. package/lib/types/amendements.d.ts +0 -615
  90. package/lib/types/debats.d.ts +0 -186
  91. package/lib/types/dossiers_legislatifs.d.ts +0 -826
  92. package/lib/types/questions.d.ts +0 -203
  93. package/lib/types/scrutins.d.ts +0 -254
  94. /package/lib/{types/legislatures.d.ts → legislatures.d.ts} +0 -0
@@ -1,154 +0,0 @@
1
- import c from "node:assert";
2
- import { b as d } from "./amendements-40Z7OJLT.js";
3
- const b = {
4
- false: !1,
5
- true: !0
6
- }, C = "http://schemas.assemblee-nationale.fr/referentiel", x = "http://www.w3.org/2001/XMLSchema-instance";
7
- function A(e, i) {
8
- const t = e[i];
9
- if (t == null) {
10
- delete e[i];
11
- return;
12
- }
13
- const r = b[t];
14
- return c.notStrictEqual(
15
- r,
16
- void 0,
17
- `Invalid boolean value: ${i} = ${t}`
18
- ), e[i] = r, r;
19
- }
20
- function _(e, i) {
21
- const t = e[i];
22
- if (t == null) {
23
- delete e[i];
24
- return;
25
- }
26
- const r = Number.parseInt(t);
27
- return c(
28
- !Number.isNaN(r),
29
- `Invalid number value: ${i} = ${t}`
30
- ), e[i] = r, r;
31
- }
32
- function a(e) {
33
- const i = e["@xmlns"] ?? e.xmlns;
34
- i !== void 0 && (c.strictEqual(i, C), delete e["@xmlns"], delete e.xmlns), e["@xmlns:xsi"] === x && delete e["@xmlns:xsi"];
35
- for (const t in e) {
36
- const r = e[t];
37
- if (r === null) {
38
- delete e[t];
39
- continue;
40
- }
41
- r !== void 0 && (r["@xsi:nil"] === "true" || Array.isArray(r) && r.length === 0 || !Array.isArray(r) && r.constructor === Object && Object.keys(r).length === 0) && delete e[t];
42
- }
43
- }
44
- function S(e) {
45
- a(e);
46
- const i = e.signataires;
47
- {
48
- a(i);
49
- const s = i.auteur;
50
- if (a(s), i.cosignataires !== void 0) {
51
- const o = i.cosignataires.acteurRef;
52
- Array.isArray(o) ? i.cosignatairesRefs = o : (c(o), i.cosignatairesRefs = [o]), delete i.cosignataires;
53
- }
54
- let n = i.libelle;
55
- n !== void 0 && (n = n.replace(/ |\u00A0/g, " ").split(" ").filter(Boolean).join(" "), n ? i.libelle = n : delete i.libelle);
56
- }
57
- const t = e.pointeurFragmentTexte;
58
- {
59
- a(t);
60
- const s = t.division;
61
- if (s !== void 0) {
62
- a(s);
63
- let o = s.avant_A_Apres;
64
- o !== void 0 && (delete s.avant_A_Apres, o === "Après" && (o = d.Apres), s.avantAApres = o);
65
- }
66
- const n = t.amendementStandard;
67
- if (n !== void 0) {
68
- a(n);
69
- const o = n.alinea;
70
- if (o !== void 0) {
71
- a(o);
72
- let f = o.avant_A_Apres;
73
- f !== void 0 && (delete o.avant_A_Apres, f === "Après" ? f = d.Apres : [d.A, d.Apres, d.Avant].includes(
74
- f
75
- ) || (f = d.A), o.avantAApres = f), t.alinea = o;
76
- }
77
- delete t.amendementStandard;
78
- }
79
- }
80
- const r = e.corps;
81
- if (r !== void 0) {
82
- a(r);
83
- const s = r.contenuAuteur;
84
- if (s !== void 0) {
85
- a(s);
86
- const n = s.avantAppel;
87
- n !== void 0 && (a(n), v(n.dispositifAmdtCreditPLF, {
88
- rectificatif: !1
89
- }), v(n.dispositifAmdtCreditPLFR, {
90
- rectificatif: !0
91
- }), Object.keys(n).length === 0 && delete s.avantAppel), c.strictEqual(s.annexeExposeSommaire, void 0), v(s.dispositifAmdtCreditPLF, {
92
- rectificatif: !1
93
- }), v(s.dispositifAmdtCreditPLFR, {
94
- rectificatif: !0
95
- });
96
- }
97
- }
98
- const l = e.cycleDeVie;
99
- if (l !== void 0) {
100
- a(l);
101
- const s = l.etatDesTraitements;
102
- {
103
- a(s);
104
- const n = s.etat;
105
- a(n);
106
- const o = s.sousEtat;
107
- o !== void 0 && a(o);
108
- }
109
- }
110
- if (e.representations !== void 0) {
111
- const s = e.representations.representation;
112
- c(!Array.isArray(s)), e.representation = s, delete e.representations;
113
- {
114
- a(s), c.strictEqual(s.repSource, void 0), c.strictEqual(s.offset, void 0), c.strictEqual(s.dateDispoRepresentation, void 0);
115
- const n = s.statutRepresentation;
116
- A(n, "canonique"), A(n, "enregistrement"), A(n, "officielle"), A(n, "transcription"), A(n, "verbatim");
117
- }
118
- }
119
- const u = e.loiReference;
120
- u !== void 0 && a(u);
121
- const p = e.discussionCommune;
122
- p !== void 0 && a(p);
123
- const g = e.discussionIdentique;
124
- g !== void 0 && a(g);
125
- }
126
- function v(e, { rectificatif: i }) {
127
- if (e !== void 0) {
128
- const t = e.listeProgrammes?.programme;
129
- if (t !== void 0) {
130
- Array.isArray(t) ? e.listeProgrammes = t : (c(t), e.listeProgrammes = [t]);
131
- for (const r of e.listeProgrammes)
132
- if (a(r), r.lignesCredits !== void 0) {
133
- let l = r.lignesCredits.ligneCredit;
134
- if (l === void 0 ? delete r.lignesCredits : (Array.isArray(l) || (c(l), l = [l]), r.lignesCredits = l), l !== void 0)
135
- for (const u of l)
136
- i ? m(u) : a(u);
137
- }
138
- }
139
- }
140
- }
141
- function m(e) {
142
- if (a(e), e.lignesCredits !== void 0) {
143
- let i = e.lignesCredits.ligneCredit;
144
- if (i === void 0 ? delete e.lignesCredits : (Array.isArray(i) || (c(i), i = [i]), e.lignesCredits = i), i !== void 0)
145
- for (const t of i)
146
- m(t);
147
- }
148
- }
149
- export {
150
- A as a,
151
- _ as b,
152
- a as c,
153
- S as d
154
- };