From 13f924f2f2ad1e19d9363449e825f83f2709d304 Mon Sep 17 00:00:00 2001 From: Moroine Bentefrit Date: Wed, 2 Oct 2024 22:42:34 +0200 Subject: [PATCH] fix: correction de la fiabilisation via API alternance --- .yarn/patches/zod-npm-3.21.4-9f570b215c.patch | 39 --- package.json | 3 - server/package.json | 4 +- .../validationSchema.test.ts.snap | 329 ++++++++++++++++++ .../jobs/fiabilisation/uai-siret/update.ts | 43 ++- server/src/jobs/jobs.ts | 14 - shared/.eslintrc.cjs | 10 + shared/models/data/organismes.model.ts | 4 + shared/package.json | 3 +- shared/tsconfig.json | 2 +- ui/package.json | 2 +- ui/tsconfig.json | 2 +- yarn.lock | 31 +- 13 files changed, 384 insertions(+), 102 deletions(-) delete mode 100644 .yarn/patches/zod-npm-3.21.4-9f570b215c.patch diff --git a/.yarn/patches/zod-npm-3.21.4-9f570b215c.patch b/.yarn/patches/zod-npm-3.21.4-9f570b215c.patch deleted file mode 100644 index 018e04bf3..000000000 --- a/.yarn/patches/zod-npm-3.21.4-9f570b215c.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/lib/index.mjs b/lib/index.mjs -index 69078d509e93842067aa7de3c201c9f01c0e86b0..2ebb2228013de1c5a8c503b65deef73ae5dbead8 100644 ---- a/lib/index.mjs -+++ b/lib/index.mjs -@@ -819,7 +819,7 @@ const uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0- - //old email regex - // const emailRegex = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@((?!-)([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{1,})[^-<>()[\].,;:\s@"]$/i; - // eslint-disable-next-line --const emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/; -+const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - // from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression - const emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u; - const ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/; -diff --git a/lib/index.umd.js b/lib/index.umd.js -index 4a2f51787608267d58f25515fa654dce8606653f..749b0bd0bb37426d69c350f8b8547177357883f1 100644 ---- a/lib/index.umd.js -+++ b/lib/index.umd.js -@@ -825,7 +825,7 @@ - //old email regex - // const emailRegex = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@((?!-)([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{1,})[^-<>()[\].,;:\s@"]$/i; - // eslint-disable-next-line -- const emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/; -+ const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - // from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression - const emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u; - const ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/; -diff --git a/lib/types.js b/lib/types.js -index 5f89d3740b29e4419cccbb7b15e1d0ac0fea8936..eb6231ab7d0b148edaca29655ad5c52cd4c56774 100644 ---- a/lib/types.js -+++ b/lib/types.js -@@ -321,7 +321,7 @@ const cuidRegex = /^c[^\s-]{8,}$/i; - const cuid2Regex = /^[a-z][a-z0-9]*$/; - const ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/; - const uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i; --const emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/; -+const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - const emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u; - const ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/; - const ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/; diff --git a/package.json b/package.json index 2d2eb22aa..11c5c631f 100644 --- a/package.json +++ b/package.json @@ -102,8 +102,5 @@ "yarn.lock": [ "yarn dedupe" ] - }, - "resolutions": { - "zod@3.21.4": "patch:zod@npm%3A3.21.4#./.yarn/patches/zod-npm-3.21.4-9f570b215c.patch" } } diff --git a/server/package.json b/server/package.json index 2e5381bd9..026e68cb7 100644 --- a/server/package.json +++ b/server/package.json @@ -32,7 +32,7 @@ "@types/stream-json": "^1.7.7", "JSONStream": "^1.3.5", "adm-zip": "^0.5.10", - "api-alternance-sdk": "^0.0.1-rc.10", + "api-alternance-sdk": "^0.0.1", "axios": "0.27.2", "axios-cache-interceptor": "^0.10.7", "axios-retry": "3.3.1", @@ -98,7 +98,7 @@ "type-fest": "^4.10.2", "uuid": "8.3.2", "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz", - "zod": "3.21.4", + "zod": "^3.23.8", "zod-express-middleware": "1.4.0" }, "prettier": { diff --git a/server/src/common/mongodb/__snapshots__/validationSchema.test.ts.snap b/server/src/common/mongodb/__snapshots__/validationSchema.test.ts.snap index 9b94fc168..4ef138dca 100644 --- a/server/src/common/mongodb/__snapshots__/validationSchema.test.ts.snap +++ b/server/src/common/mongodb/__snapshots__/validationSchema.test.ts.snap @@ -11497,6 +11497,335 @@ exports[`validation-schema should create validation schema for organismes: organ "bsonType": "bool", "description": "Le siret est fermé", }, + "fiabilisation_api_response": { + "additionalProperties": false, + "bsonType": "object", + "description": "Statut du siret et uai venant de l'API de l'organisme", + "properties": { + "candidats": { + "bsonType": "array", + "items": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "correspondances": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "siret": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "lui_meme": { + "bsonType": "bool", + }, + "son_formateur": { + "bsonType": "bool", + }, + "son_responsable": { + "bsonType": "bool", + }, + }, + "required": [ + "son_formateur", + "son_responsable", + "lui_meme", + ], + }, + { + "bsonType": "null", + }, + ], + }, + "uai": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "lui_meme": { + "bsonType": "bool", + }, + "son_lieu": { + "bsonType": "bool", + }, + }, + "required": [ + "lui_meme", + "son_lieu", + ], + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "uai", + "siret", + ], + }, + "organisme": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "identifiant": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "siret": { + "bsonType": "string", + "pattern": "^\\d{9,14}$", + }, + "uai": { + "anyOf": [ + { + "bsonType": "string", + "pattern": "^\\d{1,7}[A-Z]$", + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "uai", + "siret", + ], + }, + }, + "required": [ + "identifiant", + ], + }, + "status": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "declaration_catalogue": { + "bsonType": "bool", + }, + "ouvert": { + "bsonType": "bool", + }, + "validation_uai": { + "bsonType": "bool", + }, + }, + "required": [ + "ouvert", + "declaration_catalogue", + "validation_uai", + ], + }, + }, + "required": [ + "status", + "correspondances", + "organisme", + ], + }, + }, + "metadata": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "siret": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "status": { + "bsonType": "string", + "enum": [ + "inconnu", + "fermé", + "ok", + ], + }, + }, + "required": [ + "status", + ], + }, + { + "bsonType": "null", + }, + ], + }, + "uai": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "status": { + "bsonType": "string", + "enum": [ + "inconnu", + "ok", + ], + }, + }, + "required": [ + "status", + ], + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "uai", + "siret", + ], + }, + "resultat": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "correspondances": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "siret": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "lui_meme": { + "bsonType": "bool", + }, + "son_formateur": { + "bsonType": "bool", + }, + "son_responsable": { + "bsonType": "bool", + }, + }, + "required": [ + "son_formateur", + "son_responsable", + "lui_meme", + ], + }, + { + "bsonType": "null", + }, + ], + }, + "uai": { + "anyOf": [ + { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "lui_meme": { + "bsonType": "bool", + }, + "son_lieu": { + "bsonType": "bool", + }, + }, + "required": [ + "lui_meme", + "son_lieu", + ], + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "uai", + "siret", + ], + }, + "organisme": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "identifiant": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "siret": { + "bsonType": "string", + "pattern": "^\\d{9,14}$", + }, + "uai": { + "anyOf": [ + { + "bsonType": "string", + "pattern": "^\\d{1,7}[A-Z]$", + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "uai", + "siret", + ], + }, + }, + "required": [ + "identifiant", + ], + }, + "status": { + "additionalProperties": false, + "bsonType": "object", + "properties": { + "declaration_catalogue": { + "bsonType": "bool", + }, + "ouvert": { + "bsonType": "bool", + }, + "validation_uai": { + "bsonType": "bool", + }, + }, + "required": [ + "ouvert", + "declaration_catalogue", + "validation_uai", + ], + }, + }, + "required": [ + "status", + "correspondances", + "organisme", + ], + }, + { + "bsonType": "null", + }, + ], + }, + }, + "required": [ + "metadata", + "resultat", + "candidats", + ], + }, "fiabilisation_api_statut": { "bsonType": "string", "description": "Statut de fiabilisation venant de l'API de l'organisme", diff --git a/server/src/jobs/fiabilisation/uai-siret/update.ts b/server/src/jobs/fiabilisation/uai-siret/update.ts index 72487b0c4..52869431c 100644 --- a/server/src/jobs/fiabilisation/uai-siret/update.ts +++ b/server/src/jobs/fiabilisation/uai-siret/update.ts @@ -1,4 +1,6 @@ +import { captureException } from "@sentry/node"; import { PromisePool } from "@supercharge/promise-pool"; +import Boom from "boom"; import { AnyBulkWriteOperation } from "mongodb"; import { IOrganisme, @@ -145,35 +147,40 @@ export const updateOrganismesFiablesFermes = async () => { }; export const updateOrganismesFiabilisationApiUaiSiret = async () => { - const organismsToUpdate = await organismesDb().find({}).toArray(); + const cursor = organismesDb().find({}); const bulkOperations: AnyBulkWriteOperation[] = []; - for (const organism of organismsToUpdate) { + let count = 0; + for await (const organism of cursor) { + count++; const { _id, siret, uai } = organism; if (siret && uai) { try { const apiData = await apiAlternanceClient.organisme.recherche({ siret, uai }); - if (apiData?.resultat?.status) { - const { ouvert, declaration_catalogue, validation_uai } = apiData.resultat.status; - const fiabilisationStatus = - ouvert && declaration_catalogue && validation_uai - ? STATUT_FIABILISATION_API_ORGANISME.FIABLE - : STATUT_FIABILISATION_API_ORGANISME.NON_FIABLE; - - bulkOperations.push({ - updateOne: { - filter: { _id }, - update: { $set: { fiabilisation_api_statut: fiabilisationStatus } }, + const fiabilisation_api_response: IOrganisme["fiabilisation_api_response"] = apiData; + + bulkOperations.push({ + updateOne: { + filter: { _id }, + update: { + $set: { + fiabilisation_api_statut: + apiData.resultat == null + ? STATUT_FIABILISATION_API_ORGANISME.NON_FIABLE + : STATUT_FIABILISATION_API_ORGANISME.FIABLE, + fiabilisation_api_response, + }, }, - }); - } else { - logger.warn(`Données API non valides pour le SIRET : ${siret}, UAI : ${uai}`); - } + }, + }); } catch (error) { console.error(`Échec de l'appel API pour le SIRET : ${siret}, UAI : ${uai}`, error); + const err = Boom.internal("Échec de l'appel API pour la fiabilisation des organismes", { uai, siret }); + err.cause = error; + captureException(err); } } else { bulkOperations.push({ @@ -194,5 +201,5 @@ export const updateOrganismesFiabilisationApiUaiSiret = async () => { logger.info("Aucun organisme à mettre à jour."); } - return { status: "Mise à jour terminée", total: organismsToUpdate.length, updated: bulkOperations.length }; + return { status: "Mise à jour terminée", total: count, updated: bulkOperations.length }; }; diff --git a/server/src/jobs/jobs.ts b/server/src/jobs/jobs.ts index 5af1639f9..82ba02a69 100644 --- a/server/src/jobs/jobs.ts +++ b/server/src/jobs/jobs.ts @@ -1,7 +1,6 @@ import { addJob, initJobProcessor } from "job-processor"; import { getAnneesScolaireListFromDate } from "shared/utils"; -import { apiAlternanceClient } from "@/common/apis/apiAlternance"; import logger from "@/common/logger"; import { createCollectionIndexes } from "@/common/model/indexes/createCollectionIndexes"; import { getDatabase } from "@/common/mongodb"; @@ -547,19 +546,6 @@ export async function setupJobProcessor() { return createMigration(job.payload as any); }, }, - "test:organisme:validate": { - handler: async () => { - const r = await apiAlternanceClient.organisme - .recherche({ - siret: "51400512300062", - uai: "0333326L", - }) - .catch((e) => { - console.error(e); - }); - console.log(r); - }, - }, }, }); } diff --git a/shared/.eslintrc.cjs b/shared/.eslintrc.cjs index 3c263e322..0b8648553 100644 --- a/shared/.eslintrc.cjs +++ b/shared/.eslintrc.cjs @@ -6,4 +6,14 @@ module.exports = { }, "import/internal-regex": "^shared", }, + parserOptions: { + project: "shared/tsconfig.json", + }, + settings: { + "import/resolver": { + typescript: { + project: "shared/tsconfig.json", + }, + }, + }, }; diff --git a/shared/models/data/organismes.model.ts b/shared/models/data/organismes.model.ts index 4121b1b84..6cb8931ea 100644 --- a/shared/models/data/organismes.model.ts +++ b/shared/models/data/organismes.model.ts @@ -1,3 +1,4 @@ +import { zApiOrganismesRoutes } from "api-alternance-sdk"; import { isBefore, subMonths } from "date-fns"; import type { CreateIndexesOptions, IndexSpecification } from "mongodb"; import type { Jsonify } from "type-fest"; @@ -215,6 +216,9 @@ const zOrganisme = z fiabilisation_api_statut: zodEnumFromObjValues(STATUT_FIABILISATION_API_ORGANISME) .describe("Statut de fiabilisation venant de l'API de l'organisme") .optional(), + fiabilisation_api_response: zApiOrganismesRoutes.get["/organisme/v1/recherche"].response["200"] + .describe("Statut du siret et uai venant de l'API de l'organisme") + .optional(), mode_de_transmission: z.enum(["API", "MANUEL"]).describe("Mode de transmission des effectifs").optional(), mode_de_transmission_configuration_date: z .date({ diff --git a/shared/package.json b/shared/package.json index 854987209..4699a3a67 100644 --- a/shared/package.json +++ b/shared/package.json @@ -19,13 +19,14 @@ }, "dependencies": { "@asteasolutions/zod-to-openapi": "^6.4.0", + "api-alternance-sdk": "^0.0.1", "date-fns": "^2.30.0", "date-fns-tz": "^2.0.1", "lodash-es": "^4.17.21", "luhn": "^2.4.1", "react": "18.2.0", "type-fest": "^4.11.1", - "zod": "3.21.4", + "zod": "^3.23.8", "zod-mongodb-schema": "^1.0.2" }, "devDependencies": { diff --git a/shared/tsconfig.json b/shared/tsconfig.json index 5c0fdbc2a..5c7108e55 100644 --- a/shared/tsconfig.json +++ b/shared/tsconfig.json @@ -14,7 +14,7 @@ "pretty": true, "isolatedModules": true, "module": "ESNext" /* Specify what module code is generated. */, - "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, + "moduleResolution": "bundler" /* Specify how TypeScript looks up a file from a given module specifier. */, "resolveJsonModule": true, "target": "ES2022", "outDir": "./dist" /* Specify an output folder for all emitted files. */, diff --git a/ui/package.json b/ui/package.json index 5de278022..e324b0bc0 100644 --- a/ui/package.json +++ b/ui/package.json @@ -66,7 +66,7 @@ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz", "yup": "0.32.11", "yup-password": "0.2.2", - "zod": "3.21.4", + "zod": "^3.23.8", "zod-formik-adapter": "1.2.0" }, "devDependencies": { diff --git a/ui/tsconfig.json b/ui/tsconfig.json index be0cc0f84..946460873 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -12,7 +12,7 @@ "incremental": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/yarn.lock b/yarn.lock index fb35c6f15..bd3f24cda 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5572,15 +5572,15 @@ __metadata: languageName: node linkType: hard -"api-alternance-sdk@npm:^0.0.1-rc.10": - version: 0.0.1-rc.10 - resolution: "api-alternance-sdk@npm:0.0.1-rc.10" +"api-alternance-sdk@npm:^0.0.1": + version: 0.0.1 + resolution: "api-alternance-sdk@npm:0.0.1" dependencies: "@asteasolutions/zod-to-openapi": ^7.1.1 luxon: ^3.5.0 openapi3-ts: ^4.3.3 zod: ^3.23.8 - checksum: 80c2383bbfc14a82bd1f1f4b27f174b73d831ddd35404a2704108ca89ed2a51e32cbf5216044b49213c15981c4c62fb26f9db35f80bf2e88ee87fb1d8541db75 + checksum: 7985fcb1cd6bbd0edfb25ec02199321c8b62ecbc0eba2a5f87ec6115c32358311adc952386c236e720d5e5f3f186315c1f0b72d05a5c89fe7379b3fb5ef0b10c languageName: node linkType: hard @@ -17871,7 +17871,7 @@ __metadata: "@types/stream-json": ^1.7.7 JSONStream: ^1.3.5 adm-zip: ^0.5.10 - api-alternance-sdk: ^0.0.1-rc.10 + api-alternance-sdk: ^0.0.1 axios: 0.27.2 axios-cache-interceptor: ^0.10.7 axios-retry: 3.3.1 @@ -17948,7 +17948,7 @@ __metadata: typescript: ^5.3.3 uuid: 8.3.2 xlsx: "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz" - zod: 3.21.4 + zod: ^3.23.8 zod-express-middleware: 1.4.0 languageName: unknown linkType: soft @@ -18017,6 +18017,7 @@ __metadata: "@asteasolutions/zod-to-openapi": ^6.4.0 "@tsconfig/node22": ^22.0.0 "@types/node": ^22.2.0 + api-alternance-sdk: ^0.0.1 bson: ^5.5.1 date-fns: ^2.30.0 date-fns-tz: ^2.0.1 @@ -18026,7 +18027,7 @@ __metadata: react: 18.2.0 type-fest: ^4.11.1 typescript: ^5.3.3 - zod: 3.21.4 + zod: ^3.23.8 zod-mongodb-schema: ^1.0.2 languageName: unknown linkType: soft @@ -19560,7 +19561,7 @@ __metadata: xlsx: "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz" yup: 0.32.11 yup-password: 0.2.2 - zod: 3.21.4 + zod: ^3.23.8 zod-formik-adapter: 1.2.0 languageName: unknown linkType: soft @@ -20586,13 +20587,6 @@ __metadata: languageName: node linkType: hard -"zod@npm:3.21.4": - version: 3.21.4 - resolution: "zod@npm:3.21.4" - checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f - languageName: node - linkType: hard - "zod@npm:^3.23.8": version: 3.23.8 resolution: "zod@npm:3.23.8" @@ -20600,13 +20594,6 @@ __metadata: languageName: node linkType: hard -"zod@patch:zod@npm%3A3.21.4#./.yarn/patches/zod-npm-3.21.4-9f570b215c.patch::locator=mna-tdb%40workspace%3A.": - version: 3.21.4 - resolution: "zod@patch:zod@npm%3A3.21.4#./.yarn/patches/zod-npm-3.21.4-9f570b215c.patch::version=3.21.4&hash=45704f&locator=mna-tdb%40workspace%3A." - checksum: 8ac3afb02adff75a1d562c3479f39331548f94cd1d7f5d52623834ec75007db83c35edd8789d47d96ccb4994eec0c0a8e0bfd17130cd1db5013fd4900e0181f5 - languageName: node - linkType: hard - "zwitch@npm:^1.0.0": version: 1.0.5 resolution: "zwitch@npm:1.0.5"