diff --git a/clients/_test/clientBodacc/index.test.ts b/clients/_test/clientBodacc/index.test.ts index 20e3fcfbe..02f4a1d5e 100644 --- a/clients/_test/clientBodacc/index.test.ts +++ b/clients/_test/clientBodacc/index.test.ts @@ -1,4 +1,4 @@ -import clientBodacc from '#clients/open-data-soft/clients/bodacc'; +import { clientBodacc } from '#clients/open-data-soft/clients/bodacc'; import { IAnnoncesBodacc } from '#models/annonces'; import { Siren } from '#utils/helpers'; import { expectClientToMatchSnapshot } from '../expect-client-to-match-snapshot'; diff --git a/clients/open-data-soft/clients/annuaire-service-public/index.ts b/clients/open-data-soft/clients/annuaire-service-public/index.ts index 6c5243637..9e5180c4a 100644 --- a/clients/open-data-soft/clients/annuaire-service-public/index.ts +++ b/clients/open-data-soft/clients/annuaire-service-public/index.ts @@ -1,7 +1,6 @@ import { HttpNotFound } from '#clients/exceptions'; import odsClient from '#clients/open-data-soft'; import routes from '#clients/routes'; -import { stubClient } from '#clients/stub-client-with-snaphots'; import constants from '#models/constants'; import { IServicePublic } from '#models/service-public'; import { removeSpecialChars, Siret } from '#utils/helpers'; @@ -57,7 +56,7 @@ function queryAnnuaireServicePublic(whereQuery: string) { ); } -const clientAnnuaireServicePublicByName = async ( +export const clientAnnuaireServicePublicByName = async ( name: string ): Promise => { // Query by name, it allows to find DINUM or ONF for instance. @@ -78,7 +77,7 @@ const clientAnnuaireServicePublicByName = async ( }; }; -const clientAnnuaireServicePublicByIds = async ( +export const clientAnnuaireServicePublicByIds = async ( ids: string[] ): Promise => { const query = `id="${ids.join('" OR id="')}"`; @@ -91,7 +90,7 @@ const clientAnnuaireServicePublicByIds = async ( return response.records.map(mapToDomainObject); }; -const clientAnnuaireServicePublicBySiret = async ( +export const clientAnnuaireServicePublicBySiret = async ( siret: Siret ): Promise => { let response = await queryAnnuaireServicePublic(`siret="${siret}"`); @@ -264,20 +263,3 @@ function mapToLiens(record: IServicePublicRecord) { return liens; } - -const stubbedClientAnnuaireServicePublicByIds = stubClient({ - clientAnnuaireServicePublicByIds, -}); - -const stubbedClientAnnuaireServicePublicBySiret = stubClient({ - clientAnnuaireServicePublicBySiret, -}); - -const stubbedClientAnnuaireServicePublicByName = stubClient({ - clientAnnuaireServicePublicByName, -}); -export { - stubbedClientAnnuaireServicePublicByIds as clientAnnuaireServicePublicByIds, - stubbedClientAnnuaireServicePublicByName as clientAnnuaireServicePublicByName, - stubbedClientAnnuaireServicePublicBySiret as clientAnnuaireServicePublicBySiret, -}; diff --git a/clients/open-data-soft/clients/bilans-financiers/index.ts b/clients/open-data-soft/clients/bilans-financiers/index.ts index aab9d5f05..2aa64535d 100644 --- a/clients/open-data-soft/clients/bilans-financiers/index.ts +++ b/clients/open-data-soft/clients/bilans-financiers/index.ts @@ -1,7 +1,6 @@ import { HttpNotFound } from '#clients/exceptions'; import odsClient from '#clients/open-data-soft'; import routes from '#clients/routes'; -import { stubClient } from '#clients/stub-client-with-snaphots'; import { IBilanFinancier } from '#models/finances-societe/types'; import { Siren } from '#utils/helpers'; import { getFiscalYear } from '#utils/helpers/formatting/format-fiscal-year'; @@ -11,7 +10,7 @@ import { IAPIBilanResponse } from './interface'; * Données financière (Ratios Financiers (BCE / INPI)) * https://data.economie.gouv.fr/explore/dataset/ratios_inpi_bce/api */ -const clientBilansFinanciers = async (siren: Siren) => { +export const clientBilansFinanciers = async (siren: Siren) => { const url = routes.donneesFinancieres.ods.search; const metaDataUrl = routes.donneesFinancieres.ods.metadata; @@ -129,9 +128,3 @@ const mapToBilan = (financialData: IAPIBilanResponse): IBilanFinancier => { year: getFiscalYear(date_cloture_exercice), }; }; - -const stubbedClientBilansFinanciers = stubClient({ - clientBilansFinanciers, -}); - -export { stubbedClientBilansFinanciers as clientBilansFinanciers }; diff --git a/clients/open-data-soft/clients/bodacc/index.ts b/clients/open-data-soft/clients/bodacc/index.ts index abb390527..41b3a130e 100644 --- a/clients/open-data-soft/clients/bodacc/index.ts +++ b/clients/open-data-soft/clients/bodacc/index.ts @@ -1,6 +1,5 @@ import odsClient from '#clients/open-data-soft'; import routes from '#clients/routes'; -import { stubClient } from '#clients/stub-client-with-snaphots'; import { IAnnoncesBodacc } from '#models/annonces'; import { Exception } from '#models/exceptions'; import { Siren, formatDate } from '#utils/helpers'; @@ -47,7 +46,7 @@ interface IBodaccB extends IBodaccCoreRecord { radiationaurcs?: string; // "{\"radiationPM\": \"O\"}" } -const clientBodacc = async (siren: Siren): Promise => { +export const clientBodacc = async (siren: Siren): Promise => { const searchUrl = `${routes.bodacc.ods.search}&q=registre%3A${siren}&sort=dateparution&facet=publicationavis&facet=publicationavis_facette&facet=typeavis&facet=typeavis_lib&facet=familleavis&facet=familleavis_lib&facet=numerodepartement&facet=departement_nom_officiel`; const metaDataUrl = routes.bodacc.ods.metadata; const response = await odsClient({ url: searchUrl }, metaDataUrl); @@ -179,9 +178,3 @@ class BodaccParsingException extends Exception { super({ name: 'BodaccParsingException', ...args }); } } - -const stubbedClientBodacc = stubClient({ - clientBodacc, -}); - -export default stubbedClientBodacc; diff --git a/clients/open-data-soft/clients/journal-officiel-associations/index.ts b/clients/open-data-soft/clients/journal-officiel-associations/index.ts index 88d3eca98..79590b8f3 100644 --- a/clients/open-data-soft/clients/journal-officiel-associations/index.ts +++ b/clients/open-data-soft/clients/journal-officiel-associations/index.ts @@ -1,5 +1,4 @@ import routes from '#clients/routes'; -import { stubClient } from '#clients/stub-client-with-snaphots'; import { IAnnoncesAssociation } from '#models/annonces'; import constants from '#models/constants'; import { IdRna, Siren, formatDateLong } from '#utils/helpers'; @@ -63,7 +62,9 @@ type IDCAField = { dca_datevalidation: string; }; -const clientJOAFE = async (idRna: string): Promise => { +export const clientJOAFE = async ( + idRna: string +): Promise => { const searchUrl = `${routes.journalOfficielAssociations.ods.search}&q=numero_rna=${idRna}&refine.source=joafe&sort=dateparution`; const metaDataUrl = routes.journalOfficielAssociations.ods.metadata; const response = await odsClient( @@ -88,7 +89,7 @@ const clientJOAFE = async (idRna: string): Promise => { /** * DCA Dépôt des Compotes des Associations **/ -const clientDCA = async ( +export const clientDCA = async ( siren: Siren, idRna: IdRna | string ): Promise => { @@ -114,12 +115,3 @@ const clientDCA = async ( lastModified: response.lastModified, }; }; - -const stubbedClientDCA = stubClient({ - clientDCA, -}); -const stubbedClientJOAFE = stubClient({ - clientJOAFE, -}); - -export { stubbedClientDCA as clientDCA, stubbedClientJOAFE as clientJOAFE }; diff --git a/clients/open-data-soft/clients/qualiopi/index.ts b/clients/open-data-soft/clients/qualiopi/index.ts index b335ead4c..8e7d78f90 100644 --- a/clients/open-data-soft/clients/qualiopi/index.ts +++ b/clients/open-data-soft/clients/qualiopi/index.ts @@ -1,6 +1,5 @@ import odsClient from '#clients/open-data-soft'; import routes from '#clients/routes'; -import { stubClient } from '#clients/stub-client-with-snaphots'; import { IOrganismeFormation } from '#models/certifications/organismes-de-formation'; import { Siren } from '#utils/helpers'; import { IOrganismesFormationRecord } from './type'; @@ -9,7 +8,7 @@ import { IOrganismesFormationRecord } from './type'; * MTPEI - DGEFP * https://dgefp.opendatasoft.com/explore/dataset/liste-publique-des-of-v2/information/ */ -const clientOrganismeFormation = async ( +export const clientOrganismeFormation = async ( siren: Siren ): Promise => { const response = await odsClient( @@ -45,9 +44,3 @@ const mapToDomainObject = (record: IOrganismesFormationRecord) => { : [], }; }; - -const stubbedClientOrganismeFormation = stubClient({ - clientOrganismeFormation, -}); - -export { stubbedClientOrganismeFormation as clientOrganismeFormation }; diff --git a/cypress/e2e/annonces.cy.js b/cypress/e2e/annonces.cy.js index 5818d2a57..270c4e792 100644 --- a/cypress/e2e/annonces.cy.js +++ b/cypress/e2e/annonces.cy.js @@ -1,4 +1,14 @@ +import routes from '#clients/routes'; + describe('Annonces BODACC', () => { + beforeEach(() => { + cy.intercept('GET', `${routes.bodacc.ods.search}*`, { + fixture: '../fixtures/bodacc.json', + }); + cy.intercept('GET', `${routes.bodacc.ods.metadata}*`, { + fixture: '../fixtures/ods-metadata.json', + }); + }); it('Should display Annonces BODACC section', () => { cy.visit('/annonces/880878145'); cy.contains('Annonces BODACC'); @@ -13,8 +23,13 @@ describe('Annonces BODACC', () => { cy.contains('Radiations'); cy.contains('Annonce n°446, BODACC B n°20220227'); }); - it('Should display JOAFE section for association', () => { + cy.intercept('GET', `${routes.journalOfficielAssociations.ods.search}*`, { + fixture: '../fixtures/journal-officiel-associations.json', + }); + cy.intercept('GET', `${routes.journalOfficielAssociations.ods.metadata}*`, { + fixture: '../fixtures/ods-metadata.json', + }); cy.visit('/annonces/338365059'); cy.contains( /Cette structure possède [\d] annonces publiées au Journal Officiel des Associations/ diff --git a/cypress/e2e/bilans-financiers.cy.js b/cypress/e2e/bilans-financiers.cy.js index 1d28ea3a5..edb650b4c 100644 --- a/cypress/e2e/bilans-financiers.cy.js +++ b/cypress/e2e/bilans-financiers.cy.js @@ -1,3 +1,5 @@ +import routes from '#clients/routes'; + describe('Bilans financiers', () => { it('Should display Données financières section', () => { cy.visit('/entreprise/487444697'); @@ -5,6 +7,12 @@ describe('Bilans financiers', () => { }); it('Should hide bilans when partially confidential', () => { + cy.intercept('GET', `${routes.donneesFinancieres.ods.search}*`, { + fixture: '../fixtures/donnees-financieres-confidential.json', + }); + cy.intercept('GET', `${routes.donneesFinancieres.ods.metadata}*`, { + fixture: '../fixtures/ods-metadata.json', + }); cy.visit('/donnees-financieres/487444697'); cy.contains( 'Les bilans de cette structure sont accompagnés d’une déclaration de confidentialité.' @@ -12,6 +20,12 @@ describe('Bilans financiers', () => { }); it('Should display indicateurs financiers', () => { + cy.intercept('GET', `${routes.donneesFinancieres.ods.search}*`, { + fixture: '../fixtures/donnees-financieres.json', + }); + cy.intercept('GET', `${routes.donneesFinancieres.ods.metadata}*`, { + fixture: '../fixtures/ods-metadata.json', + }); cy.visit('/donnees-financieres/552032534'); cy.contains('Date de clôture'); cy.contains('31/12/2019'); diff --git a/cypress/fixtures/bodacc.json b/cypress/fixtures/bodacc.json new file mode 100644 index 000000000..893e437ea --- /dev/null +++ b/cypress/fixtures/bodacc.json @@ -0,0 +1,230 @@ +{ + "nhits": 3, + "parameters": { + "dataset": ["annonces-commerciales"], + "q": "registre:880878145", + "rows": 10, + "start": 0, + "sort": ["dateparution"], + "facet": [ + "publicationavis", + "publicationavis_facette", + "typeavis", + "typeavis_lib", + "familleavis", + "familleavis_lib", + "numerodepartement", + "departement_nom_officiel" + ], + "format": "json", + "timezone": "UTC" + }, + "records": [ + { + "datasetid": "annonces-commerciales", + "recordid": "b3a1c40bf7cfca27d86c0251e45e1a36ef7e8fd7", + "fields": { + "publicationavis": "B", + "listepersonnes": "{\"personne\": {\"typePersonne\": \"pm\", \"numeroImmatriculation\": {\"numeroIdentification\": \"880 878 145\", \"codeRCS\": \"RCS\", \"nomGreffeImmat\": \"Paris\"}, \"denomination\": \"Ganymède\", \"formeJuridique\": \"Société par actions simplifiée (à associé unique)\", \"adresseSiegeSocial\": {\"numeroVoie\": \"128\", \"typeVoie\": \"rue\", \"nomVoie\": \"La Boétie\", \"codePostal\": \"75008\", \"ville\": \"Paris\"}}}", + "id": "B20220227446", + "registre": "880878145,880 878 145", + "ville": "Paris", + "ispdf_unitaire": "oui", + "cp": "75008", + "region_nom_officiel": "Île-de-France", + "commercant": "Ganymède", + "dateparution": "2022-11-23", + "tribunal": "GAAAreffe du Tribunal de Commerce de Paris", + "url_complete": "https://www.bodacc.fr/pages/annonces-commerciales-detail/?q.id=id:B20220227446", + "pdf_parution_subfolder": 0, + "region_code": 11, + "numeroannonce": 446, + "parution": "20220227", + "publicationavis_facette": "Bodacc B", + "typeavis_lib": "Avis initial", + "typeavis": "annonce", + "familleavis_lib": "Radiations", + "familleavis": "radiation", + "departement_nom_officiel": "Paris", + "numerodepartement": "75" + }, + "record_timestamp": "2022-11-23T05:05:00Z" + }, + { + "datasetid": "annonces-commerciales", + "recordid": "1ca65450ccdf24e07e5fb64e1da9f2bb48dd5e2e", + "fields": { + "publicationavis": "C", + "listepersonnes": "{\"personne\": {\"typePersonne\": \"pm\", \"numeroImmatriculation\": {\"numeroIdentification\": \"880 878 145\", \"codeRCS\": \"RCS\", \"nomGreffeImmat\": \"Paris\"}, \"denomination\": \"Ganymède\", \"formeJuridique\": \"Société par actions simplifiée (à associé unique)\", \"adresseSiegeSocial\": {\"numeroVoie\": \"128\", \"typeVoie\": \"rue\", \"nomVoie\": \"La Boétie\", \"codePostal\": \"75008\", \"ville\": \"Paris\"}}}", + "id": "C202200902528", + "registre": "880878145,880 878 145", + "depot": "{\"dateCloture\": \"2021-12-31\", \"typeDepot\": \"Comptes annuels et rapports\", \"descriptif\": \"Les comptes annuels sont accompagnés d'une déclaration de confidentialité en application du premier ou deuxième alinéa de l'article L. 232-25.\"}", + "ville": "Paris", + "ispdf_unitaire": "oui", + "cp": "75008", + "region_nom_officiel": "Île-de-France", + "commercant": "Ganymède", + "dateparution": "2022-05-08", + "tribunal": "Greffe du Tribunal de Commerce de paris", + "url_complete": "https://www.bodacc.fr/pages/annonces-commerciales-detail/?q.id=id:C202200902528", + "pdf_parution_subfolder": 1, + "region_code": 11, + "numeroannonce": 2528, + "parution": "20220090", + "publicationavis_facette": "Bodacc C", + "typeavis_lib": "Avis initial", + "typeavis": "annonce", + "familleavis_lib": "Dépôts des comptes", + "familleavis": "dpc", + "departement_nom_officiel": "Paris", + "numerodepartement": "75" + }, + "record_timestamp": "2022-05-09T04:04:00Z" + }, + { + "datasetid": "annonces-commerciales", + "recordid": "34b1dda2cf2b72641886c3468d075cecaf636fd0", + "fields": { + "publicationavis": "C", + "listepersonnes": "{\"personne\": {\"typePersonne\": \"pm\", \"numeroImmatriculation\": {\"numeroIdentification\": \"880 878 145\", \"codeRCS\": \"RCS\", \"nomGreffeImmat\": \"Paris\"}, \"denomination\": \"Ganymède\", \"formeJuridique\": \"Société par actions simplifiée (à associé unique)\", \"adresseSiegeSocial\": {\"numeroVoie\": \"128\", \"typeVoie\": \"rue\", \"nomVoie\": \"La Boétie\", \"codePostal\": \"75008\", \"ville\": \"Paris\", \"pays\": \"france\"}}}", + "id": "C202101554392", + "registre": "880 878 145,880878145", + "depot": "{\"dateCloture\": \"2020-12-31\", \"typeDepot\": \"Comptes annuels et rapports\", \"descriptif\": \"Les comptes annuels sont accompagnés d'une déclaration de confidentialité en application du premier ou deuxième alinéa de l'article L. 232-25.\"}", + "ville": "Paris", + "ispdf_unitaire": "oui", + "cp": "75008", + "region_nom_officiel": "Île-de-France", + "commercant": "Ganymède", + "dateparution": "2021-08-11", + "tribunal": "GREFFE DU TRIBUNAL DE COMMERCE DE PARIS", + "url_complete": "https://www.bodacc.fr/pages/annonces-commerciales-detail/?q.id=id:C202101554392", + "pdf_parution_subfolder": 2, + "region_code": 11, + "numeroannonce": 4392, + "parution": "20210155", + "publicationavis_facette": "Bodacc C", + "typeavis_lib": "Avis initial", + "typeavis": "annonce", + "familleavis_lib": "Dépôts des comptes", + "familleavis": "dpc", + "departement_nom_officiel": "Paris", + "numerodepartement": "75" + }, + "record_timestamp": "2021-09-09T09:37:00Z" + } + ], + "facet_groups": [ + { + "name": "publicationavis", + "facets": [ + { + "name": "C", + "count": 2, + "state": "displayed", + "path": "C" + }, + { + "name": "B", + "count": 1, + "state": "displayed", + "path": "B" + } + ] + }, + { + "name": "publicationavis_facette", + "facets": [ + { + "name": "Bodacc C", + "count": 2, + "state": "displayed", + "path": "Bodacc C" + }, + { + "name": "Bodacc B", + "count": 1, + "state": "displayed", + "path": "Bodacc B" + } + ] + }, + { + "name": "typeavis", + "facets": [ + { + "name": "annonce", + "count": 3, + "state": "displayed", + "path": "annonce" + } + ] + }, + { + "name": "typeavis_lib", + "facets": [ + { + "name": "Avis initial", + "count": 3, + "state": "displayed", + "path": "Avis initial" + } + ] + }, + { + "name": "familleavis", + "facets": [ + { + "name": "dpc", + "count": 2, + "state": "displayed", + "path": "dpc" + }, + { + "name": "radiation", + "count": 1, + "state": "displayed", + "path": "radiation" + } + ] + }, + { + "name": "familleavis_lib", + "facets": [ + { + "name": "Dépôts des comptes", + "count": 2, + "state": "displayed", + "path": "Dépôts des comptes" + }, + { + "name": "Radiations", + "count": 1, + "state": "displayed", + "path": "Radiations" + } + ] + }, + { + "name": "numerodepartement", + "facets": [ + { + "name": "75", + "count": 3, + "state": "displayed", + "path": "75" + } + ] + }, + { + "name": "departement_nom_officiel", + "facets": [ + { + "name": "Paris", + "count": 3, + "state": "displayed", + "path": "Paris" + } + ] + } + ] +} diff --git a/cypress/fixtures/dgefp.json b/cypress/fixtures/dgefp.json new file mode 100644 index 000000000..e397e647c --- /dev/null +++ b/cypress/fixtures/dgefp.json @@ -0,0 +1,79 @@ +{ + "nhits": 2, + "parameters": { + "dataset": "liste-publique-des-of-v2", + "q": "356000000", + "rows": 10, + "start": 0, + "format": "json", + "timezone": "UTC" + }, + "records": [ + { + "datasetid": "liste-publique-des-of-v2", + "recordid": "30142ebdc75a94feae005728f4592a759599d2ae", + "fields": { + "informationsdeclarees_debutexercice": "01/01/2023", + "informationsdeclarees_datedernieredeclaration": "23/05/2024", + "random_id": 68.95977386771229, + "informationsdeclarees_specialitesdeformation_codespecialite1": "413", + "certifications": "Actions de formations", + "certifications_vae": "false", + "reg_code": "11", + "reg_name": "Île-de-France", + "organisme_formation_geocode": "False", + "certifications_actionsdeformationparapprentissage": "false", + "toutes_specialites": "Développement des capacités comportementales et relationnelles", + "dep_name": "Pas de départment", + "siren": "356000000", + "denomination": "Institut Groupe La Poste", + "siretetablissementdeclarant": "35600000000048", + "adressephysiqueorganismeformation_coderegion": "11", + "certifications_bilansdecompetences": "false", + "certifications_actionsdeformation": "true", + "numerosdeclarationactiviteprecedent": "11755565775", + "numerodeclarationactivite": "11755565775", + "informationsdeclarees_effectifformateurs": 400, + "informationsdeclarees_specialitesdeformation_libellespecialite1": "Développement des capacités comportementales et relationnelles", + "informationsdeclarees_finexercice": "2023-12-31", + "informationsdeclarees_nbstagiairesconfiesparunautreof": 0, + "informationsdeclarees_nbstagiaires": 111172 + }, + "record_timestamp": "2024-12-16T00:01:26.975Z" + }, + { + "datasetid": "liste-publique-des-of-v2", + "recordid": "89001d6bbcae0463c57b9d9f68b0214e78660479", + "fields": { + "informationsdeclarees_debutexercice": "01/01/2023", + "informationsdeclarees_datedernieredeclaration": "31/05/2024", + "random_id": 27.220292044034622, + "informationsdeclarees_specialitesdeformation_codespecialite1": "311", + "certifications": "Actions de formations", + "certifications_vae": "false", + "reg_code": "11", + "reg_name": "Île-de-France", + "organisme_formation_geocode": "False", + "certifications_actionsdeformationparapprentissage": "false", + "toutes_specialites": "Transport, manutention, magasinage/Commerce, vente", + "dep_name": "Pas de départment", + "siren": "356000000", + "denomination": "LA POSTE", + "siretetablissementdeclarant": "35600000000048", + "adressephysiqueorganismeformation_coderegion": "11", + "certifications_bilansdecompetences": "false", + "certifications_actionsdeformation": "true", + "numerosdeclarationactiviteprecedent": "11755762075", + "numerodeclarationactivite": "11755762075", + "informationsdeclarees_effectifformateurs": 77, + "informationsdeclarees_specialitesdeformation_codespecialite2": "312", + "informationsdeclarees_specialitesdeformation_libellespecialite1": "Transport, manutention, magasinage", + "informationsdeclarees_finexercice": "2023-12-31", + "informationsdeclarees_specialitesdeformation_libellespecialite2": "Commerce, vente", + "informationsdeclarees_nbstagiairesconfiesparunautreof": 0, + "informationsdeclarees_nbstagiaires": 309 + }, + "record_timestamp": "2024-12-16T00:01:26.975Z" + } + ] +} diff --git a/cypress/fixtures/donnees-financieres-confidential.json b/cypress/fixtures/donnees-financieres-confidential.json new file mode 100644 index 000000000..485a278e2 --- /dev/null +++ b/cypress/fixtures/donnees-financieres-confidential.json @@ -0,0 +1,115 @@ +{ + "nhits": 4, + "parameters": { + "dataset": "ratios_inpi_bce", + "q": "siren:487444697", + "rows": 10, + "start": 0, + "format": "json", + "timezone": "UTC" + }, + "records": [ + { + "datasetid": "ratios_inpi_bce", + "recordid": "acdf57029de7b235e2ff7eb74544ca9bdc6c08c1", + "fields": { + "taux_d_endettement": -121.548, + "credit_fournisseurs_jours": 116.598, + "couverture_des_interets": -3.373, + "capacite_de_remboursement": -2.718, + "marge_ebe": -27.746, + "ratio_de_vetuste": 64.985, + "autonomie_financiere": -36.881, + "caf_sur_ca": -28.351, + "poids_bfr_exploitation_sur_ca_jours": 138.585, + "marge_brute": 1231872, + "resultat_courant_avant_impots_sur_ca": -36.526, + "date_cloture_exercice": "2022-12-31", + "ebit": -660304, + "rotation_des_stocks_jours": 0.672, + "siren": "487444697", + "chiffre_d_affaires": 1848367, + "confidentiality": "Partiellement confidentiel", + "resultat_net": -693623, + "ebe": -514706, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": 38.496, + "ratio_de_liquidite": 260.954, + "credit_clients_jours": 422.619 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "3526c59e0f35b8f4ef77cad35f9b709b5a38aee3", + "fields": { + "taux_d_endettement": 228.905, + "credit_fournisseurs_jours": 52.864, + "couverture_des_interets": 11.736, + "capacite_de_remboursement": 12.908, + "marge_ebe": 7.053, + "ratio_de_vetuste": 80.303, + "autonomie_financiere": 18.722, + "caf_sur_ca": 6.629, + "poids_bfr_exploitation_sur_ca_jours": 274.53, + "marge_brute": 487417, + "resultat_courant_avant_impots_sur_ca": -0.146, + "date_cloture_exercice": "2020-12-31", + "ebit": 3629, + "rotation_des_stocks_jours": 232.914, + "siren": "487444697", + "chiffre_d_affaires": 532463, + "confidentiality": "Public", + "resultat_net": 2198, + "ebe": 37552, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": 76.258, + "ratio_de_liquidite": 360.23, + "credit_clients_jours": 225.321 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "76965ce13266084310b7dcf69bf9b67bd977a694", + "fields": { + "taux_d_endettement": 186.013, + "ratio_de_vetuste": 90.991, + "autonomie_financiere": 26.239, + "marge_brute": 0, + "date_cloture_exercice": "2019-12-31", + "ebit": 0, + "siren": "487444697", + "chiffre_d_affaires": 0, + "confidentiality": "Partiellement confidentiel", + "resultat_net": 15750, + "ebe": 0, + "type_bilan": "C", + "ratio_de_liquidite": 241.477 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "6be977e8e03457d082367106c04cebdb27680a3a", + "fields": { + "taux_d_endettement": -167.972, + "credit_fournisseurs_jours": 879.883, + "ratio_de_vetuste": 70.479, + "autonomie_financiere": -38.179, + "marge_brute": 0, + "date_cloture_exercice": "2021-12-31", + "ebit": 0, + "siren": "487444697", + "chiffre_d_affaires": 0, + "confidentiality": "Partiellement confidentiel", + "resultat_net": -715690, + "ebe": 0, + "type_bilan": "C", + "ratio_de_liquidite": 156.701, + "credit_clients_jours": 803.416 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + } + ] +} diff --git a/cypress/fixtures/donnees-financieres.json b/cypress/fixtures/donnees-financieres.json new file mode 100644 index 000000000..9810b9664 --- /dev/null +++ b/cypress/fixtures/donnees-financieres.json @@ -0,0 +1,300 @@ +{ + "nhits": 15, + "parameters": { + "dataset": "AAratios_inpi_bce", + "q": "siren:552032534", + "rows": 10, + "start": 0, + "format": "json", + "timezone": "UTC" + }, + "records": [ + { + "datasetid": "ratios_inpi_bce", + "recordid": "6fff26949678c6967ce63b5d60ee7f6eaf33d79d", + "fields": { + "taux_d_endettement": 0.0, + "couverture_des_interets": 0.0, + "capacite_de_remboursement": 0.0, + "marge_ebe": 100.0, + "autonomie_financiere": 32.827, + "caf_sur_ca": 16.661, + "poids_bfr_exploitation_sur_ca_jours": 130.495, + "marge_brute": 24812000000, + "resultat_courant_avant_impots_sur_ca": 13.268, + "date_cloture_exercice": "2018-12-31", + "ebit": 0, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 24812000000, + "confidentiality": "Public", + "resultat_net": 2559000000, + "ebe": 24812000000, + "type_bilan": "K", + "poids_bfr_exploitation_sur_ca": 36.249, + "ratio_de_liquidite": 0.0, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "5a06ad53ff77e062d681b47961758dad5cf13df1", + "fields": { + "taux_d_endettement": 119.827, + "couverture_des_interets": 5.034, + "capacite_de_remboursement": 48.105, + "marge_ebe": 50.253, + "ratio_de_vetuste": 36.842, + "autonomie_financiere": 37.761, + "caf_sur_ca": 54.469, + "poids_bfr_exploitation_sur_ca_jours": -2401.619, + "marge_brute": 593000000, + "resultat_courant_avant_impots_sur_ca": 67.791, + "date_cloture_exercice": "2019-12-31", + "ebit": -163000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 593000000, + "confidentiality": "Public", + "resultat_net": 471000000, + "ebe": 298000000, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": -667.116, + "ratio_de_liquidite": 8.532, + "credit_clients_jours": 167.454 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "591803b887dd4cef6f6c2b6e9d0a69f2e548edda", + "fields": { + "taux_d_endettement": 85.681, + "couverture_des_interets": 62.205, + "capacite_de_remboursement": 3.865, + "marge_ebe": 60.0, + "ratio_de_vetuste": 43.182, + "autonomie_financiere": 50.901, + "caf_sur_ca": 602.205, + "poids_bfr_exploitation_sur_ca_jours": -886.11, + "marge_brute": 635000000, + "resultat_courant_avant_impots_sur_ca": 609.606, + "date_cloture_exercice": "2021-12-31", + "ebit": -137000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 635000000, + "confidentiality": "Public", + "resultat_net": 3674000000, + "ebe": 381000000, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": -246.142, + "ratio_de_liquidite": 18.715, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "460b62d9e7d87f8a18f27a4084e620bcc9cbec6d", + "fields": { + "taux_d_endettement": 97.867, + "couverture_des_interets": 70.442, + "capacite_de_remboursement": 6.75, + "marge_ebe": 58.199, + "ratio_de_vetuste": 53.333, + "autonomie_financiere": 39.603, + "caf_sur_ca": 315.916, + "poids_bfr_exploitation_sur_ca_jours": -3366.174, + "marge_brute": 622000000, + "resultat_courant_avant_impots_sur_ca": 304.18, + "date_cloture_exercice": "2020-12-31", + "ebit": -130000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 622000000, + "confidentiality": "Public", + "resultat_net": 1931000000, + "ebe": 362000000, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": -935.048, + "ratio_de_liquidite": 5.741, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "cdcf936091d4efabbc761e8f77bbb714bf3e9450", + "fields": { + "taux_d_endettement": 96.017, + "credit_fournisseurs_jours": 93.997, + "couverture_des_interets": 2.274, + "capacite_de_remboursement": 6.418, + "marge_ebe": 47.449, + "autonomie_financiere": 38.254, + "caf_sur_ca": 10.642, + "poids_bfr_exploitation_sur_ca_jours": 124.023, + "marge_brute": 11521000000, + "resultat_courant_avant_impots_sur_ca": 8.216, + "date_cloture_exercice": "2021-12-31", + "ebit": 2257000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 24281000000, + "confidentiality": "Public", + "resultat_net": 1992000000, + "ebe": 11521000000, + "type_bilan": "K", + "poids_bfr_exploitation_sur_ca": 34.451, + "ratio_de_liquidite": 0.0, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "cd3d58866657dc59caa7c72c6386eac5478b1275", + "fields": { + "taux_d_endettement": 0.0, + "couverture_des_interets": 0.743, + "capacite_de_remboursement": 0.0, + "marge_ebe": 100.0, + "autonomie_financiere": 38.008, + "caf_sur_ca": -3124.661, + "poids_bfr_exploitation_sur_ca_jours": 134877.21, + "marge_brute": 25287000, + "resultat_courant_avant_impots_sur_ca": 11.338, + "date_cloture_exercice": "2019-12-31", + "ebit": 3237000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 25287000, + "confidentiality": "Public", + "resultat_net": 2028000000, + "ebe": 25287000, + "type_bilan": "K", + "poids_bfr_exploitation_sur_ca": 37465.892, + "ratio_de_liquidite": 0.0, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "a911bf2fce0b993b8827a7bbc4d3114c0ed8021c", + "fields": { + "taux_d_endettement": 20.366, + "credit_fournisseurs_jours": 57.275, + "couverture_des_interets": 18.443, + "capacite_de_remboursement": 11.796, + "marge_ebe": 13.756, + "autonomie_financiere": 179.52, + "caf_sur_ca": 5.791, + "poids_bfr_exploitation_sur_ca_jours": 168.977, + "marge_brute": 11521000000, + "resultat_courant_avant_impots_sur_ca": 8.216, + "date_cloture_exercice": "2022-12-31", + "ebit": 2257000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 24281000000, + "confidentiality": "Public", + "resultat_net": 0, + "ebe": 3340000000, + "type_bilan": "K", + "poids_bfr_exploitation_sur_ca": 46.938, + "ratio_de_liquidite": 0.0, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "f1dde091e605d096c8a32e82b2edd43ce6179ccd", + "fields": { + "taux_d_endettement": 0.0, + "couverture_des_interets": 0.0, + "capacite_de_remboursement": 0.0, + "marge_ebe": 59.657, + "ratio_de_vetuste": -194.444, + "autonomie_financiere": 46.229, + "caf_sur_ca": 191.416, + "poids_bfr_exploitation_sur_ca_jours": -2107.468, + "marge_brute": 699000000, + "resultat_courant_avant_impots_sur_ca": 197.854, + "date_cloture_exercice": "2023-12-31", + "ebit": -187000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 699000000, + "confidentiality": "Public", + "resultat_net": 1353000000, + "ebe": 417000000, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": -585.408, + "ratio_de_liquidite": -1.273, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "714b8ab05369c061f2ac2ac719a6f17832a4761f", + "fields": { + "taux_d_endettement": 92.375, + "couverture_des_interets": 60.892, + "capacite_de_remboursement": 3.865, + "marge_ebe": 60.0, + "ratio_de_vetuste": 38.298, + "autonomie_financiere": 47.213, + "caf_sur_ca": 602.205, + "poids_bfr_exploitation_sur_ca_jours": -703.559, + "marge_brute": 635000000, + "resultat_courant_avant_impots_sur_ca": 609.606, + "date_cloture_exercice": "2022-12-31", + "ebit": -137000000, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 635000000, + "confidentiality": "Public", + "resultat_net": 3674000000, + "ebe": 381000000, + "type_bilan": "C", + "poids_bfr_exploitation_sur_ca": -195.433, + "ratio_de_liquidite": 21.361, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + }, + { + "datasetid": "ratios_inpi_bce", + "recordid": "c9062b6bc38cfcd3d79999e8847b1ebcfb63d46e", + "fields": { + "taux_d_endettement": 0.0, + "couverture_des_interets": 0.0, + "capacite_de_remboursement": 0.0, + "marge_ebe": 100.0, + "autonomie_financiere": 29.828, + "caf_sur_ca": 15.649, + "poids_bfr_exploitation_sur_ca_jours": 304.419, + "marge_brute": 21944000000, + "resultat_courant_avant_impots_sur_ca": 11.985, + "date_cloture_exercice": "2016-12-31", + "ebit": 0, + "rotation_des_stocks_jours": 0.0, + "siren": "552032534", + "chiffre_d_affaires": 21944000000, + "confidentiality": "Public", + "resultat_net": 0, + "ebe": 21944000000, + "type_bilan": "K", + "poids_bfr_exploitation_sur_ca": 84.561, + "ratio_de_liquidite": 0.0, + "credit_clients_jours": 0.0 + }, + "record_timestamp": "2024-12-12T15:25:19Z" + } + ] +} diff --git a/cypress/fixtures/journal-officiel-associations.json b/cypress/fixtures/journal-officiel-associations.json new file mode 100644 index 000000000..35c93a3b4 --- /dev/null +++ b/cypress/fixtures/journal-officiel-associations.json @@ -0,0 +1,79 @@ +{ + "nhits": 1, + "parameters": { + "dataset": ["jo_associations"], + "q": "numero_rna=W643000551", + "rows": 10, + "start": 0, + "sort": ["dateparution"], + "refine": { + "source": "joafe" + }, + "format": "json", + "timezone": "UTC" + }, + "records": [ + { + "datasetid": "jo_associations", + "recordid": "af63011178c92f0f3a15bad67c52772115feb73d", + "fields": { + "numero_rna": "W643000551", + "internal_contenu_subnode": "modification", + "siege_social": "{\"complGeographique\": \"rue Jules Ferry,\", \"codePostal\": \"64110\", \"BP_ou_Lieudit_ou_CommuneDeleguee\": \"\", \"commune\": \"Maz\u00e8res-Lezons\", \"pays\": \"France\"}", + "typeavis": "Modification", + "metadonnees_type_code": "2", + "internal_contenu_main_node": "assoLoi1901", + "etatavis": "Initial", + "geo_point": [43.277531, -0.356241], + "domaine_activite_categorise": "19000/19010", + "region_code": "15", + "localisation_facette": "Nouvelle-Aquitaine/Pyr\u00e9n\u00e9es-Atlantiques", + "domaine_activite_libelle_categorise": "interventions sociales/centres sociaux et socioculturels, foyers de jeunes travailleurs, centres d'\u00e9tudes et d'action sociale", + "region_libelle": "Nouvelle-Aquitaine", + "cronosort": "2015-07-04T03:43:09+00:00", + "datedeclaration": "2015-06-19", + "association_type": "assoLoi1901", + "parution_numero": "20150027", + "annonce_type_facette": "Associations loi du 1er juillet 1901/Modification/Initial", + "association_type_libelle": "Associations loi du 1er juillet 1901", + "contenu": "{\"assoLoi1901\": {\"lieuDeclaration\": {\"lieuPref\": {\"libelle\": \"Pyr\u00e9n\u00e9es-Atlantiques\"}}, \"dateDeclaration\": \"2015-06-19\", \"modification\": {\"ancienTitre\": \"ASSOCIATION POUR LA GESTION DU CENTRE SOCIAL DE MAZERES-LEZONS.\", \"nouveauTitre\": \"CENTRE SOCIAL \\\"CAP'DE'TOUT\\\".\", \"nouvelObjet\": \"\u00eatre un lieu ressource pour les habitants et les familles, visant \u00e0 cr\u00e9er du lien et \u00eatre force de proposition par la mise en oeuvre de services, d'actions et de projets collectifs, participant aux \u00e9volutions et \u00e0 l'animation du territoire ; administre le centre social et en d\u00e9fini l'orientation g\u00e9n\u00e9rale, conform\u00e9ment \u00e0 la circulaire minist\u00e9rielle du 3 ao\u00fbt 1970 sur les centres sociaux et autres textes en vigueur.\", \"siegeSocial\": {\"complGeographique\": \"rue Jules Ferry,\", \"codePostal\": \"64110\", \"BP_ou_Lieudit_ou_CommuneDeleguee\": \"\", \"commune\": \"Maz\u00e8res-Lezons\", \"pays\": \"France\"}}}}", + "departement_libelle": "Pyr\u00e9n\u00e9es-Atlantiques", + "departement_code": "64", + "lieu_declaration_facette": "Pyr\u00e9n\u00e9es-Atlantiques/", + "source": "joafe", + "id": "201500271011", + "lieupref": "Pyr\u00e9n\u00e9es-Atlantiques", + "mapped_lieu_pref": "Pyr\u00e9n\u00e9es-Atlantiques", + "titre_ancien": "ASSOCIATION POUR LA GESTION DU CENTRE SOCIAL DE MAZERES-LEZONS.", + "nom_epci": "Communaut\u00e9 d'agglom\u00e9ration Pau B\u00e9arn Pyr\u00e9n\u00e9es", + "titre_nouveau": "CENTRE SOCIAL \"CAP'DE'TOUT\".", + "commune_actuelle": "Maz\u00e8res-Lezons", + "dateparution": "2015-07-04", + "objet": "\u00eatre un lieu ressource pour les habitants et les familles, visant \u00e0 cr\u00e9er du lien et \u00eatre force de proposition par la mise en oeuvre de services, d'actions et de projets collectifs, participant aux \u00e9volutions et \u00e0 l'animation du territoire ; administre le centre social et en d\u00e9fini l'orientation g\u00e9n\u00e9rale, conform\u00e9ment \u00e0 la circulaire minist\u00e9rielle du 3 ao\u00fbt 1970 sur les centres sociaux et autres textes en vigueur.", + "titre_search": "ASSOCIATION POUR LA GESTION DU CENTRE SOCIAL DE MAZERES-LEZONS. CENTRE SOCIAL \"CAP'DE'TOUT\". ASSOCIATION POUR LA GESTION DU CENTRE SOCIAL DE MAZERES-LEZONS CENTRE SOCIAL \"CAPDETOUT\"", + "code_epci": "200067254", + "codepostal_actuel": "64110", + "adresse_actuelle": "rue Jules Ferry,", + "numero_annonce": 1011 + }, + "geometry": { + "type": "Point", + "coordinates": [-0.356241, 43.277531] + }, + "record_timestamp": "2022-01-14T06:36:34.648Z" + } + ], + "facet_groups": [ + { + "name": "source", + "facets": [ + { + "name": "joafe", + "count": 1, + "state": "refined", + "path": "joafe" + } + ] + } + ] +} diff --git a/cypress/fixtures/ods-metadata.json b/cypress/fixtures/ods-metadata.json new file mode 100644 index 000000000..de57373ce --- /dev/null +++ b/cypress/fixtures/ods-metadata.json @@ -0,0 +1,5 @@ +{ + "metas": { + "metadata_processed": "2024-12-16T05:35:06.991199+00:00" + } +} diff --git a/cypress/mocks/handlers/annuaire-service-public.ts b/cypress/mocks/handlers/annuaire-service-public.ts new file mode 100644 index 000000000..b9878504b --- /dev/null +++ b/cypress/mocks/handlers/annuaire-service-public.ts @@ -0,0 +1,7 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; + +export const annuaireServicePublicHandler: HttpResponseResolver = ({ + request, +}) => { + return HttpResponse.json({}); +}; diff --git a/cypress/mocks/handlers/bodacc.ts b/cypress/mocks/handlers/bodacc.ts new file mode 100644 index 000000000..3e68bdd6d --- /dev/null +++ b/cypress/mocks/handlers/bodacc.ts @@ -0,0 +1,6 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; +import bodacc from '../../fixtures/bodacc.json'; + +export const bodaccHandler: HttpResponseResolver = ({ request }) => { + return HttpResponse.json(bodacc); +}; diff --git a/cypress/mocks/handlers/dgefp.ts b/cypress/mocks/handlers/dgefp.ts new file mode 100644 index 000000000..c7c082357 --- /dev/null +++ b/cypress/mocks/handlers/dgefp.ts @@ -0,0 +1,6 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; +import dgefp from '../../fixtures/dgefp.json'; + +export const dgefpHandler: HttpResponseResolver = ({ request }) => { + return HttpResponse.json(dgefp); +}; diff --git a/cypress/mocks/handlers/donnees-financieres.ts b/cypress/mocks/handlers/donnees-financieres.ts new file mode 100644 index 000000000..7ce0436c7 --- /dev/null +++ b/cypress/mocks/handlers/donnees-financieres.ts @@ -0,0 +1,7 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; + +export const donneesFinancieresHandler: HttpResponseResolver = ({ + request, +}) => { + return HttpResponse.json({}); +}; diff --git a/cypress/mocks/handlers/journal-officiel-associations.ts b/cypress/mocks/handlers/journal-officiel-associations.ts new file mode 100644 index 000000000..686e2cc0c --- /dev/null +++ b/cypress/mocks/handlers/journal-officiel-associations.ts @@ -0,0 +1,8 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; +import journalOfficielAssociations from '../../fixtures/journal-officiel-associations.json'; + +export const journalOfficielAssociationsHandler: HttpResponseResolver = ({ + request, +}) => { + return HttpResponse.json(journalOfficielAssociations); +}; diff --git a/cypress/mocks/handlers/ods-metadata.ts b/cypress/mocks/handlers/ods-metadata.ts new file mode 100644 index 000000000..3965ff6d3 --- /dev/null +++ b/cypress/mocks/handlers/ods-metadata.ts @@ -0,0 +1,6 @@ +import { HttpResponse, HttpResponseResolver } from 'msw'; +import odsMetadata from '../../fixtures/ods-metadata.json'; + +export const odsMetadataHandler: HttpResponseResolver = ({ request }) => { + return HttpResponse.json(odsMetadata); +}; diff --git a/cypress/mocks/routes.ts b/cypress/mocks/routes.ts index bcbbe9604..4a1b2d390 100644 --- a/cypress/mocks/routes.ts +++ b/cypress/mocks/routes.ts @@ -1,5 +1,6 @@ import routes from '#clients/routes'; import { http } from 'msw'; +import { annuaireServicePublicHandler } from './handlers/annuaire-service-public'; import { apiBioHandler } from './handlers/api-bio'; import { apiDataGouvEssHandler } from './handlers/api-data-gouv-ess'; import { apiDataSubventionHandler } from './handlers/api-data-subvention'; @@ -17,11 +18,16 @@ import { } from './handlers/api-sirene-insee'; import { associationHandler } from './handlers/association'; import { baseAdresseNationaleHandler } from './handlers/base-adresse-nationale'; +import { bodaccHandler } from './handlers/bodacc'; +import { dgefpHandler } from './handlers/dgefp'; +import { donneesFinancieresHandler } from './handlers/donnees-financieres'; import { educationNationaleHandler } from './handlers/education-nationale'; import { egaproHandler, egaproRepresentationHandler } from './handlers/egapro'; import { entrepreneurSpectaclesHandler } from './handlers/entrepreneur-spectacles'; import { eoriHandler } from './handlers/eori'; import { igHandler } from './handlers/ig'; +import { journalOfficielAssociationsHandler } from './handlers/journal-officiel-associations'; +import { odsMetadataHandler } from './handlers/ods-metadata'; import { rechercheEntrepriseHandler } from './handlers/recherche-entreprises'; import { rgeHandler } from './handlers/rge'; import { rneDefaultHandler, rneFallbackHandler } from './handlers/rne'; @@ -45,10 +51,6 @@ export const routesHandlers = [ routes.certifications.entrepriseInclusive.api.getBySiren('*'), apiInclusionHandler ), - http.get( - routes.certifications.entrepreneurSpectacles.ods.search, - entrepreneurSpectaclesHandler - ), http.get(routes.datagouv.ess, apiDataGouvEssHandler), http.get(routes.tooling.monitoring.getBySlug('*'), upDownIoHandler), http.get(routes.apiDataSubvention.grants('*'), apiDataSubventionHandler), @@ -63,4 +65,28 @@ export const routesHandlers = [ http.get(routes.geo.departements, apiGeoDepartementsHandler), http.get(routes.geo.regions, apiGeoRegionsHandler), http.get(routes.geo.epcis, apiGeoEpcisHandler), + http.get( + routes.certifications.entrepreneurSpectacles.ods.search, + entrepreneurSpectaclesHandler + ), + http.get( + routes.certifications.entrepreneurSpectacles.ods.metadata, + odsMetadataHandler + ), + http.get( + routes.annuaireServicePublic.ods.search, + annuaireServicePublicHandler + ), + http.get(routes.annuaireServicePublic.ods.metadata, odsMetadataHandler), + http.get(routes.donneesFinancieres.ods.search, donneesFinancieresHandler), + http.get(routes.donneesFinancieres.ods.metadata, odsMetadataHandler), + http.get(routes.bodacc.ods.search, bodaccHandler), + http.get(routes.bodacc.ods.metadata, odsMetadataHandler), + http.get(routes.dgefp.search, dgefpHandler), + http.get(routes.dgefp.metadata, odsMetadataHandler), + http.get( + routes.journalOfficielAssociations.ods.search, + journalOfficielAssociationsHandler + ), + http.get(routes.journalOfficielAssociations.ods.metadata, odsMetadataHandler), ]; diff --git a/hooks/fetch/bodacc.ts b/hooks/fetch/bodacc.ts index 9ba56dfa0..5c1daa6c8 100644 --- a/hooks/fetch/bodacc.ts +++ b/hooks/fetch/bodacc.ts @@ -1,4 +1,4 @@ -import clientBodacc from '#clients/open-data-soft/clients/bodacc'; +import { clientBodacc } from '#clients/open-data-soft/clients/bodacc'; import { EAdministration } from '#models/administrations/EAdministration'; import { IUniteLegale } from '#models/core/types'; import { FetchRessourceException } from '#models/exceptions';