@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,5 +1,59 @@
1
- import { Acteur } from '../types/acteurs_et_organes';
2
- export declare function cloneAndUpdateGitRepository(photosDirName: string, options: any): void;
3
- export declare function resizePhoto(acteur: Acteur, width: number, height: number, photosDir: string, photoFilename: string, options: any): Promise<void>;
1
+ export type Options = ReturnType<typeof retrieveDeputesPhotosParser.parse>;
2
+ declare const retrieveDeputesPhotosParser: import('zod-opts').Parser<{
3
+ legislature: {
4
+ alias: string;
5
+ description: string;
6
+ type: import('zod').ZodDefault<import('zod').ZodArray<import('zod').ZodNumber>>;
7
+ };
8
+ clone: {
9
+ alias: string;
10
+ description: string;
11
+ type: import('zod').ZodOptional<import('zod').ZodString>;
12
+ };
13
+ pull: {
14
+ alias: string;
15
+ description: string;
16
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
17
+ };
18
+ fetch: {
19
+ alias: string;
20
+ description: string;
21
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
22
+ };
23
+ silent: {
24
+ alias: string;
25
+ description: string;
26
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
27
+ };
28
+ commit: {
29
+ alias: string;
30
+ description: string;
31
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
32
+ };
33
+ remote: {
34
+ alias: string;
35
+ description: string;
36
+ type: import('zod').ZodDefault<import('zod').ZodArray<import('zod').ZodString>>;
37
+ };
38
+ width: {
39
+ alias: string;
40
+ description: string;
41
+ type: import('zod').ZodDefault<import('zod').ZodNumber>;
42
+ };
43
+ height: {
44
+ alias: string;
45
+ description: string;
46
+ type: import('zod').ZodDefault<import('zod').ZodNumber>;
47
+ };
48
+ square: {
49
+ alias: string;
50
+ description: string;
51
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
52
+ };
53
+ }, [{
54
+ description: string;
55
+ type: import('zod').ZodString;
56
+ name: "dataDir";
57
+ }]>;
4
58
  export declare function downloadPhoto(urlPhoto: string, photoTempFilePath: string, photoFilePath: string, missingPhotoFilePath: string, retries?: number): Promise<void>;
5
- export declare function createMosaic(acteurUids: string[], photosDir: string, photosWidth: number, photosHeight: number, mosaicFilename: string): Promise<void>;
59
+ export {};
@@ -1,15 +1,103 @@
1
- import { Reunion } from '../types/agendas';
2
- import { Document } from '../types/dossiers_legislatifs';
3
- type CommonOptions = {
4
- dataDir?: string;
5
- legislature: number;
1
+ import { z } from 'zod';
2
+ import { ReunionClean as Reunion } from '../schemas/clean/agendas.js';
3
+ import { DocumentClean as Document, DivisionClean as Division } from '../schemas/clean/dossiers_legislatifs.js';
4
+ declare const retrieveDocumentsParser: import('zod-opts').Parser<{
5
+ format: {
6
+ alias: string;
7
+ description: string;
8
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
9
+ };
10
+ "not-found": {
11
+ alias: string;
12
+ description: string;
13
+ type: z.ZodDefault<z.ZodBoolean>;
14
+ };
15
+ "document-type": {
16
+ alias: string;
17
+ description: string;
18
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
19
+ };
20
+ forceParseDocuments: {
21
+ description: string;
22
+ type: z.ZodDefault<z.ZodBoolean>;
23
+ };
24
+ uid: {
25
+ alias: string;
26
+ description: string;
27
+ type: z.ZodOptional<z.ZodString>;
28
+ };
29
+ categories: {
30
+ alias: string;
31
+ description: string;
32
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
33
+ };
34
+ legislature: {
35
+ alias: string;
36
+ description: string;
37
+ type: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
38
+ };
39
+ silent: {
40
+ alias: string;
41
+ description: string;
42
+ type: z.ZodDefault<z.ZodBoolean>;
43
+ };
44
+ verbose: {
45
+ alias: string;
46
+ description: string;
47
+ type: z.ZodDefault<z.ZodBoolean>;
48
+ };
49
+ "only-recent": {
50
+ description: string;
51
+ type: z.ZodOptional<z.ZodNumber>;
52
+ };
53
+ keepDir: {
54
+ description: string;
55
+ type: z.ZodDefault<z.ZodBoolean>;
56
+ };
57
+ clone: {
58
+ alias: string;
59
+ description: string;
60
+ type: z.ZodOptional<z.ZodString>;
61
+ };
62
+ commit: {
63
+ alias: string;
64
+ description: string;
65
+ type: z.ZodDefault<z.ZodBoolean>;
66
+ };
67
+ remote: {
68
+ alias: string;
69
+ description: string;
70
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
71
+ };
72
+ pull: {
73
+ alias: string;
74
+ description: string;
75
+ type: z.ZodDefault<z.ZodBoolean>;
76
+ };
77
+ fetchDocuments: {
78
+ description: string;
79
+ type: z.ZodDefault<z.ZodBoolean>;
80
+ };
81
+ parseDocuments: {
82
+ description: string;
83
+ type: z.ZodDefault<z.ZodBoolean>;
84
+ };
85
+ fetchVideos: {
86
+ description: string;
87
+ type: z.ZodDefault<z.ZodBoolean>;
88
+ };
89
+ }, [{
90
+ description: string;
91
+ type: z.ZodString;
92
+ name: "dataDir";
93
+ }]>;
94
+ type Options = ReturnType<typeof retrieveDocumentsParser.parse>;
95
+ export declare function downloadAndParse(document: Document, _datasetDir: string, { dataDir, fetchDocuments, forceParseDocuments, parseDocuments, }: {
96
+ dataDir: string;
6
97
  fetchDocuments?: boolean;
98
+ forceParseDocuments?: boolean;
7
99
  parseDocuments?: boolean;
8
- fetchVideos?: boolean;
9
- onlyRecent?: number;
10
- verbose?: boolean;
11
- };
12
- export declare function downloadAndParse(document: Document, datasetDir: string, options: any): Promise<void>;
13
- export declare function downloadAndParseVideosAndCR(reunion: Reunion, datasetCleanDir: string, options: CommonOptions): Promise<void>;
14
- export declare function parseDocument(document: Document, documentPath: string, options: any): Promise<void>;
100
+ }): Promise<void>;
101
+ export declare function downloadAndParseVideosAndComptesRendus(reunion: Reunion, datasetCleanDir: string, options: Options): Promise<void>;
102
+ export declare function parseDocumentOrDivisionHtml(documentOrDivision: Document | Division, documentsFilesDir: string): Promise<void>;
15
103
  export {};
@@ -1,10 +1,81 @@
1
- import { default as commandLineArgs } from 'command-line-args';
2
- import { Dataset } from '../datasets';
1
+ import { Dataset } from '../datasets.js';
3
2
  type ProcessDatasetArguments = {
4
3
  dataset: Dataset;
5
4
  dataDir: string;
6
- options: commandLineArgs.CommandLineOptions;
5
+ options: Options;
7
6
  };
7
+ declare const retrieveOpenDataParser: import('zod-opts').Parser<{
8
+ fetch: {
9
+ alias: string;
10
+ description: string;
11
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
12
+ };
13
+ categories: {
14
+ alias: string;
15
+ description: string;
16
+ type: import('zod').ZodDefault<import('zod').ZodArray<import('zod').ZodString>>;
17
+ };
18
+ legislature: {
19
+ alias: string;
20
+ description: string;
21
+ type: import('zod').ZodDefault<import('zod').ZodArray<import('zod').ZodNumber>>;
22
+ };
23
+ silent: {
24
+ alias: string;
25
+ description: string;
26
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
27
+ };
28
+ verbose: {
29
+ alias: string;
30
+ description: string;
31
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
32
+ };
33
+ "only-recent": {
34
+ description: string;
35
+ type: import('zod').ZodOptional<import('zod').ZodNumber>;
36
+ };
37
+ keepDir: {
38
+ description: string;
39
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
40
+ };
41
+ clone: {
42
+ alias: string;
43
+ description: string;
44
+ type: import('zod').ZodOptional<import('zod').ZodString>;
45
+ };
46
+ commit: {
47
+ alias: string;
48
+ description: string;
49
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
50
+ };
51
+ remote: {
52
+ alias: string;
53
+ description: string;
54
+ type: import('zod').ZodDefault<import('zod').ZodArray<import('zod').ZodString>>;
55
+ };
56
+ pull: {
57
+ alias: string;
58
+ description: string;
59
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
60
+ };
61
+ fetchDocuments: {
62
+ description: string;
63
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
64
+ };
65
+ parseDocuments: {
66
+ description: string;
67
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
68
+ };
69
+ fetchVideos: {
70
+ description: string;
71
+ type: import('zod').ZodDefault<import('zod').ZodBoolean>;
72
+ };
73
+ }, [{
74
+ description: string;
75
+ type: import('zod').ZodString;
76
+ name: "dataDir";
77
+ }]>;
78
+ type Options = ReturnType<typeof retrieveOpenDataParser.parse>;
8
79
  /**
9
80
  * Processes a dataset by fetching, unzipping, and converting files from XML to JSON format.
10
81
  *
@@ -13,5 +84,5 @@ type ProcessDatasetArguments = {
13
84
  * @param {any} options - Options to control the processing behavior, such as fetching and silent mode.
14
85
  * @returns {Promise<void>} A promise that resolves when the dataset processing is complete.
15
86
  */
16
- export declare function processDataset(args: ProcessDatasetArguments): Promise<void>;
87
+ export declare function processDataset({ dataset, dataDir, options: { fetch, silent }, }: ProcessDatasetArguments): Promise<void>;
17
88
  export {};
@@ -1,4 +1,4 @@
1
- import { Reunion } from '../types/agendas';
1
+ import { ReunionClean as Reunion } from '../schemas/clean/agendas.js';
2
2
  type CommonOptions = {
3
3
  dataDir?: string;
4
4
  legislature: number;
@@ -1,121 +1,147 @@
1
+ import { z } from 'zod';
1
2
  export declare const silentOption: {
2
3
  alias: string;
3
- help: string;
4
- name: string;
5
- type: BooleanConstructor;
4
+ description: string;
5
+ type: z.ZodDefault<z.ZodBoolean>;
6
6
  };
7
7
  export declare const verboseOption: {
8
8
  alias: string;
9
- help: string;
10
- name: string;
11
- type: BooleanConstructor;
9
+ description: string;
10
+ type: z.ZodDefault<z.ZodBoolean>;
12
11
  };
13
12
  export declare const categoriesOption: {
14
13
  alias: string;
15
- defaultValue: string[];
16
- help: string;
17
- multiple: boolean;
18
- name: string;
19
- type: StringConstructor;
14
+ description: string;
15
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
20
16
  };
21
17
  export declare const legislatureOption: {
22
18
  alias: string;
23
- help: string;
24
- multiple: boolean;
25
- name: string;
26
- type: NumberConstructor;
19
+ description: string;
20
+ type: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
27
21
  };
28
22
  export declare const dataDirDefaultOption: {
29
- defaultOption: boolean;
30
- help: string;
31
- name: string;
32
- type: StringConstructor;
23
+ description: string;
24
+ type: z.ZodString;
25
+ };
26
+ export declare const dataDirArg: {
27
+ description: string;
28
+ type: z.ZodString;
29
+ name: "dataDir";
33
30
  };
34
31
  export declare const fetchOption: {
35
32
  alias: string;
36
- help: string;
37
- name: string;
38
- type: BooleanConstructor;
33
+ description: string;
34
+ type: z.ZodDefault<z.ZodBoolean>;
39
35
  };
40
36
  export declare const fetchDocumentsOption: {
41
- help: string;
42
- name: string;
43
- type: BooleanConstructor;
37
+ description: string;
38
+ type: z.ZodDefault<z.ZodBoolean>;
44
39
  };
45
40
  export declare const parseDocumentsOption: {
46
- help: string;
47
- name: string;
48
- type: BooleanConstructor;
41
+ description: string;
42
+ type: z.ZodDefault<z.ZodBoolean>;
49
43
  };
50
44
  export declare const documentFormatOption: {
51
45
  alias: string;
52
- help: string;
53
- name: string;
54
- multiple: boolean;
55
- type: StringConstructor;
46
+ description: string;
47
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
56
48
  };
57
49
  export declare const notFoundOption: {
58
50
  alias: string;
59
- help: string;
60
- name: string;
61
- type: BooleanConstructor;
51
+ description: string;
52
+ type: z.ZodDefault<z.ZodBoolean>;
62
53
  };
63
54
  export declare const onlyRecentOption: {
64
- help: string;
65
- name: string;
66
- type: NumberConstructor;
55
+ description: string;
56
+ type: z.ZodOptional<z.ZodNumber>;
67
57
  };
68
58
  export declare const cloneOption: {
69
59
  alias: string;
70
- help: string;
71
- name: string;
72
- type: StringConstructor;
60
+ description: string;
61
+ type: z.ZodOptional<z.ZodString>;
73
62
  };
74
63
  export declare const commitOption: {
75
64
  alias: string;
76
- help: string;
77
- name: string;
78
- type: BooleanConstructor;
65
+ description: string;
66
+ type: z.ZodDefault<z.ZodBoolean>;
79
67
  };
80
68
  export declare const remoteOption: {
81
69
  alias: string;
82
- help: string;
83
- multiple: boolean;
84
- name: string;
85
- type: StringConstructor;
70
+ description: string;
71
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
86
72
  };
87
73
  export declare const pullOption: {
88
74
  alias: string;
89
- help: string;
90
- name: string;
91
- type: BooleanConstructor;
75
+ description: string;
76
+ type: z.ZodDefault<z.ZodBoolean>;
92
77
  };
93
78
  export declare const fetchVideosOption: {
94
- help: string;
95
- name: string;
96
- type: BooleanConstructor;
79
+ description: string;
80
+ type: z.ZodDefault<z.ZodBoolean>;
97
81
  };
98
82
  export declare const keepDirOption: {
99
- help: string;
100
- name: string;
101
- type: BooleanConstructor;
102
- };
103
- export declare const commonOptions: ({
104
- defaultOption: boolean;
105
- help: string;
106
- name: string;
107
- type: StringConstructor;
108
- } | {
109
- help: string;
110
- name: string;
111
- type: BooleanConstructor;
112
- } | {
113
- help: string;
114
- name: string;
115
- type: NumberConstructor;
116
- } | {
117
- alias: string;
118
- help: string;
119
- name: string;
120
- type: StringConstructor;
121
- })[];
83
+ description: string;
84
+ type: z.ZodDefault<z.ZodBoolean>;
85
+ };
86
+ export declare const commonOptions: {
87
+ readonly categories: {
88
+ alias: string;
89
+ description: string;
90
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
91
+ };
92
+ readonly legislature: {
93
+ alias: string;
94
+ description: string;
95
+ type: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
96
+ };
97
+ readonly silent: {
98
+ alias: string;
99
+ description: string;
100
+ type: z.ZodDefault<z.ZodBoolean>;
101
+ };
102
+ readonly verbose: {
103
+ alias: string;
104
+ description: string;
105
+ type: z.ZodDefault<z.ZodBoolean>;
106
+ };
107
+ readonly "only-recent": {
108
+ description: string;
109
+ type: z.ZodOptional<z.ZodNumber>;
110
+ };
111
+ readonly keepDir: {
112
+ description: string;
113
+ type: z.ZodDefault<z.ZodBoolean>;
114
+ };
115
+ readonly clone: {
116
+ alias: string;
117
+ description: string;
118
+ type: z.ZodOptional<z.ZodString>;
119
+ };
120
+ readonly commit: {
121
+ alias: string;
122
+ description: string;
123
+ type: z.ZodDefault<z.ZodBoolean>;
124
+ };
125
+ readonly remote: {
126
+ alias: string;
127
+ description: string;
128
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
129
+ };
130
+ readonly pull: {
131
+ alias: string;
132
+ description: string;
133
+ type: z.ZodDefault<z.ZodBoolean>;
134
+ };
135
+ readonly fetchDocuments: {
136
+ description: string;
137
+ type: z.ZodDefault<z.ZodBoolean>;
138
+ };
139
+ readonly parseDocuments: {
140
+ description: string;
141
+ type: z.ZodDefault<z.ZodBoolean>;
142
+ };
143
+ readonly fetchVideos: {
144
+ description: string;
145
+ type: z.ZodDefault<z.ZodBoolean>;
146
+ };
147
+ };
@@ -0,0 +1,106 @@
1
+ import { z } from 'zod';
2
+ import { ActeurClean as Acteur } from '../../schemas/clean/acteurs_et_organes.js';
3
+ export type PhotosOptions = ReturnType<typeof retrievePhotosParser.parse>;
4
+ export declare const photosOptions: {
5
+ clone: {
6
+ alias: string;
7
+ description: string;
8
+ type: z.ZodOptional<z.ZodString>;
9
+ };
10
+ pull: {
11
+ alias: string;
12
+ description: string;
13
+ type: z.ZodDefault<z.ZodBoolean>;
14
+ };
15
+ fetch: {
16
+ alias: string;
17
+ description: string;
18
+ type: z.ZodDefault<z.ZodBoolean>;
19
+ };
20
+ silent: {
21
+ alias: string;
22
+ description: string;
23
+ type: z.ZodDefault<z.ZodBoolean>;
24
+ };
25
+ commit: {
26
+ alias: string;
27
+ description: string;
28
+ type: z.ZodDefault<z.ZodBoolean>;
29
+ };
30
+ remote: {
31
+ alias: string;
32
+ description: string;
33
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
34
+ };
35
+ width: {
36
+ alias: string;
37
+ description: string;
38
+ type: z.ZodDefault<z.ZodNumber>;
39
+ };
40
+ height: {
41
+ alias: string;
42
+ description: string;
43
+ type: z.ZodDefault<z.ZodNumber>;
44
+ };
45
+ square: {
46
+ alias: string;
47
+ description: string;
48
+ type: z.ZodDefault<z.ZodBoolean>;
49
+ };
50
+ };
51
+ export declare const retrievePhotosParser: import('zod-opts').Parser<{
52
+ clone: {
53
+ alias: string;
54
+ description: string;
55
+ type: z.ZodOptional<z.ZodString>;
56
+ };
57
+ pull: {
58
+ alias: string;
59
+ description: string;
60
+ type: z.ZodDefault<z.ZodBoolean>;
61
+ };
62
+ fetch: {
63
+ alias: string;
64
+ description: string;
65
+ type: z.ZodDefault<z.ZodBoolean>;
66
+ };
67
+ silent: {
68
+ alias: string;
69
+ description: string;
70
+ type: z.ZodDefault<z.ZodBoolean>;
71
+ };
72
+ commit: {
73
+ alias: string;
74
+ description: string;
75
+ type: z.ZodDefault<z.ZodBoolean>;
76
+ };
77
+ remote: {
78
+ alias: string;
79
+ description: string;
80
+ type: z.ZodDefault<z.ZodArray<z.ZodString>>;
81
+ };
82
+ width: {
83
+ alias: string;
84
+ description: string;
85
+ type: z.ZodDefault<z.ZodNumber>;
86
+ };
87
+ height: {
88
+ alias: string;
89
+ description: string;
90
+ type: z.ZodDefault<z.ZodNumber>;
91
+ };
92
+ square: {
93
+ alias: string;
94
+ description: string;
95
+ type: z.ZodDefault<z.ZodBoolean>;
96
+ };
97
+ }, [{
98
+ description: string;
99
+ type: z.ZodString;
100
+ name: "dataDir";
101
+ }]>;
102
+ export declare function cloneAndUpdatePhotosGitRepository(photosDirName: string, { clone, dataDir, pull }: PhotosOptions): void;
103
+ export declare function createMosaic(acteurUids: string[], photosDir: string, photosWidth: number, photosHeight: number, mosaicFilename: string): Promise<void>;
104
+ export declare function resizePhoto(acteur: Acteur, width: number, height: number, photosDir: string, photoFilename: string, { silent }: {
105
+ silent: boolean;
106
+ }): Promise<void>;
@@ -1,3 +1,6 @@
1
1
  export declare const writeIfChanged: (p: string, content: string) => Promise<void>;
2
2
  export declare function fetchWithRetry(url: string, retries?: number, backoff?: number): Promise<Response>;
3
- export declare function newestRequestedLegislature(options: any): number | null;
3
+ export declare function newestRequestedLegislature({ onlyRecent, legislature, }: {
4
+ onlyRecent?: number;
5
+ legislature: number[];
6
+ }): number | null;
package/lib/urls.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Document, Division } from './types/dossiers_legislatifs';
2
- import { Scrutin } from './types/scrutins';
1
+ import { DocumentClean as Document, DivisionClean as Division } from './schemas/clean/dossiers_legislatifs.js';
2
+ import { ScrutinClean as Scrutin } from './schemas/clean/scrutins.js';
3
3
  export declare enum DocumentUrlFormat {
4
4
  Html = "html",
5
5
  Pdf = "pdf",