@tricoteuses/assemblee 3.8.5 → 3.9.0

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.
package/lib/parsers.js CHANGED
@@ -1,6 +1,6 @@
1
- import { t as e } from "./browser-Dl6SgoZX.js";
2
- import { Bt as t, Rt as n, Vt as r, i, zt as a } from "./amendements-DfZse75q.js";
3
- import { t as o } from "./amendements-BtCdrXW8.js";
1
+ import { t as e } from "./browser-Ckcl9VyG.js";
2
+ import { Bt as t, Rt as n, Vt as r, i, zt as a } from "./amendements-RAabukws.js";
3
+ import { t as o } from "./amendements-CKRr2Iqv.js";
4
4
  import s from "node:assert";
5
5
  import c from "fs-extra";
6
6
  import l from "node:path";
@@ -244,7 +244,7 @@ function D(t, n) {
244
244
  };
245
245
  }
246
246
  //#endregion
247
- //#region node_modules/date-fns/formatISO.js
247
+ //#region ../../../node_modules/date-fns/formatISO.js
248
248
  function O(e, n) {
249
249
  let i = r(e, n?.in);
250
250
  if (isNaN(+i)) throw RangeError("Invalid time value");
@@ -168,6 +168,15 @@ export declare const MetadonneesCleanSchema: z.ZodObject<{
168
168
  }, z.core.$strip>;
169
169
  }, z.core.$strip>;
170
170
  export type MetadonneesClean = z.infer<typeof MetadonneesCleanSchema>;
171
+ /**
172
+ * État de publication d'un compte rendu, calculé au nettoyage.
173
+ */
174
+ export declare const EtatPublicationCompteRenduSchema: z.ZodEnum<{
175
+ finalise: "finalise";
176
+ en_cours_de_finalisation: "en_cours_de_finalisation";
177
+ sans_compte_rendu_ecrit: "sans_compte_rendu_ecrit";
178
+ }>;
179
+ export type EtatPublicationCompteRendu = z.infer<typeof EtatPublicationCompteRenduSchema>;
171
180
  /**
172
181
  * Compte Rendu (single debate transcript) - clean version
173
182
  * Note: schemaVersion optional (from QuickType types)
@@ -212,6 +221,11 @@ export declare const CompteRenduCleanSchema: z.ZodObject<{
212
221
  }, z.core.$strip>>;
213
222
  paragraphe: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodType<PointClean, unknown, z.core.$ZodTypeInternals<PointClean, unknown>>>, unknown>>;
214
223
  }, z.core.$strip>;
224
+ etatPublication: z.ZodOptional<z.ZodEnum<{
225
+ finalise: "finalise";
226
+ en_cours_de_finalisation: "en_cours_de_finalisation";
227
+ sans_compte_rendu_ecrit: "sans_compte_rendu_ecrit";
228
+ }>>;
215
229
  videoUrl: z.ZodOptional<z.ZodString>;
216
230
  videoTimecode: z.ZodOptional<z.ZodNumber>;
217
231
  }, z.core.$strip>;
@@ -260,6 +274,11 @@ export declare const ComptesRendusCleanSchema: z.ZodObject<{
260
274
  }, z.core.$strip>>;
261
275
  paragraphe: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodType<PointClean, unknown, z.core.$ZodTypeInternals<PointClean, unknown>>>, unknown>>;
262
276
  }, z.core.$strip>;
277
+ etatPublication: z.ZodOptional<z.ZodEnum<{
278
+ finalise: "finalise";
279
+ en_cours_de_finalisation: "en_cours_de_finalisation";
280
+ sans_compte_rendu_ecrit: "sans_compte_rendu_ecrit";
281
+ }>>;
263
282
  videoUrl: z.ZodOptional<z.ZodString>;
264
283
  videoTimecode: z.ZodOptional<z.ZodNumber>;
265
284
  }, z.core.$strip>>;
@@ -185,6 +185,11 @@ export declare const CompteRenduEnrichedSchema: z.ZodObject<{
185
185
  uid: z.ZodString;
186
186
  seanceRef: z.ZodString;
187
187
  sessionRef: z.ZodString;
188
+ etatPublication: z.ZodOptional<z.ZodEnum<{
189
+ finalise: "finalise";
190
+ en_cours_de_finalisation: "en_cours_de_finalisation";
191
+ sans_compte_rendu_ecrit: "sans_compte_rendu_ecrit";
192
+ }>>;
188
193
  videoUrl: z.ZodOptional<z.ZodString>;
189
194
  videoTimecode: z.ZodOptional<z.ZodNumber>;
190
195
  metadonnees: z.ZodObject<{
@@ -233,6 +238,11 @@ export declare const ComptesRendusEnrichedSchema: z.ZodObject<{
233
238
  uid: z.ZodString;
234
239
  seanceRef: z.ZodString;
235
240
  sessionRef: z.ZodString;
241
+ etatPublication: z.ZodOptional<z.ZodEnum<{
242
+ finalise: "finalise";
243
+ en_cours_de_finalisation: "en_cours_de_finalisation";
244
+ sans_compte_rendu_ecrit: "sans_compte_rendu_ecrit";
245
+ }>>;
236
246
  videoUrl: z.ZodOptional<z.ZodString>;
237
247
  videoTimecode: z.ZodOptional<z.ZodNumber>;
238
248
  metadonnees: z.ZodObject<{
@@ -122,9 +122,6 @@ export declare function downloadAndParse(document: Document, _datasetDir: string
122
122
  forceParseDocuments?: boolean;
123
123
  parseDocuments?: boolean;
124
124
  }): Promise<void>;
125
- export declare function downloadAndParseVideosAndComptesRendus(reunion: Reunion, datasetCleanDir: string, options: Options, { removeMissingSeanceCR, legislature, }?: {
126
- removeMissingSeanceCR?: boolean;
127
- legislature?: number;
128
- }): Promise<void>;
125
+ export declare function downloadAndParseVideosAndComptesRendus(reunion: Reunion, datasetCleanDir: string, options: Options): Promise<void>;
129
126
  export declare function parseDocumentOrDivisionHtml(documentOrDivision: Document | Division, documentsFilesDir: string): Promise<void>;
130
127
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Retry windows for the per-reunion harvests (videos and commission reports)
3
+ * run while cleaning agendas.
4
+ *
5
+ * Measured on the public repositories (reunions from April to November 2026):
6
+ * - videos are online within 2.4 days for 99% of reunions; 2 of 1030 appeared
7
+ * after 30 days;
8
+ * - commission reports have a 9-day median delay, but 9% appear after
9
+ * 30 days and the slowest one after 112 days.
10
+ */
11
+ /** Stop retrying a missing commission report after this many days. */
12
+ export declare const CR_COMMISSION_RETRY_DAYS = 120;
13
+ export declare function reunionStartMs(timestampDebut: string | Date): number;
14
+ /**
15
+ * - `search`: query the video site;
16
+ * - `use-cache`: reuse the already downloaded `.nvs` files;
17
+ * - `skip`: do nothing (reunion not held yet, or older than the window with
18
+ * no video found).
19
+ */
20
+ export type VideoHarvestDecision = "search" | "use-cache" | "skip";
21
+ export declare function videoHarvestDecision({ hasCachedVideo, nowMs, onlyRecentDays, startMs, }: {
22
+ hasCachedVideo: boolean;
23
+ nowMs: number;
24
+ onlyRecentDays: number | undefined;
25
+ startMs: number;
26
+ }): VideoHarvestDecision;
27
+ export declare function shouldFetchCrCommission({ hasContent, nowMs, onlyRecentDays, startMs, }: {
28
+ hasContent: boolean;
29
+ nowMs: number;
30
+ onlyRecentDays: number | undefined;
31
+ startMs: number;
32
+ }): boolean;
@@ -0,0 +1 @@
1
+ export {};