Add allDossierLegislatifTypes & type DossierLegislatifType

This commit is contained in:
Emmanuel 2024-07-10 09:24:06 +02:00
parent 3d86bb2f3e
commit 8e202fd0a1
5 changed files with 287 additions and 270 deletions

522
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,8 @@ import {
type Audit,
} from "@auditors/core"
import { allDossierLegislatifTypes } from "$lib/legal/dole"
function auditArborescence(
audit: Audit,
dataUnknown: unknown,
@ -645,12 +647,7 @@ function auditMetaDossierLegislatif(
remainingKeys,
auditTrimString,
auditEmptyToNull,
auditOptions([
"LOI_PUBLIEE",
"PROJET_LOI",
"PROPOSITION_LOI",
"ORDONNANCE_PUBLIEE",
]),
auditOptions(allDossierLegislatifTypes),
)
return audit.reduceRemaining(data, errors, remainingKeys)

View file

@ -9,6 +9,7 @@ export {
} from "./aggregates"
export {
allDossierLegislatifTypes,
allJoNatures,
allJoOrigines,
allJorfArticleEtats,
@ -55,6 +56,7 @@ export {
allLegiTexteVersionOrigines,
allSens,
type DossierLegislatif,
type DossierLegislatifType,
type Echeancier,
type EcheancierLigne,
type Jo,

View file

@ -55,15 +55,13 @@ export interface DossierLegislatif {
NUMERO: number
}
TITRE: string
TYPE?:
| "LOI_PUBLIEE"
| "PROJET_LOI"
| "PROPOSITION_LOI"
| "ORDONNANCE_PUBLIEE"
TYPE?: DossierLegislatifType
}
}
}
export type DossierLegislatifType = (typeof allDossierLegislatifTypes)[number]
export interface Echeancier {
"@derniere_maj"?: string
LIGNE: EcheancierLigne[]
@ -82,3 +80,10 @@ export interface EcheancierLigne {
NUMERO_ORDRE?: string
OBJET?: string
}
export const allDossierLegislatifTypes = [
"LOI_PUBLIEE",
"PROJET_LOI",
"PROPOSITION_LOI",
"ORDONNANCE_PUBLIEE",
] as const

View file

@ -1,10 +1,15 @@
import type { MenuItem } from "@tricoteuses/explorer-tools"
import type { DossierLegislatif } from "./dole"
import type { Jo } from "./jorf"
export type { DossierLegislatif, Echeancier, EcheancierLigne } from "./dole"
export {
allDossierLegislatifTypes,
type DossierLegislatif,
type DossierLegislatifType,
type Echeancier,
type EcheancierLigne,
} from "./dole"
export {
allJoNatures,
allJoOrigines,