@communecter/cocolight-api-client 1.0.148 → 1.0.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1035.cocolight-api-client.browser.js +1 -0
- package/dist/1035.cocolight-api-client.cjs +1 -0
- package/dist/1035.cocolight-api-client.mjs.js +1 -0
- package/dist/1483.cocolight-api-client.browser.js +1 -0
- package/dist/1483.cocolight-api-client.cjs +1 -0
- package/dist/1483.cocolight-api-client.mjs.js +1 -0
- package/dist/1491.cocolight-api-client.browser.js +1 -0
- package/dist/1491.cocolight-api-client.cjs +1 -0
- package/dist/1491.cocolight-api-client.mjs.js +1 -0
- package/dist/1494.cocolight-api-client.browser.js +1 -0
- package/dist/1494.cocolight-api-client.cjs +1 -0
- package/dist/1494.cocolight-api-client.mjs.js +1 -0
- package/dist/1641.cocolight-api-client.browser.js +1 -0
- package/dist/1641.cocolight-api-client.cjs +1 -0
- package/dist/1641.cocolight-api-client.mjs.js +1 -0
- package/dist/1678.cocolight-api-client.browser.js +1 -0
- package/dist/1678.cocolight-api-client.cjs +1 -0
- package/dist/1678.cocolight-api-client.mjs.js +1 -0
- package/dist/2041.cocolight-api-client.browser.js +1 -0
- package/dist/2041.cocolight-api-client.cjs +1 -0
- package/dist/2041.cocolight-api-client.mjs.js +1 -0
- package/dist/2302.cocolight-api-client.browser.js +1 -0
- package/dist/2302.cocolight-api-client.cjs +1 -0
- package/dist/2302.cocolight-api-client.mjs.js +1 -0
- package/dist/2313.cocolight-api-client.browser.js +1 -0
- package/dist/2313.cocolight-api-client.cjs +1 -0
- package/dist/2313.cocolight-api-client.mjs.js +1 -0
- package/dist/2379.cocolight-api-client.browser.js +1 -0
- package/dist/2379.cocolight-api-client.cjs +1 -0
- package/dist/2379.cocolight-api-client.mjs.js +1 -0
- package/dist/2439.cocolight-api-client.browser.js +1 -0
- package/dist/2439.cocolight-api-client.cjs +1 -0
- package/dist/2439.cocolight-api-client.mjs.js +1 -0
- package/dist/2594.cocolight-api-client.browser.js +1 -0
- package/dist/2594.cocolight-api-client.cjs +1 -0
- package/dist/2594.cocolight-api-client.mjs.js +1 -0
- package/dist/2766.cocolight-api-client.browser.js +1 -0
- package/dist/2766.cocolight-api-client.cjs +1 -0
- package/dist/2766.cocolight-api-client.mjs.js +1 -0
- package/dist/2812.cocolight-api-client.browser.js +1 -0
- package/dist/2812.cocolight-api-client.cjs +1 -0
- package/dist/2812.cocolight-api-client.mjs.js +1 -0
- package/dist/2918.cocolight-api-client.browser.js +1 -0
- package/dist/2918.cocolight-api-client.cjs +1 -0
- package/dist/2918.cocolight-api-client.mjs.js +1 -0
- package/dist/3028.cocolight-api-client.browser.js +1 -0
- package/dist/3028.cocolight-api-client.cjs +1 -0
- package/dist/3028.cocolight-api-client.mjs.js +1 -0
- package/dist/3330.cocolight-api-client.browser.js +1 -0
- package/dist/3330.cocolight-api-client.cjs +1 -0
- package/dist/3330.cocolight-api-client.mjs.js +1 -0
- package/dist/3371.cocolight-api-client.browser.js +1 -0
- package/dist/3371.cocolight-api-client.cjs +1 -0
- package/dist/3371.cocolight-api-client.mjs.js +1 -0
- package/dist/3401.cocolight-api-client.browser.js +1 -0
- package/dist/3401.cocolight-api-client.cjs +1 -0
- package/dist/3401.cocolight-api-client.mjs.js +1 -0
- package/dist/3516.cocolight-api-client.browser.js +1 -0
- package/dist/3516.cocolight-api-client.cjs +1 -0
- package/dist/3516.cocolight-api-client.mjs.js +1 -0
- package/dist/3593.cocolight-api-client.browser.js +1 -0
- package/dist/3593.cocolight-api-client.cjs +1 -0
- package/dist/3593.cocolight-api-client.mjs.js +1 -0
- package/dist/3764.cocolight-api-client.browser.js +1 -0
- package/dist/3764.cocolight-api-client.cjs +1 -0
- package/dist/3764.cocolight-api-client.mjs.js +1 -0
- package/dist/3873.cocolight-api-client.browser.js +1 -0
- package/dist/3873.cocolight-api-client.cjs +1 -0
- package/dist/3873.cocolight-api-client.mjs.js +1 -0
- package/dist/3911.cocolight-api-client.browser.js +1 -0
- package/dist/3911.cocolight-api-client.cjs +1 -0
- package/dist/3911.cocolight-api-client.mjs.js +1 -0
- package/dist/4031.cocolight-api-client.browser.js +1 -0
- package/dist/4031.cocolight-api-client.cjs +1 -0
- package/dist/4031.cocolight-api-client.mjs.js +1 -0
- package/dist/4152.cocolight-api-client.browser.js +1 -0
- package/dist/4152.cocolight-api-client.cjs +1 -0
- package/dist/4152.cocolight-api-client.mjs.js +1 -0
- package/dist/4203.cocolight-api-client.browser.js +1 -0
- package/dist/4203.cocolight-api-client.cjs +1 -0
- package/dist/4203.cocolight-api-client.mjs.js +1 -0
- package/dist/424.cocolight-api-client.browser.js +1 -0
- package/dist/424.cocolight-api-client.cjs +1 -0
- package/dist/424.cocolight-api-client.mjs.js +1 -0
- package/dist/435.cocolight-api-client.browser.js +1 -0
- package/dist/435.cocolight-api-client.cjs +1 -0
- package/dist/435.cocolight-api-client.mjs.js +1 -0
- package/dist/4402.cocolight-api-client.browser.js +1 -0
- package/dist/4402.cocolight-api-client.cjs +1 -0
- package/dist/4402.cocolight-api-client.mjs.js +1 -0
- package/dist/4425.cocolight-api-client.browser.js +1 -0
- package/dist/4425.cocolight-api-client.cjs +1 -0
- package/dist/4425.cocolight-api-client.mjs.js +1 -0
- package/dist/4472.cocolight-api-client.browser.js +1 -0
- package/dist/4472.cocolight-api-client.cjs +1 -0
- package/dist/4472.cocolight-api-client.mjs.js +1 -0
- package/dist/4914.cocolight-api-client.browser.js +1 -0
- package/dist/4914.cocolight-api-client.cjs +1 -0
- package/dist/4914.cocolight-api-client.mjs.js +1 -0
- package/dist/4959.cocolight-api-client.browser.js +1 -0
- package/dist/4959.cocolight-api-client.cjs +1 -0
- package/dist/4959.cocolight-api-client.mjs.js +1 -0
- package/dist/5100.cocolight-api-client.browser.js +1 -0
- package/dist/5100.cocolight-api-client.cjs +1 -0
- package/dist/5100.cocolight-api-client.mjs.js +1 -0
- package/dist/5111.cocolight-api-client.browser.js +1 -0
- package/dist/5111.cocolight-api-client.cjs +1 -0
- package/dist/5111.cocolight-api-client.mjs.js +1 -0
- package/dist/5286.cocolight-api-client.browser.js +1 -0
- package/dist/5286.cocolight-api-client.cjs +1 -0
- package/dist/5286.cocolight-api-client.mjs.js +1 -0
- package/dist/5380.cocolight-api-client.browser.js +1 -0
- package/dist/5380.cocolight-api-client.cjs +1 -0
- package/dist/5380.cocolight-api-client.mjs.js +1 -0
- package/dist/5383.cocolight-api-client.browser.js +1 -0
- package/dist/5383.cocolight-api-client.cjs +1 -0
- package/dist/5383.cocolight-api-client.mjs.js +1 -0
- package/dist/5480.cocolight-api-client.browser.js +1 -0
- package/dist/5480.cocolight-api-client.cjs +1 -0
- package/dist/5480.cocolight-api-client.mjs.js +1 -0
- package/dist/5541.cocolight-api-client.browser.js +1 -0
- package/dist/5541.cocolight-api-client.cjs +1 -0
- package/dist/5541.cocolight-api-client.mjs.js +1 -0
- package/dist/5839.cocolight-api-client.browser.js +1 -0
- package/dist/5839.cocolight-api-client.cjs +1 -0
- package/dist/5839.cocolight-api-client.mjs.js +1 -0
- package/dist/5862.cocolight-api-client.browser.js +1 -0
- package/dist/5862.cocolight-api-client.cjs +1 -0
- package/dist/5862.cocolight-api-client.mjs.js +1 -0
- package/dist/5869.cocolight-api-client.browser.js +1 -0
- package/dist/5869.cocolight-api-client.cjs +1 -0
- package/dist/5869.cocolight-api-client.mjs.js +1 -0
- package/dist/588.cocolight-api-client.cjs +1 -1
- package/dist/588.cocolight-api-client.mjs.js +1 -1
- package/dist/601.cocolight-api-client.browser.js +1 -0
- package/dist/601.cocolight-api-client.cjs +1 -0
- package/dist/601.cocolight-api-client.mjs.js +1 -0
- package/dist/6012.cocolight-api-client.browser.js +1 -0
- package/dist/6012.cocolight-api-client.cjs +1 -0
- package/dist/6012.cocolight-api-client.mjs.js +1 -0
- package/dist/6200.cocolight-api-client.browser.js +1 -0
- package/dist/6200.cocolight-api-client.cjs +1 -0
- package/dist/6200.cocolight-api-client.mjs.js +1 -0
- package/dist/6369.cocolight-api-client.browser.js +1 -0
- package/dist/6369.cocolight-api-client.cjs +1 -0
- package/dist/6369.cocolight-api-client.mjs.js +1 -0
- package/dist/7009.cocolight-api-client.browser.js +1 -0
- package/dist/7009.cocolight-api-client.cjs +1 -0
- package/dist/7009.cocolight-api-client.mjs.js +1 -0
- package/dist/725.cocolight-api-client.browser.js +1 -0
- package/dist/725.cocolight-api-client.cjs +1 -0
- package/dist/725.cocolight-api-client.mjs.js +1 -0
- package/dist/7320.cocolight-api-client.browser.js +1 -0
- package/dist/7339.cocolight-api-client.browser.js +1 -0
- package/dist/7339.cocolight-api-client.cjs +1 -0
- package/dist/7339.cocolight-api-client.mjs.js +1 -0
- package/dist/7398.cocolight-api-client.browser.js +1 -0
- package/dist/7398.cocolight-api-client.cjs +1 -0
- package/dist/7398.cocolight-api-client.mjs.js +1 -0
- package/dist/7888.cocolight-api-client.browser.js +1 -0
- package/dist/7888.cocolight-api-client.cjs +1 -0
- package/dist/7888.cocolight-api-client.mjs.js +1 -0
- package/dist/7975.cocolight-api-client.browser.js +1 -0
- package/dist/7975.cocolight-api-client.cjs +1 -0
- package/dist/7975.cocolight-api-client.mjs.js +1 -0
- package/dist/809.cocolight-api-client.browser.js +1 -0
- package/dist/809.cocolight-api-client.cjs +1 -0
- package/dist/809.cocolight-api-client.mjs.js +1 -0
- package/dist/8300.cocolight-api-client.browser.js +1 -0
- package/dist/8300.cocolight-api-client.cjs +1 -0
- package/dist/8300.cocolight-api-client.mjs.js +1 -0
- package/dist/8317.cocolight-api-client.browser.js +1 -0
- package/dist/8317.cocolight-api-client.cjs +1 -0
- package/dist/8317.cocolight-api-client.mjs.js +1 -0
- package/dist/8525.cocolight-api-client.browser.js +1 -0
- package/dist/8525.cocolight-api-client.cjs +1 -0
- package/dist/8525.cocolight-api-client.mjs.js +1 -0
- package/dist/8894.cocolight-api-client.browser.js +1 -0
- package/dist/8894.cocolight-api-client.cjs +1 -0
- package/dist/8894.cocolight-api-client.mjs.js +1 -0
- package/dist/9301.cocolight-api-client.browser.js +1 -0
- package/dist/9301.cocolight-api-client.cjs +1 -0
- package/dist/9301.cocolight-api-client.mjs.js +1 -0
- package/dist/9438.cocolight-api-client.browser.js +1 -0
- package/dist/9438.cocolight-api-client.cjs +1 -0
- package/dist/9438.cocolight-api-client.mjs.js +1 -0
- package/dist/9478.cocolight-api-client.browser.js +1 -0
- package/dist/9478.cocolight-api-client.cjs +1 -0
- package/dist/9478.cocolight-api-client.mjs.js +1 -0
- package/dist/9568.cocolight-api-client.browser.js +1 -0
- package/dist/9568.cocolight-api-client.cjs +1 -0
- package/dist/9568.cocolight-api-client.mjs.js +1 -0
- package/dist/cocolight-api-client.browser.js +3 -3
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/ApiClient.ts +53 -13
- package/src/api/BaseEntity.ts +237 -6
- package/src/api/EndpointApi.ts +17 -1
- package/src/api/EndpointApi.types.ts +29 -230
- package/src/api/Event.ts +6 -0
- package/src/api/Organization.ts +21 -85
- package/src/api/Poi.ts +10 -101
- package/src/api/Project.ts +6 -0
- package/src/api/User.ts +19 -1
- package/src/costum/normalize.ts +7 -0
- package/src/costum/registry.ts +138 -0
- package/src/costum/runtime-map.ts +221 -0
- package/src/costum/runtime.ts +221 -0
- package/src/costum/schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.ts +19 -0
- package/src/costum/schemas/FabEn.ts +19 -0
- package/src/costum/schemas/LivingLabInnovationSocialeBraspanon.ts +19 -0
- package/src/costum/schemas/alfph.ts +27 -0
- package/src/costum/schemas/campagne.ts +19 -0
- package/src/costum/schemas/chtitube.ts +19 -0
- package/src/costum/schemas/circuitCourt.ts +19 -0
- package/src/costum/schemas/cmcasHauteBretagne.ts +19 -0
- package/src/costum/schemas/coFinancementTierslieux.ts +27 -0
- package/src/costum/schemas/coeurNumerique.ts +19 -0
- package/src/costum/schemas/communLundi.ts +19 -0
- package/src/costum/schemas/cressReunion.ts +35 -0
- package/src/costum/schemas/cressReunionNetwork.ts +35 -0
- package/src/costum/schemas/ctenat.ts +43 -0
- package/src/costum/schemas/cyberReunion.ts +19 -0
- package/src/costum/schemas/ekisphere.ts +35 -0
- package/src/costum/schemas/equipementsSportifs974.ts +19 -0
- package/src/costum/schemas/federationDesCae.ts +19 -0
- package/src/costum/schemas/formationGenerique.ts +35 -0
- package/src/costum/schemas/franceTierslieux.ts +19 -0
- package/src/costum/schemas/hinaura.ts +27 -0
- package/src/costum/schemas/hubmayotte.ts +19 -0
- package/src/costum/schemas/hubnouvellecaledonie.ts +19 -0
- package/src/costum/schemas/hubpolynesiefrancaise.ts +19 -0
- package/src/costum/schemas/hubreunion.ts +19 -0
- package/src/costum/schemas/hubterritoires.ts +19 -0
- package/src/costum/schemas/hubwallisetfutuna.ts +19 -0
- package/src/costum/schemas/hva.ts +27 -0
- package/src/costum/schemas/ibv2.ts +19 -0
- package/src/costum/schemas/institutBleu.ts +19 -0
- package/src/costum/schemas/journalInsoumisChambery.ts +27 -0
- package/src/costum/schemas/kpacite.ts +19 -0
- package/src/costum/schemas/laCompagnieDesTierslieux.ts +43 -0
- package/src/costum/schemas/laMaisonDesFaiseurs.ts +19 -0
- package/src/costum/schemas/laReunionPourUnNumeriqueInclusif.ts +19 -0
- package/src/costum/schemas/laSemaineDesTierslieux.ts +19 -0
- package/src/costum/schemas/labEnCommuns.ts +19 -0
- package/src/costum/schemas/lakou.ts +27 -0
- package/src/costum/schemas/lesCommunsDesTierslieux.ts +19 -0
- package/src/costum/schemas/mayottePourUnNumeriqueInclusif.ts +19 -0
- package/src/costum/schemas/meir.ts +27 -0
- package/src/costum/schemas/navigatorDesTierslieux.ts +19 -0
- package/src/costum/schemas/notragora.ts +27 -0
- package/src/costum/schemas/nouvellecaledoniePourUnNumeriqueInclusif.ts +19 -0
- package/src/costum/schemas/openAtlas.ts +19 -0
- package/src/costum/schemas/polynesieFrancaisePourUnNumeriqueInclusif.ts +19 -0
- package/src/costum/schemas/prdr.ts +19 -0
- package/src/costum/schemas/reseauTierslieux.ts +19 -0
- package/src/costum/schemas/rfflabs.ts +19 -0
- package/src/costum/schemas/ries.ts +19 -0
- package/src/costum/schemas/siteDuPactePourLaTransition.ts +27 -0
- package/src/costum/schemas/sportSanteBienetre.ts +43 -0
- package/src/costum/schemas/suppa.ts +19 -0
- package/src/costum/schemas/terramies.ts +19 -0
- package/src/costum/schemas/testeTplFormation.ts +35 -0
- package/src/costum/schemas/tierslieuxbelgique.ts +19 -0
- package/src/costum/schemas/tierslieuxorg1.ts +35 -0
- package/src/costum/schemas/transiter.ts +35 -0
- package/src/costum/schemas/vhelioPeiTour2025.ts +19 -0
- package/src/costum/schemas/wallisetfutunaPourUnNumeriqueInclusif.ts +19 -0
- package/src/costum/symbol.ts +26 -0
- package/src/costum/types.ts +895 -0
- package/src/endpoints.module.ts +13 -13
- package/src/forms/entityForm.ts +142 -0
- package/src/index.ts +14 -0
- package/types/ApiClient.d.ts +1 -0
- package/types/api/BaseEntity.d.ts +69 -2
- package/types/api/EndpointApi.d.ts +11 -1
- package/types/api/EndpointApi.types.d.ts +27 -230
- package/types/api/Event.d.ts +2 -0
- package/types/api/Organization.d.ts +15 -71
- package/types/api/Poi.d.ts +2 -36
- package/types/api/Project.d.ts +2 -0
- package/types/api/User.d.ts +14 -0
- package/types/costum/normalize.d.ts +2 -0
- package/types/costum/registry.d.ts +11 -0
- package/types/costum/runtime-map.d.ts +3 -0
- package/types/costum/runtime.d.ts +99 -0
- package/types/costum/schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.d.ts +3 -0
- package/types/costum/schemas/FabEn.d.ts +3 -0
- package/types/costum/schemas/LivingLabInnovationSocialeBraspanon.d.ts +3 -0
- package/types/costum/schemas/alfph.d.ts +3 -0
- package/types/costum/schemas/campagne.d.ts +3 -0
- package/types/costum/schemas/chtitube.d.ts +3 -0
- package/types/costum/schemas/circuitCourt.d.ts +3 -0
- package/types/costum/schemas/cmcasHauteBretagne.d.ts +3 -0
- package/types/costum/schemas/coFinancementTierslieux.d.ts +3 -0
- package/types/costum/schemas/coeurNumerique.d.ts +3 -0
- package/types/costum/schemas/communLundi.d.ts +3 -0
- package/types/costum/schemas/cressReunion.d.ts +3 -0
- package/types/costum/schemas/cressReunionNetwork.d.ts +3 -0
- package/types/costum/schemas/ctenat.d.ts +3 -0
- package/types/costum/schemas/cyberReunion.d.ts +3 -0
- package/types/costum/schemas/ekisphere.d.ts +3 -0
- package/types/costum/schemas/equipementsSportifs974.d.ts +3 -0
- package/types/costum/schemas/federationDesCae.d.ts +3 -0
- package/types/costum/schemas/formationGenerique.d.ts +3 -0
- package/types/costum/schemas/franceTierslieux.d.ts +3 -0
- package/types/costum/schemas/hinaura.d.ts +3 -0
- package/types/costum/schemas/hubmayotte.d.ts +3 -0
- package/types/costum/schemas/hubnouvellecaledonie.d.ts +3 -0
- package/types/costum/schemas/hubpolynesiefrancaise.d.ts +3 -0
- package/types/costum/schemas/hubreunion.d.ts +3 -0
- package/types/costum/schemas/hubterritoires.d.ts +3 -0
- package/types/costum/schemas/hubwallisetfutuna.d.ts +3 -0
- package/types/costum/schemas/hva.d.ts +3 -0
- package/types/costum/schemas/ibv2.d.ts +3 -0
- package/types/costum/schemas/institutBleu.d.ts +3 -0
- package/types/costum/schemas/journalInsoumisChambery.d.ts +3 -0
- package/types/costum/schemas/kpacite.d.ts +3 -0
- package/types/costum/schemas/laCompagnieDesTierslieux.d.ts +3 -0
- package/types/costum/schemas/laMaisonDesFaiseurs.d.ts +3 -0
- package/types/costum/schemas/laReunionPourUnNumeriqueInclusif.d.ts +3 -0
- package/types/costum/schemas/laSemaineDesTierslieux.d.ts +3 -0
- package/types/costum/schemas/labEnCommuns.d.ts +3 -0
- package/types/costum/schemas/lakou.d.ts +3 -0
- package/types/costum/schemas/lesCommunsDesTierslieux.d.ts +3 -0
- package/types/costum/schemas/mayottePourUnNumeriqueInclusif.d.ts +3 -0
- package/types/costum/schemas/meir.d.ts +3 -0
- package/types/costum/schemas/navigatorDesTierslieux.d.ts +3 -0
- package/types/costum/schemas/notragora.d.ts +3 -0
- package/types/costum/schemas/nouvellecaledoniePourUnNumeriqueInclusif.d.ts +3 -0
- package/types/costum/schemas/openAtlas.d.ts +3 -0
- package/types/costum/schemas/polynesieFrancaisePourUnNumeriqueInclusif.d.ts +3 -0
- package/types/costum/schemas/prdr.d.ts +3 -0
- package/types/costum/schemas/reseauTierslieux.d.ts +3 -0
- package/types/costum/schemas/rfflabs.d.ts +3 -0
- package/types/costum/schemas/ries.d.ts +3 -0
- package/types/costum/schemas/siteDuPactePourLaTransition.d.ts +3 -0
- package/types/costum/schemas/sportSanteBienetre.d.ts +3 -0
- package/types/costum/schemas/suppa.d.ts +3 -0
- package/types/costum/schemas/terramies.d.ts +3 -0
- package/types/costum/schemas/testeTplFormation.d.ts +3 -0
- package/types/costum/schemas/tierslieuxbelgique.d.ts +3 -0
- package/types/costum/schemas/tierslieuxorg1.d.ts +3 -0
- package/types/costum/schemas/transiter.d.ts +3 -0
- package/types/costum/schemas/vhelioPeiTour2025.d.ts +3 -0
- package/types/costum/schemas/wallisetfutunaPourUnNumeriqueInclusif.d.ts +3 -0
- package/types/costum/symbol.d.ts +25 -0
- package/types/costum/types.d.ts +822 -0
- package/types/endpoints.module.d.ts +639 -5409
- package/types/forms/entityForm.d.ts +28 -0
- package/types/index.d.ts +4 -0
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
// Types générés depuis endpoints-copie.json
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
4
4
|
|
|
5
|
+
export interface DocumentListData {
|
|
6
|
+
pathParams?: {
|
|
7
|
+
/**
|
|
8
|
+
* ID MongoDB de l'élément
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Type d'élément
|
|
13
|
+
*/
|
|
14
|
+
type: "citoyens" | "organizations" | "projects" | "events" | "poi";
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
5
21
|
export interface PersonRegisterData {
|
|
6
22
|
/**
|
|
7
23
|
* Nom complet de l'utilisateur
|
|
@@ -2861,34 +2877,6 @@ export interface AddOrganizationData {
|
|
|
2861
2877
|
streetAddress?: string;
|
|
2862
2878
|
};
|
|
2863
2879
|
scope: "";
|
|
2864
|
-
/**
|
|
2865
|
-
* Nom de la structure porteuse (différent du nom du tiers-lieu)
|
|
2866
|
-
*/
|
|
2867
|
-
holderOrganization?: string;
|
|
2868
|
-
/**
|
|
2869
|
-
* Mode de gestion (Association, Collectif citoyen, SCIC, etc.)
|
|
2870
|
-
*/
|
|
2871
|
-
manageModel?: string;
|
|
2872
|
-
/**
|
|
2873
|
-
* Famille(s) de tiers-lieux (Coworking, Fablab, Foodlab, etc.)
|
|
2874
|
-
*/
|
|
2875
|
-
typePlace?: string;
|
|
2876
|
-
/**
|
|
2877
|
-
* Réseau accompagnateur (ex: Compagnon France Tiers-Lieux)
|
|
2878
|
-
*/
|
|
2879
|
-
compagnon?: string;
|
|
2880
|
-
/**
|
|
2881
|
-
* Surface bâtie en m²
|
|
2882
|
-
*/
|
|
2883
|
-
buildingSurfaceArea?: number;
|
|
2884
|
-
/**
|
|
2885
|
-
* Surface extérieure en m²
|
|
2886
|
-
*/
|
|
2887
|
-
siteSurfaceArea?: number;
|
|
2888
|
-
/**
|
|
2889
|
-
* Date d'ouverture du tiers-lieu (format libre, ex: 05/05/2026)
|
|
2890
|
-
*/
|
|
2891
|
-
openingDate?: string;
|
|
2892
2880
|
/**
|
|
2893
2881
|
* Horaires d'ouverture (7 entrées, une par jour de la semaine ; "" pour un jour fermé). Doit rester synchronisé avec VIRTUAL_OPENING_HOURS dans Organization.ts.
|
|
2894
2882
|
*
|
|
@@ -3068,17 +3056,11 @@ export interface AddOrganizationData {
|
|
|
3068
3056
|
*/
|
|
3069
3057
|
mainTag?: string;
|
|
3070
3058
|
/**
|
|
3071
|
-
*
|
|
3059
|
+
* Réseaux sociaux — objet keyé par plateforme (facebook/twitter/instagram/linkedin/youtube/mastodon/telegram/...). dataBinding org legacy `socialNetwork` (Organization.php:82).
|
|
3072
3060
|
*/
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
*/
|
|
3077
|
-
costumId?: string;
|
|
3078
|
-
/**
|
|
3079
|
-
* Type d'entité du costum (ex: projects)
|
|
3080
|
-
*/
|
|
3081
|
-
costumType?: string;
|
|
3061
|
+
socialNetwork?: {
|
|
3062
|
+
[k: string]: string;
|
|
3063
|
+
};
|
|
3082
3064
|
[k: string]: unknown;
|
|
3083
3065
|
}
|
|
3084
3066
|
|
|
@@ -3201,18 +3183,6 @@ export interface AddProjectData {
|
|
|
3201
3183
|
streetAddress?: string;
|
|
3202
3184
|
};
|
|
3203
3185
|
scope: "";
|
|
3204
|
-
/**
|
|
3205
|
-
* Slug du costum d'origine
|
|
3206
|
-
*/
|
|
3207
|
-
costumSlug?: string;
|
|
3208
|
-
/**
|
|
3209
|
-
* ID Mongo du costum d'origine
|
|
3210
|
-
*/
|
|
3211
|
-
costumId?: string;
|
|
3212
|
-
/**
|
|
3213
|
-
* Type d'entité du costum (ex: projects)
|
|
3214
|
-
*/
|
|
3215
|
-
costumType?: string;
|
|
3216
3186
|
[k: string]: unknown;
|
|
3217
3187
|
}
|
|
3218
3188
|
|
|
@@ -3222,6 +3192,15 @@ export interface AddPoiData {
|
|
|
3222
3192
|
* ID du POI
|
|
3223
3193
|
*/
|
|
3224
3194
|
id: string;
|
|
3195
|
+
/**
|
|
3196
|
+
* Origine d'insertion costum (attribution). Renseignée à la création d'un élément dans un costum.
|
|
3197
|
+
*/
|
|
3198
|
+
source?: {
|
|
3199
|
+
insertOrign?: string;
|
|
3200
|
+
key?: string;
|
|
3201
|
+
keys?: string[];
|
|
3202
|
+
[k: string]: unknown;
|
|
3203
|
+
};
|
|
3225
3204
|
/**
|
|
3226
3205
|
* Collection du POI
|
|
3227
3206
|
*/
|
|
@@ -3344,174 +3323,6 @@ export interface AddPoiData {
|
|
|
3344
3323
|
streetAddress?: string;
|
|
3345
3324
|
};
|
|
3346
3325
|
scope?: "";
|
|
3347
|
-
/**
|
|
3348
|
-
* Catégorie du POI
|
|
3349
|
-
*/
|
|
3350
|
-
categorie?: string;
|
|
3351
|
-
/**
|
|
3352
|
-
* Type d'équipement
|
|
3353
|
-
*/
|
|
3354
|
-
equip_type_name?: string;
|
|
3355
|
-
/**
|
|
3356
|
-
* Nom de l'institution associée
|
|
3357
|
-
*/
|
|
3358
|
-
inst_nom?: string;
|
|
3359
|
-
/**
|
|
3360
|
-
* Accessibilité handicapé
|
|
3361
|
-
*/
|
|
3362
|
-
inst_acc_handi_bool?: boolean;
|
|
3363
|
-
/**
|
|
3364
|
-
* Transport
|
|
3365
|
-
*/
|
|
3366
|
-
inst_trans_bool?: boolean;
|
|
3367
|
-
/**
|
|
3368
|
-
* Famille du type d'équipement
|
|
3369
|
-
*/
|
|
3370
|
-
equip_type_famille?: string;
|
|
3371
|
-
/**
|
|
3372
|
-
* Date de création de l'institution
|
|
3373
|
-
*/
|
|
3374
|
-
inst_date_creation?: string;
|
|
3375
|
-
/**
|
|
3376
|
-
* Date de l'enquête
|
|
3377
|
-
*/
|
|
3378
|
-
inst_enqu_date?: string;
|
|
3379
|
-
/**
|
|
3380
|
-
* Date de mise à jour
|
|
3381
|
-
*/
|
|
3382
|
-
equip_maj_date?: string;
|
|
3383
|
-
/**
|
|
3384
|
-
* Nature de l'équipement
|
|
3385
|
-
*/
|
|
3386
|
-
equip_nature?: string;
|
|
3387
|
-
/**
|
|
3388
|
-
* Type de sol
|
|
3389
|
-
*/
|
|
3390
|
-
equip_sol?: string;
|
|
3391
|
-
/**
|
|
3392
|
-
* Surface
|
|
3393
|
-
*/
|
|
3394
|
-
equip_surf?: number;
|
|
3395
|
-
/**
|
|
3396
|
-
* Éclairage
|
|
3397
|
-
*/
|
|
3398
|
-
equip_eclair?: boolean;
|
|
3399
|
-
/**
|
|
3400
|
-
* Nom de l'APS
|
|
3401
|
-
*/
|
|
3402
|
-
aps_name?: string[];
|
|
3403
|
-
/**
|
|
3404
|
-
* Accessibilité libre
|
|
3405
|
-
*/
|
|
3406
|
-
equip_acc_libre?: boolean;
|
|
3407
|
-
/**
|
|
3408
|
-
* Type d'accessibilité handicapé
|
|
3409
|
-
*/
|
|
3410
|
-
inst_acc_handi_type?: string;
|
|
3411
|
-
/**
|
|
3412
|
-
* Type de transport
|
|
3413
|
-
*/
|
|
3414
|
-
inst_trans_type?: string;
|
|
3415
|
-
/**
|
|
3416
|
-
* Participation
|
|
3417
|
-
*/
|
|
3418
|
-
inst_part_bool?: boolean;
|
|
3419
|
-
/**
|
|
3420
|
-
* Type de participation
|
|
3421
|
-
*/
|
|
3422
|
-
inst_part_type?: string[];
|
|
3423
|
-
/**
|
|
3424
|
-
* Nom du propriétaire de l'équipement
|
|
3425
|
-
*/
|
|
3426
|
-
equip_prop_nom?: string;
|
|
3427
|
-
/**
|
|
3428
|
-
* Type du propriétaire de l'équipement
|
|
3429
|
-
*/
|
|
3430
|
-
equip_prop_type?: string;
|
|
3431
|
-
/**
|
|
3432
|
-
* Type de gestion de l'équipement
|
|
3433
|
-
*/
|
|
3434
|
-
equip_gest_type?: string;
|
|
3435
|
-
/**
|
|
3436
|
-
* Accessibilité pour personnes à mobilité réduite
|
|
3437
|
-
*/
|
|
3438
|
-
equip_pmr_acc?: boolean;
|
|
3439
|
-
/**
|
|
3440
|
-
* Chemin pour personnes à mobilité réduite
|
|
3441
|
-
*/
|
|
3442
|
-
equip_pmr_chem?: boolean;
|
|
3443
|
-
/**
|
|
3444
|
-
* Douche pour personnes à mobilité réduite
|
|
3445
|
-
*/
|
|
3446
|
-
equip_pmr_douche?: boolean;
|
|
3447
|
-
/**
|
|
3448
|
-
* Sanitaire pour personnes à mobilité réduite
|
|
3449
|
-
*/
|
|
3450
|
-
equip_pmr_sanit?: boolean;
|
|
3451
|
-
/**
|
|
3452
|
-
* Tribune pour personnes à mobilité réduite
|
|
3453
|
-
*/
|
|
3454
|
-
equip_pmr_trib?: boolean;
|
|
3455
|
-
/**
|
|
3456
|
-
* Vestiaire pour personnes à mobilité réduite
|
|
3457
|
-
*/
|
|
3458
|
-
equip_pmr_vest?: boolean;
|
|
3459
|
-
/**
|
|
3460
|
-
* Aire de repos pour personnes à mobilité réduite
|
|
3461
|
-
*/
|
|
3462
|
-
equip_pshs_aire?: boolean;
|
|
3463
|
-
/**
|
|
3464
|
-
* Chemin pour personnes à mobilité réduite
|
|
3465
|
-
*/
|
|
3466
|
-
equip_pshs_chem?: boolean;
|
|
3467
|
-
/**
|
|
3468
|
-
* Sanitaire pour personnes à mobilité réduite
|
|
3469
|
-
*/
|
|
3470
|
-
equip_pshs_sanit?: boolean;
|
|
3471
|
-
/**
|
|
3472
|
-
* Tribune pour personnes à mobilité réduite
|
|
3473
|
-
*/
|
|
3474
|
-
equip_pshs_trib?: boolean;
|
|
3475
|
-
/**
|
|
3476
|
-
* Vestiaire pour personnes à mobilité réduite
|
|
3477
|
-
*/
|
|
3478
|
-
equip_pshs_vest?: boolean;
|
|
3479
|
-
/**
|
|
3480
|
-
* Signalisation pour personnes à mobilité réduite
|
|
3481
|
-
*/
|
|
3482
|
-
equip_pshs_sign?: boolean;
|
|
3483
|
-
/**
|
|
3484
|
-
* Largeur de l'équipement
|
|
3485
|
-
*/
|
|
3486
|
-
equip_larg?: number;
|
|
3487
|
-
/**
|
|
3488
|
-
* Longueur de l'équipement
|
|
3489
|
-
*/
|
|
3490
|
-
equip_long?: number;
|
|
3491
|
-
/**
|
|
3492
|
-
* Douche
|
|
3493
|
-
*/
|
|
3494
|
-
equip_douche?: boolean;
|
|
3495
|
-
/**
|
|
3496
|
-
* Type de localisation de l'équipement
|
|
3497
|
-
*/
|
|
3498
|
-
equip_loc_type?: string[];
|
|
3499
|
-
/**
|
|
3500
|
-
* Utilisateur de l'équipement
|
|
3501
|
-
*/
|
|
3502
|
-
equip_utilisateur?: string[];
|
|
3503
|
-
/**
|
|
3504
|
-
* Slug du costum d'origine
|
|
3505
|
-
*/
|
|
3506
|
-
costumSlug?: string;
|
|
3507
|
-
/**
|
|
3508
|
-
* ID Mongo du costum d'origine
|
|
3509
|
-
*/
|
|
3510
|
-
costumId?: string;
|
|
3511
|
-
/**
|
|
3512
|
-
* Type d'entité du costum (ex: projects)
|
|
3513
|
-
*/
|
|
3514
|
-
costumType?: string;
|
|
3515
3326
|
[k: string]: unknown;
|
|
3516
3327
|
}
|
|
3517
3328
|
|
|
@@ -3859,18 +3670,6 @@ export interface AddEventData {
|
|
|
3859
3670
|
streetAddress?: string;
|
|
3860
3671
|
};
|
|
3861
3672
|
scope: "";
|
|
3862
|
-
/**
|
|
3863
|
-
* Slug du costum d'origine
|
|
3864
|
-
*/
|
|
3865
|
-
costumSlug?: string;
|
|
3866
|
-
/**
|
|
3867
|
-
* ID Mongo du costum d'origine
|
|
3868
|
-
*/
|
|
3869
|
-
costumId?: string;
|
|
3870
|
-
/**
|
|
3871
|
-
* Type d'entité du costum (ex: projects)
|
|
3872
|
-
*/
|
|
3873
|
-
costumType?: string;
|
|
3874
3673
|
[k: string]: unknown;
|
|
3875
3674
|
}
|
|
3876
3675
|
|
package/src/api/Event.ts
CHANGED
|
@@ -12,6 +12,9 @@ export class Event extends BaseEntity<EventItemNormalized> {
|
|
|
12
12
|
static override entityType = "events";
|
|
13
13
|
static override entityTag = "Event";
|
|
14
14
|
|
|
15
|
+
/** Bloc de création où injecter les champs costum (CostumScope). */
|
|
16
|
+
static override COSTUM_ADD_CONSTANT = "ADD_EVENT";
|
|
17
|
+
|
|
15
18
|
static override SCHEMA_CONSTANTS: string[] = [
|
|
16
19
|
"ADD_EVENT",
|
|
17
20
|
"UPDATE_BLOCK_SLUG",
|
|
@@ -75,6 +78,9 @@ export class Event extends BaseEntity<EventItemNormalized> {
|
|
|
75
78
|
throw new ApiError("utilisation invalide de _update, utilisez save", 400);
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
// Entité costum-scopée : tout l'UPDATE part en UN `element/save` (pendant de l'ADD, hooks costum). cf. BaseEntity.
|
|
82
|
+
if (this._costumCtx) return this._saveCostumViaElementSave(payload);
|
|
83
|
+
|
|
78
84
|
let hasChanged = false;
|
|
79
85
|
|
|
80
86
|
const blockData = this._extractAllValidFieldsFromSchema(
|
package/src/api/Organization.ts
CHANGED
|
@@ -18,6 +18,9 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
18
18
|
|
|
19
19
|
static override entityTag = "Organization";
|
|
20
20
|
|
|
21
|
+
/** Bloc de création où injecter les champs costum (CostumScope). */
|
|
22
|
+
static override COSTUM_ADD_CONSTANT = "ADD_ORGANIZATION";
|
|
23
|
+
|
|
21
24
|
static override SCHEMA_CONSTANTS: string[] = [
|
|
22
25
|
"ADD_ORGANIZATION",
|
|
23
26
|
"UPDATE_BLOCK_DESCRIPTION",
|
|
@@ -27,7 +30,7 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
27
30
|
"UPDATE_BLOCK_SLUG",
|
|
28
31
|
"PROFIL_IMAGE",
|
|
29
32
|
"VIRTUAL_OPENING_HOURS",
|
|
30
|
-
"
|
|
33
|
+
"VIRTUAL_ORG_BASE_FIELDS"
|
|
31
34
|
];
|
|
32
35
|
|
|
33
36
|
static override VIRTUAL_SCHEMAS = {
|
|
@@ -84,24 +87,16 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
84
87
|
}
|
|
85
88
|
},
|
|
86
89
|
/**
|
|
87
|
-
* Champs
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* Même pattern qu'Action.ts/VIRTUAL_ACTION_EDITABLE : déclaration uniquement pour
|
|
92
|
-
* autoriser l'écriture sur le draft. Le persiste réel se fait via CUSTOM_FIELD_HANDLERS.
|
|
90
|
+
* Champs de BASE (DATA_BINDING) sans `UPDATE_BLOCK_*` dédié : `telephone`/`video`. Déclarés ici
|
|
91
|
+
* pour être writable sur le draft, persistés à l'édition via CUSTOM_FIELD_HANDLERS → UPDATE_PATH_VALUE.
|
|
92
|
+
* (Les champs TIERS-LIEU costum — holderOrganization/manageModel/typePlace/buildingSurfaceArea/
|
|
93
|
+
* siteSurfaceArea/openingDate — sont désormais gérés par CostumScope/auto-derive, cf. inc1b/inc2.)
|
|
93
94
|
*/
|
|
94
|
-
|
|
95
|
+
VIRTUAL_ORG_BASE_FIELDS: {
|
|
95
96
|
type: "object",
|
|
96
97
|
properties: {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
typePlace: { type: "string" },
|
|
100
|
-
buildingSurfaceArea: { type: "number" },
|
|
101
|
-
siteSurfaceArea: { type: "number" },
|
|
102
|
-
openingDate: { type: "string" },
|
|
103
|
-
telephone: { type: "string" },
|
|
104
|
-
video: { type: "array", items: { type: "string" } }
|
|
98
|
+
telephone: { type: "string" },
|
|
99
|
+
video: { type: "array", items: { type: "string" } }
|
|
105
100
|
}
|
|
106
101
|
}
|
|
107
102
|
};
|
|
@@ -111,14 +106,8 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
111
106
|
updateMethod: "updateOpeningHours",
|
|
112
107
|
schemaConstant: "VIRTUAL_OPENING_HOURS"
|
|
113
108
|
}],
|
|
114
|
-
["
|
|
115
|
-
["
|
|
116
|
-
["typePlace", { updateMethod: "updateTypePlace", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
|
|
117
|
-
["buildingSurfaceArea", { updateMethod: "updateBuildingSurfaceArea", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
|
|
118
|
-
["siteSurfaceArea", { updateMethod: "updateSiteSurfaceArea", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
|
|
119
|
-
["openingDate", { updateMethod: "updateOpeningDate", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
|
|
120
|
-
["telephone", { updateMethod: "updateTelephone", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
|
|
121
|
-
["video", { updateMethod: "updateVideo", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }]
|
|
109
|
+
["telephone", { updateMethod: "updateTelephone", schemaConstant: "VIRTUAL_ORG_BASE_FIELDS" }],
|
|
110
|
+
["video", { updateMethod: "updateVideo", schemaConstant: "VIRTUAL_ORG_BASE_FIELDS" }]
|
|
122
111
|
] as const);
|
|
123
112
|
|
|
124
113
|
static ADD_BLOCKS = new Map([
|
|
@@ -235,6 +224,9 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
235
224
|
throw new ApiError("utilisation invalide de _update, utilisez save", 400);
|
|
236
225
|
}
|
|
237
226
|
|
|
227
|
+
// Entité costum-scopée : tout l'UPDATE part en UN `element/save` (pendant de l'ADD, hooks costum). cf. BaseEntity.
|
|
228
|
+
if (this._costumCtx) return this._saveCostumViaElementSave(payload);
|
|
229
|
+
|
|
238
230
|
if (payload.id) delete payload.id;
|
|
239
231
|
let hasChanged = false;
|
|
240
232
|
|
|
@@ -639,70 +631,14 @@ export class Organization extends BaseEntity<OrganizationItemNormalized> {
|
|
|
639
631
|
|
|
640
632
|
/**
|
|
641
633
|
* ───────────────────────────────
|
|
642
|
-
* Champs
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* flow `org.data.X = Y` + `save()` les drop silencieusement (les schémas de
|
|
647
|
-
* UPDATE_BLOCK_INFO/DESCRIPTION/SOCIAL/LOCALITY filtrent strictement).
|
|
648
|
-
*
|
|
649
|
-
* Pattern identique à Action.ts (CUSTOM_FIELD_HANDLERS → updateXxx → updateField).
|
|
650
|
-
* Voir tests/integration/advanced/tiers-lieux-save-fields.test.ts pour la preuve.
|
|
634
|
+
* Champs de BASE sans `UPDATE_BLOCK_*` dédié : `telephone` / `video` (dispatch UPDATE_PATH_VALUE).
|
|
635
|
+
* Les champs TIERS-LIEU costum (holderOrganization/manageModel/typePlace/buildingSurfaceArea/
|
|
636
|
+
* siteSurfaceArea/openingDate) sont gérés par CostumScope (création) + auto-derive de `_costumCtx`
|
|
637
|
+
* depuis `source.key` (chargement) → dispatch générique `_dispatchCostumFieldUpdates`. cf. inc1b/inc2.
|
|
651
638
|
* ───────────────────────────────
|
|
652
639
|
*/
|
|
653
640
|
|
|
654
|
-
/** Met à jour `
|
|
655
|
-
async updateHolderOrganization(value: string): Promise<unknown> {
|
|
656
|
-
const result = await this.updateField("holderOrganization", value);
|
|
657
|
-
await this._refreshIfDirect();
|
|
658
|
-
return result;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/** Met à jour `manageModel` (mode de gestion : association, SCIC, SCOP, etc.). */
|
|
662
|
-
async updateManageModel(value: string): Promise<unknown> {
|
|
663
|
-
const result = await this.updateField("manageModel", value);
|
|
664
|
-
await this._refreshIfDirect();
|
|
665
|
-
return result;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Met à jour `typePlace` (famille(s) de tiers-lieux).
|
|
670
|
-
* Format : string CSV "label1, label2" (le backend stocke tel quel).
|
|
671
|
-
*/
|
|
672
|
-
async updateTypePlace(value: string): Promise<unknown> {
|
|
673
|
-
const result = await this.updateField("typePlace", value);
|
|
674
|
-
await this._refreshIfDirect();
|
|
675
|
-
return result;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
/** Met à jour `buildingSurfaceArea` (surface bâtie en m²). `setType: "int"` force le cast. */
|
|
679
|
-
async updateBuildingSurfaceArea(value: number): Promise<unknown> {
|
|
680
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
681
|
-
throw new ApiError(`buildingSurfaceArea: attendu nombre fini. Reçu: ${JSON.stringify(value)}`, 400);
|
|
682
|
-
}
|
|
683
|
-
const result = await this.updateField("buildingSurfaceArea", value, { setType: "int" });
|
|
684
|
-
await this._refreshIfDirect();
|
|
685
|
-
return result;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/** Met à jour `siteSurfaceArea` (surface extérieure en m²). `setType: "int"` force le cast. */
|
|
689
|
-
async updateSiteSurfaceArea(value: number): Promise<unknown> {
|
|
690
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
691
|
-
throw new ApiError(`siteSurfaceArea: attendu nombre fini. Reçu: ${JSON.stringify(value)}`, 400);
|
|
692
|
-
}
|
|
693
|
-
const result = await this.updateField("siteSurfaceArea", value, { setType: "int" });
|
|
694
|
-
await this._refreshIfDirect();
|
|
695
|
-
return result;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/** Met à jour `openingDate` (format libre, ex: "05/05/2026" ou "01/MM/YYYY"). */
|
|
699
|
-
async updateOpeningDate(value: string): Promise<unknown> {
|
|
700
|
-
const result = await this.updateField("openingDate", value);
|
|
701
|
-
await this._refreshIfDirect();
|
|
702
|
-
return result;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
/** Met à jour `telephone` (téléphone du tiers-lieu, distinct des champs citoyen fixe/mobile). */
|
|
641
|
+
/** Met à jour `telephone` (téléphone de la structure, distinct des champs citoyen fixe/mobile). */
|
|
706
642
|
async updateTelephone(value: string): Promise<unknown> {
|
|
707
643
|
const result = await this.updateField("telephone", value);
|
|
708
644
|
await this._refreshIfDirect();
|
package/src/api/Poi.ts
CHANGED
|
@@ -3,51 +3,26 @@ import { BaseEntity } from "./BaseEntity.js";
|
|
|
3
3
|
import { PoiItemNormalized } from "./serverDataType/Poi.js";
|
|
4
4
|
import { transformEntityRefs } from "../types/transforms.js";
|
|
5
5
|
|
|
6
|
-
import type { SetTypeValue } from "./BaseEntity.js";
|
|
7
6
|
import type { AddPoiData } from "./EndpointApi.types.js";
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* - `setType` : coercion backend pour `UPDATE_PATH_VALUE` (absent = string/array)
|
|
13
|
-
* On en dérive `Poi.VIRTUAL_SCHEMAS`, `Poi.CUSTOM_FIELD_HANDLERS` et `Poi.EQUIPMENT_SETTYPE`.
|
|
14
|
-
*/
|
|
15
|
-
const POI_EQUIPMENT_FIELDS: ReadonlyArray<{ name: string; schema: Record<string, unknown>; setType?: SetTypeValue }> = [
|
|
16
|
-
// Nombres (dimensions)
|
|
17
|
-
...["equip_surf", "equip_larg", "equip_long"].map((name) => ({ name, schema: { type: "number" }, setType: "float" as SetTypeValue })),
|
|
18
|
-
// Dates (string côté schéma, normalisées en Date à la lecture ; isoDate à l'écriture)
|
|
19
|
-
...["equip_maj_date", "inst_date_creation", "inst_enqu_date"].map((name) => ({ name, schema: { type: "string" }, setType: "isoDate" as SetTypeValue })),
|
|
20
|
-
// Booléens
|
|
21
|
-
...[
|
|
22
|
-
"inst_acc_handi_bool", "inst_trans_bool", "equip_eclair", "equip_acc_libre", "inst_part_bool",
|
|
23
|
-
"equip_pmr_acc", "equip_pmr_chem", "equip_pmr_douche", "equip_pmr_sanit", "equip_pmr_trib", "equip_pmr_vest",
|
|
24
|
-
"equip_pshs_aire", "equip_pshs_chem", "equip_pshs_sanit", "equip_pshs_trib", "equip_pshs_vest", "equip_pshs_sign",
|
|
25
|
-
"equip_douche"
|
|
26
|
-
].map((name) => ({ name, schema: { type: "boolean" }, setType: "bool" as SetTypeValue })),
|
|
27
|
-
// Strings
|
|
28
|
-
...[
|
|
29
|
-
"categorie", "equip_type_name", "inst_nom", "equip_type_famille", "equip_nature", "equip_sol",
|
|
30
|
-
"inst_acc_handi_type", "inst_trans_type", "equip_prop_nom", "equip_prop_type", "equip_gest_type"
|
|
31
|
-
].map((name) => ({ name, schema: { type: "string" } })),
|
|
32
|
-
// Arrays de strings
|
|
33
|
-
...[
|
|
34
|
-
"aps_name", "inst_part_type", "equip_loc_type", "equip_utilisateur"
|
|
35
|
-
].map((name) => ({ name, schema: { type: "array", items: { type: "string" } } }))
|
|
36
|
-
];
|
|
37
|
-
|
|
8
|
+
// Les champs « équipement sportif » (RES) sont désormais modélisés comme champs COSTUM
|
|
9
|
+
// (costum equipementsSportifs974) : writable/dispatch via `CostumScope` (création) et auto-dérivation
|
|
10
|
+
// de `_costumCtx` depuis `source.key` (chargement). Plus de hand-written ici. cf. inc1b/inc2.
|
|
38
11
|
export class Poi extends BaseEntity<PoiItemNormalized> {
|
|
39
12
|
static override entityType = "poi";
|
|
40
13
|
|
|
41
14
|
static override entityTag = "Poi";
|
|
42
15
|
|
|
16
|
+
/** Bloc de création où injecter les champs costum (CostumScope). */
|
|
17
|
+
static override COSTUM_ADD_CONSTANT = "ADD_POI";
|
|
18
|
+
|
|
43
19
|
static override SCHEMA_CONSTANTS: string[] = [
|
|
44
20
|
"ADD_POI",
|
|
45
21
|
"UPDATE_BLOCK_DESCRIPTION",
|
|
46
22
|
"UPDATE_BLOCK_INFO",
|
|
47
23
|
"UPDATE_BLOCK_LOCALITY",
|
|
48
24
|
"UPDATE_BLOCK_SLUG",
|
|
49
|
-
"PROFIL_IMAGE"
|
|
50
|
-
"VIRTUAL_POI_EQUIPMENT"
|
|
25
|
+
"PROFIL_IMAGE"
|
|
51
26
|
];
|
|
52
27
|
|
|
53
28
|
static ADD_BLOCKS = new Map([
|
|
@@ -63,30 +38,6 @@ export class Poi extends BaseEntity<PoiItemNormalized> {
|
|
|
63
38
|
["PROFIL_IMAGE", "updateImageProfil"]
|
|
64
39
|
] as const);
|
|
65
40
|
|
|
66
|
-
/**
|
|
67
|
-
* Champs « équipement sportif » (RES) éditables hors `UPDATE_BLOCK_*` : déclarés en
|
|
68
|
-
* VIRTUAL_SCHEMA (autorise l'écriture sur le draft + fixe les types) et persistés à
|
|
69
|
-
* l'update via `CUSTOM_FIELD_HANDLERS` → `updateEquipmentField` → `UPDATE_PATH_VALUE`.
|
|
70
|
-
* Même pattern qu'`Organization`/`Action`. (Ils restent aussi dans `ADD_POI` pour la création.)
|
|
71
|
-
*/
|
|
72
|
-
static override VIRTUAL_SCHEMAS = {
|
|
73
|
-
VIRTUAL_POI_EQUIPMENT: {
|
|
74
|
-
type: "object",
|
|
75
|
-
properties: Object.fromEntries(POI_EQUIPMENT_FIELDS.map((f) => [f.name, f.schema]))
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
static override CUSTOM_FIELD_HANDLERS = new Map(
|
|
80
|
-
POI_EQUIPMENT_FIELDS.map((f) =>
|
|
81
|
-
[f.name, { updateMethod: "updateEquipmentField", schemaConstant: "VIRTUAL_POI_EQUIPMENT" }] as [string, { updateMethod: string; schemaConstant?: string }]
|
|
82
|
-
)
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
/** setType backend par champ équipement (consommé par `updateEquipmentField`). */
|
|
86
|
-
private static readonly EQUIPMENT_SETTYPE = new Map<string, SetTypeValue | undefined>(
|
|
87
|
-
POI_EQUIPMENT_FIELDS.map((f) => [f.name, f.setType])
|
|
88
|
-
);
|
|
89
|
-
|
|
90
41
|
override defaultFields: Record<string, any> = {
|
|
91
42
|
typeElement: this.getEntityType()
|
|
92
43
|
};
|
|
@@ -135,26 +86,12 @@ export class Poi extends BaseEntity<PoiItemNormalized> {
|
|
|
135
86
|
throw new ApiError("utilisation invalide de _update, utilisez save", 400);
|
|
136
87
|
}
|
|
137
88
|
|
|
89
|
+
// Entité costum-scopée : tout l'UPDATE part en UN `element/save` (pendant de l'ADD, hooks costum). cf. BaseEntity.
|
|
90
|
+
if (this._costumCtx) return this._saveCostumViaElementSave(payload);
|
|
91
|
+
|
|
138
92
|
if (payload.id) delete payload.id;
|
|
139
93
|
let hasChanged = false;
|
|
140
94
|
|
|
141
|
-
// 1. Champs équipement (RES) : non couverts par les UPDATE_BLOCK_*. Persistés
|
|
142
|
-
// individuellement via CUSTOM_FIELD_HANDLERS -> updateEquipmentField -> UPDATE_PATH_VALUE
|
|
143
|
-
// (même mécanisme qu'Organization/Action).
|
|
144
|
-
const customHandlers = Poi.CUSTOM_FIELD_HANDLERS;
|
|
145
|
-
if (customHandlers) {
|
|
146
|
-
const processedFields = new Set<string>();
|
|
147
|
-
for (const [fieldName, config] of customHandlers) {
|
|
148
|
-
if (fieldName in payload && this._hasFieldChanged(fieldName)) {
|
|
149
|
-
await this._invokeCustomFieldHandler(config.updateMethod, payload[fieldName], fieldName);
|
|
150
|
-
processedFields.add(fieldName);
|
|
151
|
-
hasChanged = true;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
processedFields.forEach((f) => delete payload[f]);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// 2. Blocs standards (description, info, locality, slug, image).
|
|
158
95
|
for (const [constant, methodName] of Array.from(Poi.UPDATE_BLOCKS)) {
|
|
159
96
|
const blockData = this._extractChangedFieldsFromSchema(
|
|
160
97
|
this.apiClient,
|
|
@@ -172,34 +109,6 @@ export class Poi extends BaseEntity<PoiItemNormalized> {
|
|
|
172
109
|
return hasChanged;
|
|
173
110
|
};
|
|
174
111
|
|
|
175
|
-
/**
|
|
176
|
-
* Handler générique des champs « équipement sportif » (RES), enregistré dans
|
|
177
|
-
* `CUSTOM_FIELD_HANDLERS`. Persiste un champ via `UPDATE_PATH_VALUE` avec le `setType`
|
|
178
|
-
* adéquat (lu dans `EQUIPMENT_SETTYPE`). `fieldName` est fourni par `_invokeCustomFieldHandler`.
|
|
179
|
-
*
|
|
180
|
-
* Effacement façon `Action` : `null`/`""` → on envoie `""` SANS `setType` → le backend fait
|
|
181
|
-
* `!empty($value)` → `$unset` (sinon `floatval("")=0` écraserait au lieu d'effacer).
|
|
182
|
-
*/
|
|
183
|
-
async updateEquipmentField(value: unknown, fieldName: string): Promise<unknown> {
|
|
184
|
-
const setType = Poi.EQUIPMENT_SETTYPE.get(fieldName);
|
|
185
|
-
const isClear = value === null || value === "";
|
|
186
|
-
return this.updateField(fieldName, isClear ? "" : value, isClear || !setType ? {} : { setType });
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Override confiné à `Poi` : forwarde `fieldName` au handler (2e argument) pour permettre
|
|
191
|
-
* un handler générique unique (`updateEquipmentField`) couvrant les ~39 champs équipement,
|
|
192
|
-
* sans toucher `BaseEntity._invokeCustomFieldHandler` (utilisé par les autres entités, qui
|
|
193
|
-
* ne passent que `value`). Copie volontaire du corps de base + le forward du `fieldName`.
|
|
194
|
-
*/
|
|
195
|
-
protected override async _invokeCustomFieldHandler(methodName: string, value: any, fieldName: string): Promise<any> {
|
|
196
|
-
const method = (this as any)[methodName];
|
|
197
|
-
if (typeof method !== "function") {
|
|
198
|
-
throw new ApiError(`Custom handler "${methodName}" not found for field "${fieldName}"`, 500);
|
|
199
|
-
}
|
|
200
|
-
return await method.call(this, value, fieldName);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
112
|
async addPoi(data: Partial<AddPoiData> = {}): Promise<unknown> {
|
|
204
113
|
|
|
205
114
|
// Si le parent direct n'est pas l'utilisateur connecté (ex: création via une org),
|
package/src/api/Project.ts
CHANGED
|
@@ -17,6 +17,9 @@ export class Project extends BaseEntity<ProjectItemNormalized> {
|
|
|
17
17
|
|
|
18
18
|
static override entityTag = "Project";
|
|
19
19
|
|
|
20
|
+
/** Bloc de création où injecter les champs costum (CostumScope). */
|
|
21
|
+
static override COSTUM_ADD_CONSTANT = "ADD_PROJECT";
|
|
22
|
+
|
|
20
23
|
static override SCHEMA_CONSTANTS: string[] = [
|
|
21
24
|
"ADD_PROJECT",
|
|
22
25
|
"UPDATE_BLOCK_DESCRIPTION",
|
|
@@ -124,6 +127,9 @@ export class Project extends BaseEntity<ProjectItemNormalized> {
|
|
|
124
127
|
throw new ApiError("utilisation invalide de _update, utilisez save", 400);
|
|
125
128
|
}
|
|
126
129
|
|
|
130
|
+
// Entité costum-scopée : tout l'UPDATE part en UN `element/save` (pendant de l'ADD, hooks costum). cf. BaseEntity.
|
|
131
|
+
if (this._costumCtx) return this._saveCostumViaElementSave(payload);
|
|
132
|
+
|
|
127
133
|
if (payload.id) delete payload.id;
|
|
128
134
|
let hasChanged = false;
|
|
129
135
|
|