P1.3-données : schémas des tables isolants, techniques_isolation, aides, pret, tarifs_accompagnement
Cinq schémas dans src/commun/schemas.ts (source de vérité, schemas/*.json réécrits par npm run build) ; options reçoit entretien_h_mois, entretien_fondement, reparabilite et source_verifiee, facultatifs jusqu'à leur publication par NocoDB. Aucun moteur touché, aucune étiquette : v0.2.0 viendra avec P1.3-moteurs. 50/50 tests verts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VyW8ty2Ejp84FwCeN75oiT
This commit is contained in:
Vendored
+1
-1
@@ -9,6 +9,6 @@ export interface Schema {
|
|||||||
enum?: (string | number | boolean | null)[];
|
enum?: (string | number | boolean | null)[];
|
||||||
minItems?: number;
|
minItems?: number;
|
||||||
}
|
}
|
||||||
export type NomTable = 'postes' | 'options' | 'france_climat' | 'algo_config';
|
export type NomTable = 'postes' | 'options' | 'france_climat' | 'algo_config' | 'isolants' | 'techniques_isolation' | 'aides' | 'pret' | 'tarifs_accompagnement';
|
||||||
export declare const SCHEMAS: Record<NomTable, Schema>;
|
export declare const SCHEMAS: Record<NomTable, Schema>;
|
||||||
export declare const NOMS_TABLES: NomTable[];
|
export declare const NOMS_TABLES: NomTable[];
|
||||||
|
|||||||
Vendored
+143
@@ -9,6 +9,18 @@
|
|||||||
const nombreOuNull = { type: ['number', 'null'] };
|
const nombreOuNull = { type: ['number', 'null'] };
|
||||||
const chaineOuNull = { type: ['string', 'null'] };
|
const chaineOuNull = { type: ['string', 'null'] };
|
||||||
const booleenOuNull = { type: ['boolean', 'null'] };
|
const booleenOuNull = { type: ['boolean', 'null'] };
|
||||||
|
const fourchette = { type: 'object', required: ['min', 'max'], properties: { min: nombreOuNull, max: nombreOuNull } };
|
||||||
|
const listeDeChaines = { type: 'array', items: { type: 'string' } };
|
||||||
|
// Traçabilité commune aux tables de P1.3 : une valeur introuvable reste null et son champ
|
||||||
|
// est listé dans `a_completer` ; `source_verifiee` ne passe à true que si la source citée
|
||||||
|
// a été rouverte (SPEC phase 1 §4.3, LOT P1.3 encadré du 08/10).
|
||||||
|
const trace = {
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_date: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
a_completer: listeDeChaines,
|
||||||
|
};
|
||||||
|
const CATEGORIES_REVENUS = ['tres_modestes', 'modestes', 'intermediaires', 'superieurs', 'toutes'];
|
||||||
export const SCHEMAS = {
|
export const SCHEMAS = {
|
||||||
postes: {
|
postes: {
|
||||||
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/postes.schema.json',
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/postes.schema.json',
|
||||||
@@ -68,6 +80,137 @@ export const SCHEMAS = {
|
|||||||
description: chaineOuNull,
|
description: chaineOuNull,
|
||||||
description_pedago: chaineOuNull,
|
description_pedago: chaineOuNull,
|
||||||
notes_techniques: chaineOuNull,
|
notes_techniques: chaineOuNull,
|
||||||
|
// P1.3-données (08/10, A10) : colonnes NocoDB, facultatives jusqu'à leur publication
|
||||||
|
entretien_h_mois: nombreOuNull,
|
||||||
|
entretien_fondement: chaineOuNull,
|
||||||
|
reparabilite: { type: ['string', 'null'], enum: ['artisan_local', 'artisan_forme', 'technicien_specialise', null] },
|
||||||
|
source_verifiee: booleenOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isolants: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/isolants.schema.json',
|
||||||
|
description: 'Isolants comparés par isolation.comparatif (P1.3). λ en W/(m.K), ρ en kg/m³, c en J/(kg.K), μ sans unité ; énergie grise en kWh/m³ et carbone en kgCO₂e pour 1 m² de R = 1, depuis la FDES INIES citée ; prix de fourniture TTC ramené à 100 mm. Valeur introuvable = null, listée dans a_completer.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'libelle', 'famille', 'lambda_w_mk', 'source', 'source_date', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
libelle: { type: 'string' },
|
||||||
|
famille: { type: 'string', enum: ['biosource', 'mineral', 'synthetique'] },
|
||||||
|
lambda_w_mk: nombreOuNull,
|
||||||
|
rho_kg_m3: nombreOuNull,
|
||||||
|
c_j_kgk: nombreOuNull,
|
||||||
|
mu: nombreOuNull,
|
||||||
|
energie_grise_kwh_m3: nombreOuNull,
|
||||||
|
carbone_kgco2e_m2_r1: nombreOuNull,
|
||||||
|
fdes: { type: ['object', 'null'] },
|
||||||
|
duree_vie_ans: nombreOuNull,
|
||||||
|
prix_fourniture_100mm_eur_m2: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['min', 'max'],
|
||||||
|
properties: { min: nombreOuNull, max: nombreOuNull, releves: { type: 'array' } },
|
||||||
|
},
|
||||||
|
pose_autoconstruction: booleenOuNull,
|
||||||
|
vigilance: chaineOuNull,
|
||||||
|
...trace,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
techniques_isolation: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/techniques_isolation.schema.json',
|
||||||
|
description: 'Techniques de mise en œuvre par paroi (P1.3). Prix de pose entreprise en €/m² (ou €/unité pour la cheminée), R minimal réglementaire en zone H1 et R visé par les aides, isolants compatibles par code de la table isolants.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'paroi', 'technique', 'pose_entreprise_eur_m2', 'isolants_compatibles', 'part_pro_obligatoire', 'source', 'source_date', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
paroi: { type: 'string', enum: ['toit', 'murs', 'sol', 'cheminee'] },
|
||||||
|
technique: { type: 'string' },
|
||||||
|
r_min_reglementaire_h1: nombreOuNull,
|
||||||
|
r_vise_aides: nombreOuNull,
|
||||||
|
epaisseur_type_mm: nombreOuNull,
|
||||||
|
pose_entreprise_eur_m2: fourchette,
|
||||||
|
pose_entreprise_eur_unite: fourchette,
|
||||||
|
heures_autoconstruction_m2: nombreOuNull,
|
||||||
|
isolants_compatibles: listeDeChaines,
|
||||||
|
part_pro_obligatoire: { type: 'boolean' },
|
||||||
|
part_pro_detail: chaineOuNull,
|
||||||
|
vigilance: chaineOuNull,
|
||||||
|
...trace,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
aides: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/aides.schema.json',
|
||||||
|
description: "Aides et tarifs réglementés datés (P1.3, une seule source : aucune aide en dur dans les options ni dans le paquet). Une ligne = dispositif × geste × catégorie de revenus ; eligible: false dit qu'un geste n'est plus aidé depuis date_effet. Taux en part (0,8 = 80 %).",
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['id', 'dispositif', 'geste', 'categorie', 'eligible', 'unite', 'date_effet', 'source', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
id: { type: 'string' },
|
||||||
|
dispositif: { type: 'string' },
|
||||||
|
geste: { type: 'string' },
|
||||||
|
categorie: { type: 'string', enum: CATEGORIES_REVENUS },
|
||||||
|
eligible: { type: 'boolean' },
|
||||||
|
montant: nombreOuNull,
|
||||||
|
taux: nombreOuNull,
|
||||||
|
unite: { type: 'string' },
|
||||||
|
plafond_depense: nombreOuNull,
|
||||||
|
plafond_unite: chaineOuNull,
|
||||||
|
duree_max_ans: nombreOuNull,
|
||||||
|
date_effet: { type: 'string' },
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
notes: chaineOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pret: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/pret.schema.json',
|
||||||
|
description: 'Taux indicatifs de prêt (P1.3) : moyennes de marché de la Banque de France et éco-PTZ, datés. Jamais une offre de crédit.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'libelle', 'taux_indicatif', 'date_effet', 'source', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
libelle: { type: 'string' },
|
||||||
|
taux_indicatif: { type: 'number' },
|
||||||
|
duree_max_ans: nombreOuNull,
|
||||||
|
montant_max_eur: nombreOuNull,
|
||||||
|
categorie_bdf: chaineOuNull,
|
||||||
|
date_effet: { type: 'string' },
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
notes: chaineOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tarifs_accompagnement: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/tarifs_accompagnement.schema.json',
|
||||||
|
description: "Forfait d'accompagnement de l'autoconstruction par technique (P1.3), composé des séances de la grille publique ; null quand la technique relève d'un professionnel.",
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['technique', 'accompagnement_propose', 'seances', 'forfait_eur', 'source', 'source_date'],
|
||||||
|
properties: {
|
||||||
|
technique: { type: 'string' },
|
||||||
|
accompagnement_propose: { type: 'boolean' },
|
||||||
|
seances: { type: 'array', items: { type: 'string', enum: ['conception', 'chiffrage', 'confrontation'] } },
|
||||||
|
forfait_eur: nombreOuNull,
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_date: { type: 'string' },
|
||||||
|
statut: chaineOuNull,
|
||||||
|
notes: chaineOuNull,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.trans-former.fr/jules/moteurs/schemas/aides.schema.json",
|
||||||
|
"description": "Aides et tarifs réglementés datés (P1.3, une seule source : aucune aide en dur dans les options ni dans le paquet). Une ligne = dispositif × geste × catégorie de revenus ; eligible: false dit qu'un geste n'est plus aidé depuis date_effet. Taux en part (0,8 = 80 %).",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"dispositif",
|
||||||
|
"geste",
|
||||||
|
"categorie",
|
||||||
|
"eligible",
|
||||||
|
"unite",
|
||||||
|
"date_effet",
|
||||||
|
"source",
|
||||||
|
"source_verifiee"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dispositif": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"geste": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"categorie": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"tres_modestes",
|
||||||
|
"modestes",
|
||||||
|
"intermediaires",
|
||||||
|
"superieurs",
|
||||||
|
"toutes"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"eligible": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"montant": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"taux": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unite": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"plafond_depense": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"plafond_unite": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"duree_max_ans": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"date_effet": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_verifiee": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.trans-former.fr/jules/moteurs/schemas/isolants.schema.json",
|
||||||
|
"description": "Isolants comparés par isolation.comparatif (P1.3). λ en W/(m.K), ρ en kg/m³, c en J/(kg.K), μ sans unité ; énergie grise en kWh/m³ et carbone en kgCO₂e pour 1 m² de R = 1, depuis la FDES INIES citée ; prix de fourniture TTC ramené à 100 mm. Valeur introuvable = null, listée dans a_completer.",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"libelle",
|
||||||
|
"famille",
|
||||||
|
"lambda_w_mk",
|
||||||
|
"source",
|
||||||
|
"source_date",
|
||||||
|
"source_verifiee"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"libelle": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"famille": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"biosource",
|
||||||
|
"mineral",
|
||||||
|
"synthetique"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lambda_w_mk": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rho_kg_m3": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"c_j_kgk": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mu": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"energie_grise_kwh_m3": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"carbone_kgco2e_m2_r1": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fdes": {
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"duree_vie_ans": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"prix_fourniture_100mm_eur_m2": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"min",
|
||||||
|
"max"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"min": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"releves": {
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pose_autoconstruction": {
|
||||||
|
"type": [
|
||||||
|
"boolean",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vigilance": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_date": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_verifiee": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"a_completer": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -177,6 +177,36 @@
|
|||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"entretien_h_mois": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"entretien_fondement": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"reparabilite": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"enum": [
|
||||||
|
"artisan_local",
|
||||||
|
"artisan_forme",
|
||||||
|
"technicien_specialise",
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source_verifiee": {
|
||||||
|
"type": [
|
||||||
|
"boolean",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.trans-former.fr/jules/moteurs/schemas/pret.schema.json",
|
||||||
|
"description": "Taux indicatifs de prêt (P1.3) : moyennes de marché de la Banque de France et éco-PTZ, datés. Jamais une offre de crédit.",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"libelle",
|
||||||
|
"taux_indicatif",
|
||||||
|
"date_effet",
|
||||||
|
"source",
|
||||||
|
"source_verifiee"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"libelle": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"taux_indicatif": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"duree_max_ans": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"montant_max_eur": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"categorie_bdf": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"date_effet": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_verifiee": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.trans-former.fr/jules/moteurs/schemas/tarifs_accompagnement.schema.json",
|
||||||
|
"description": "Forfait d'accompagnement de l'autoconstruction par technique (P1.3), composé des séances de la grille publique ; null quand la technique relève d'un professionnel.",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"technique",
|
||||||
|
"accompagnement_propose",
|
||||||
|
"seances",
|
||||||
|
"forfait_eur",
|
||||||
|
"source",
|
||||||
|
"source_date"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"technique": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"accompagnement_propose": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"seances": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"conception",
|
||||||
|
"chiffrage",
|
||||||
|
"confrontation"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"forfait_eur": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_date": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"statut": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.trans-former.fr/jules/moteurs/schemas/techniques_isolation.schema.json",
|
||||||
|
"description": "Techniques de mise en œuvre par paroi (P1.3). Prix de pose entreprise en €/m² (ou €/unité pour la cheminée), R minimal réglementaire en zone H1 et R visé par les aides, isolants compatibles par code de la table isolants.",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"paroi",
|
||||||
|
"technique",
|
||||||
|
"pose_entreprise_eur_m2",
|
||||||
|
"isolants_compatibles",
|
||||||
|
"part_pro_obligatoire",
|
||||||
|
"source",
|
||||||
|
"source_date",
|
||||||
|
"source_verifiee"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"paroi": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"toit",
|
||||||
|
"murs",
|
||||||
|
"sol",
|
||||||
|
"cheminee"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"technique": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"r_min_reglementaire_h1": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"r_vise_aides": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"epaisseur_type_mm": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pose_entreprise_eur_m2": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"min",
|
||||||
|
"max"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"min": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pose_entreprise_eur_unite": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"min",
|
||||||
|
"max"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"min": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"heures_autoconstruction_m2": {
|
||||||
|
"type": [
|
||||||
|
"number",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"isolants_compatibles": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"part_pro_obligatoire": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"part_pro_detail": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vigilance": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_date": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source_verifiee": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"a_completer": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+146
-1
@@ -20,11 +20,25 @@ export interface Schema {
|
|||||||
minItems?: number
|
minItems?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NomTable = 'postes' | 'options' | 'france_climat' | 'algo_config'
|
export type NomTable =
|
||||||
|
| 'postes' | 'options' | 'france_climat' | 'algo_config'
|
||||||
|
| 'isolants' | 'techniques_isolation' | 'aides' | 'pret' | 'tarifs_accompagnement'
|
||||||
|
|
||||||
const nombreOuNull: Schema = { type: ['number', 'null'] }
|
const nombreOuNull: Schema = { type: ['number', 'null'] }
|
||||||
const chaineOuNull: Schema = { type: ['string', 'null'] }
|
const chaineOuNull: Schema = { type: ['string', 'null'] }
|
||||||
const booleenOuNull: Schema = { type: ['boolean', 'null'] }
|
const booleenOuNull: Schema = { type: ['boolean', 'null'] }
|
||||||
|
const fourchette: Schema = { type: 'object', required: ['min', 'max'], properties: { min: nombreOuNull, max: nombreOuNull } }
|
||||||
|
const listeDeChaines: Schema = { type: 'array', items: { type: 'string' } }
|
||||||
|
// Traçabilité commune aux tables de P1.3 : une valeur introuvable reste null et son champ
|
||||||
|
// est listé dans `a_completer` ; `source_verifiee` ne passe à true que si la source citée
|
||||||
|
// a été rouverte (SPEC phase 1 §4.3, LOT P1.3 encadré du 08/10).
|
||||||
|
const trace: Record<string, Schema> = {
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_date: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
a_completer: listeDeChaines,
|
||||||
|
}
|
||||||
|
const CATEGORIES_REVENUS = ['tres_modestes', 'modestes', 'intermediaires', 'superieurs', 'toutes']
|
||||||
|
|
||||||
export const SCHEMAS: Record<NomTable, Schema> = {
|
export const SCHEMAS: Record<NomTable, Schema> = {
|
||||||
postes: {
|
postes: {
|
||||||
@@ -85,6 +99,137 @@ export const SCHEMAS: Record<NomTable, Schema> = {
|
|||||||
description: chaineOuNull,
|
description: chaineOuNull,
|
||||||
description_pedago: chaineOuNull,
|
description_pedago: chaineOuNull,
|
||||||
notes_techniques: chaineOuNull,
|
notes_techniques: chaineOuNull,
|
||||||
|
// P1.3-données (08/10, A10) : colonnes NocoDB, facultatives jusqu'à leur publication
|
||||||
|
entretien_h_mois: nombreOuNull,
|
||||||
|
entretien_fondement: chaineOuNull,
|
||||||
|
reparabilite: { type: ['string', 'null'], enum: ['artisan_local', 'artisan_forme', 'technicien_specialise', null] },
|
||||||
|
source_verifiee: booleenOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isolants: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/isolants.schema.json',
|
||||||
|
description: 'Isolants comparés par isolation.comparatif (P1.3). λ en W/(m.K), ρ en kg/m³, c en J/(kg.K), μ sans unité ; énergie grise en kWh/m³ et carbone en kgCO₂e pour 1 m² de R = 1, depuis la FDES INIES citée ; prix de fourniture TTC ramené à 100 mm. Valeur introuvable = null, listée dans a_completer.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'libelle', 'famille', 'lambda_w_mk', 'source', 'source_date', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
libelle: { type: 'string' },
|
||||||
|
famille: { type: 'string', enum: ['biosource', 'mineral', 'synthetique'] },
|
||||||
|
lambda_w_mk: nombreOuNull,
|
||||||
|
rho_kg_m3: nombreOuNull,
|
||||||
|
c_j_kgk: nombreOuNull,
|
||||||
|
mu: nombreOuNull,
|
||||||
|
energie_grise_kwh_m3: nombreOuNull,
|
||||||
|
carbone_kgco2e_m2_r1: nombreOuNull,
|
||||||
|
fdes: { type: ['object', 'null'] },
|
||||||
|
duree_vie_ans: nombreOuNull,
|
||||||
|
prix_fourniture_100mm_eur_m2: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['min', 'max'],
|
||||||
|
properties: { min: nombreOuNull, max: nombreOuNull, releves: { type: 'array' } },
|
||||||
|
},
|
||||||
|
pose_autoconstruction: booleenOuNull,
|
||||||
|
vigilance: chaineOuNull,
|
||||||
|
...trace,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
techniques_isolation: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/techniques_isolation.schema.json',
|
||||||
|
description: 'Techniques de mise en œuvre par paroi (P1.3). Prix de pose entreprise en €/m² (ou €/unité pour la cheminée), R minimal réglementaire en zone H1 et R visé par les aides, isolants compatibles par code de la table isolants.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'paroi', 'technique', 'pose_entreprise_eur_m2', 'isolants_compatibles', 'part_pro_obligatoire', 'source', 'source_date', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
paroi: { type: 'string', enum: ['toit', 'murs', 'sol', 'cheminee'] },
|
||||||
|
technique: { type: 'string' },
|
||||||
|
r_min_reglementaire_h1: nombreOuNull,
|
||||||
|
r_vise_aides: nombreOuNull,
|
||||||
|
epaisseur_type_mm: nombreOuNull,
|
||||||
|
pose_entreprise_eur_m2: fourchette,
|
||||||
|
pose_entreprise_eur_unite: fourchette,
|
||||||
|
heures_autoconstruction_m2: nombreOuNull,
|
||||||
|
isolants_compatibles: listeDeChaines,
|
||||||
|
part_pro_obligatoire: { type: 'boolean' },
|
||||||
|
part_pro_detail: chaineOuNull,
|
||||||
|
vigilance: chaineOuNull,
|
||||||
|
...trace,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
aides: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/aides.schema.json',
|
||||||
|
description: "Aides et tarifs réglementés datés (P1.3, une seule source : aucune aide en dur dans les options ni dans le paquet). Une ligne = dispositif × geste × catégorie de revenus ; eligible: false dit qu'un geste n'est plus aidé depuis date_effet. Taux en part (0,8 = 80 %).",
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['id', 'dispositif', 'geste', 'categorie', 'eligible', 'unite', 'date_effet', 'source', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
id: { type: 'string' },
|
||||||
|
dispositif: { type: 'string' },
|
||||||
|
geste: { type: 'string' },
|
||||||
|
categorie: { type: 'string', enum: CATEGORIES_REVENUS },
|
||||||
|
eligible: { type: 'boolean' },
|
||||||
|
montant: nombreOuNull,
|
||||||
|
taux: nombreOuNull,
|
||||||
|
unite: { type: 'string' },
|
||||||
|
plafond_depense: nombreOuNull,
|
||||||
|
plafond_unite: chaineOuNull,
|
||||||
|
duree_max_ans: nombreOuNull,
|
||||||
|
date_effet: { type: 'string' },
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
notes: chaineOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pret: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/pret.schema.json',
|
||||||
|
description: 'Taux indicatifs de prêt (P1.3) : moyennes de marché de la Banque de France et éco-PTZ, datés. Jamais une offre de crédit.',
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['code', 'libelle', 'taux_indicatif', 'date_effet', 'source', 'source_verifiee'],
|
||||||
|
properties: {
|
||||||
|
code: { type: 'string' },
|
||||||
|
libelle: { type: 'string' },
|
||||||
|
taux_indicatif: { type: 'number' },
|
||||||
|
duree_max_ans: nombreOuNull,
|
||||||
|
montant_max_eur: nombreOuNull,
|
||||||
|
categorie_bdf: chaineOuNull,
|
||||||
|
date_effet: { type: 'string' },
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_verifiee: { type: 'boolean' },
|
||||||
|
notes: chaineOuNull,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tarifs_accompagnement: {
|
||||||
|
$id: 'https://git.trans-former.fr/jules/moteurs/schemas/tarifs_accompagnement.schema.json',
|
||||||
|
description: "Forfait d'accompagnement de l'autoconstruction par technique (P1.3), composé des séances de la grille publique ; null quand la technique relève d'un professionnel.",
|
||||||
|
type: 'array',
|
||||||
|
minItems: 1,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['technique', 'accompagnement_propose', 'seances', 'forfait_eur', 'source', 'source_date'],
|
||||||
|
properties: {
|
||||||
|
technique: { type: 'string' },
|
||||||
|
accompagnement_propose: { type: 'boolean' },
|
||||||
|
seances: { type: 'array', items: { type: 'string', enum: ['conception', 'chiffrage', 'confrontation'] } },
|
||||||
|
forfait_eur: nombreOuNull,
|
||||||
|
source: { type: 'string' },
|
||||||
|
source_date: { type: 'string' },
|
||||||
|
statut: chaineOuNull,
|
||||||
|
notes: chaineOuNull,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user