@gouvfr-anct/lieux-de-mediation-numerique
Version:
📚 Bibliothèque pour la modélisation des lieux de médiation numérique respectant le standard du schéma de données des lieux de médiation numériques
25 lines (24 loc) • 1.72 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormationsLabels = exports.FormationLabel = void 0;
const errors_1 = require("./errors");
var FormationLabel;
(function (FormationLabel) {
FormationLabel["FormeAMonEspaceSante"] = "Form\u00E9 \u00E0 \u00AB Mon Espace Sant\u00E9 \u00BB";
FormationLabel["FormeADuplex"] = "Form\u00E9 \u00E0 \u00AB DUPLEX \u00BB (illettrisme)";
FormationLabel["ArniaMednum"] = "Arnia/MedNum BFC (Bourgogne-Franche-Comt\u00E9)";
FormationLabel["CollectifRessourcesEtActeursReemploi"] = "Collectif ressources et acteurs r\u00E9emploi (Normandie)";
FormationLabel["EtapesNumeriques"] = "\u00C9tapes num\u00E9riques (La Poste)";
FormationLabel["FabriquesDeTerritoire"] = "Fabriques de Territoire";
FormationLabel["LesEclaireurs"] = "Les \u00C9claireurs du num\u00E9rique (Dr\u00F4me)";
FormationLabel["MesPapiers"] = "Mes Papiers (M\u00E9tropole de Lyon)";
FormationLabel["Ordi3"] = "ORDI 3.0";
FormationLabel["SudLabs"] = "SUD LABS (PACA)";
})(FormationLabel || (exports.FormationLabel = FormationLabel = {}));
const firstInvalidFormationLabel = (formationLabel) => !Object.values(FormationLabel).includes(formationLabel);
const throwFormationsLabelsError = (formationsLabels) => {
throw new errors_1.FormationLabelError(formationsLabels.find(firstInvalidFormationLabel) ?? 'Label de formation indéfini');
};
const isFormationsLabels = (formationsLabels) => formationsLabels.find(firstInvalidFormationLabel) == null;
const FormationsLabels = (formationsLabels) => isFormationsLabels(formationsLabels) ? formationsLabels : throwFormationsLabelsError(formationsLabels);
exports.FormationsLabels = FormationsLabels;