@communecter/cocolight-api-client 1.0.149 → 1.0.151
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 +3 -2
- package/src/ApiClient.ts +53 -13
- package/src/api/BaseEntity.ts +241 -6
- package/src/api/EndpointApi.ts +17 -1
- package/src/api/EndpointApi.types.ts +218 -430
- 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 +329 -219
- 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 +36 -272
- 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 +1393 -6162
- package/types/forms/entityForm.d.ts +28 -0
- package/types/index.d.ts +4 -0
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
|
|
package/src/api/User.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ApiError } from "../error.js";
|
|
2
2
|
import { BaseEntity } from "./BaseEntity.js";
|
|
3
3
|
import { Notifications } from "./Notifications.js";
|
|
4
|
+
import { resolveCostumScope, type CostumScope } from "../costum/runtime.js";
|
|
4
5
|
import { UserMixin } from "../mixin/UserMixin.js";
|
|
5
6
|
import { createSocialTransform } from "../types/transforms.js";
|
|
6
7
|
|
|
8
|
+
|
|
7
9
|
import type { Badge } from "./Badge.js";
|
|
8
10
|
import type { PaginatorPage, PaginatorState } from "./BaseEntity.js";
|
|
9
11
|
import type {
|
|
@@ -26,6 +28,7 @@ import type {
|
|
|
26
28
|
MarkNotificationAsReadData
|
|
27
29
|
} from "./EndpointApi.types.js";
|
|
28
30
|
import type { Organization } from "./Organization.js";
|
|
31
|
+
import type { KnownCostumSlug } from "../costum/types.js";
|
|
29
32
|
import type { NotificationItemData } from "./serverDataType/Notification.js";
|
|
30
33
|
import type { EntityTypes } from "@/types/entities.js";
|
|
31
34
|
|
|
@@ -711,7 +714,7 @@ export class User extends BaseEntity<UserItemNormalized> {
|
|
|
711
714
|
|
|
712
715
|
/**
|
|
713
716
|
* {@inheritDoc BaseEntity#event}
|
|
714
|
-
*
|
|
717
|
+
*
|
|
715
718
|
* Crée une instance d'événement et la récupère si nécessaire.
|
|
716
719
|
*/
|
|
717
720
|
override async event(eventData: Parameters<BaseEntity<UserItemNormalized>["event"]>[0] = {}) {
|
|
@@ -721,6 +724,21 @@ export class User extends BaseEntity<UserItemNormalized> {
|
|
|
721
724
|
return super.event(eventData);
|
|
722
725
|
}
|
|
723
726
|
|
|
727
|
+
/**
|
|
728
|
+
* Ouvre un *scope costum* : les entités créées via le scope (`poi`/`organization`/`project`/`event`)
|
|
729
|
+
* portent le contexte costum (costumSlug + champs costum validés par le binding du costum à `element/save`).
|
|
730
|
+
*
|
|
731
|
+
* @example
|
|
732
|
+
* const tl = await me.costum("reseauTierslieux");
|
|
733
|
+
* const org = await tl.organization({ name: "Mon TL", manageModel: "Association", buildingSurfaceArea: "120" });
|
|
734
|
+
* await org.save();
|
|
735
|
+
*
|
|
736
|
+
* @param slug - slug d'un costum connu (registry généré). Slug hors registry => erreur (live-fetch = inc2).
|
|
737
|
+
*/
|
|
738
|
+
async costum(slug: KnownCostumSlug): Promise<CostumScope> {
|
|
739
|
+
return resolveCostumScope(this, slug);
|
|
740
|
+
}
|
|
741
|
+
|
|
724
742
|
/**
|
|
725
743
|
* {@inheritDoc BaseEntity#badge}
|
|
726
744
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// AUTO-GÉNÉRÉ par scripts/generate-costum-extensions.js — NE PAS ÉDITER.
|
|
2
|
+
// Source : costum-extensions.json (vendoré). Régénérer : npm run generate:costum
|
|
3
|
+
|
|
4
|
+
// Champs costum à coercer à la LECTURE, par NOM (indépendant de source.key). Booléens = normalisés globalement.
|
|
5
|
+
// EXCLUS (type divergent entre costums, laissés string) : phone:{number,string}, openingDate:{string,date}, rate:{string,number}
|
|
6
|
+
export const COSTUM_NUMBER_FIELDS: readonly string[] = ["ambassadeurTel","buildingSurfaceArea","duration","equip_larg","equip_long","equip_surf","expectedAttendees","maximumAttendees","nbHabitant","referentPhone","siteSurfaceArea","telephoneCie","year"];
|
|
7
|
+
export const COSTUM_DATE_FIELDS: readonly string[] = ["dateCreation","equip_maj_date","inst_date_creation","inst_enqu_date","signedOn"];
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// AUTO-GÉNÉRÉ par scripts/generate-costum-extensions.js — NE PAS ÉDITER.
|
|
2
|
+
// Source : costum-extensions.json (vendoré). Régénérer : npm run generate:costum
|
|
3
|
+
|
|
4
|
+
import type { CostumExtensionModule, KnownCostumSlug, Collection } from "./types.js";
|
|
5
|
+
|
|
6
|
+
export interface CostumMeta {
|
|
7
|
+
costumId: string;
|
|
8
|
+
costumType: Collection;
|
|
9
|
+
host: string | null;
|
|
10
|
+
engine: string | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const COSTUM_META: Record<KnownCostumSlug, CostumMeta> = {
|
|
14
|
+
CercleTravailleursSociauxLiberauxLaPlumeSociale: { costumId: "654b57d6e5ff8d40a74236eb", costumType: "organizations", host: null, engine: "costumize" },
|
|
15
|
+
FabEn: { costumId: "5ff81a71cf7b6a192f8b4568", costumType: "organizations", host: null, engine: "FabEn" },
|
|
16
|
+
LivingLabInnovationSocialeBraspanon: { costumId: "61402f6234bdec718b4f08fd", costumType: "projects", host: null, engine: "filiereGenerique" },
|
|
17
|
+
alfph: { costumId: "5e393f976908646b468b474f", costumType: "organizations", host: null, engine: "alfph" },
|
|
18
|
+
campagne: { costumId: "5c7693db40bb4e885394dbfe", costumType: "projects", host: null, engine: "campagne" },
|
|
19
|
+
chtitube: { costumId: "5d82012240bb4eca7b496a74", costumType: "projects", host: "www.chtitube.fr", engine: "chtitube" },
|
|
20
|
+
circuitCourt: { costumId: "5e05b30d6908649d7f8b4569", costumType: "organizations", host: "www.circuitcourt.re", engine: "circuitCourt" },
|
|
21
|
+
cmcasHauteBretagne: { costumId: "5eaade8f6908649b558b4988", costumType: "organizations", host: "co.cmcashb.fr", engine: "cmcasHauteBretagne" },
|
|
22
|
+
coFinancementTierslieux: { costumId: "60ed7725f8baa73a0b113a22", costumType: "organizations", host: "adopteuncommun.communecter.org", engine: "coFinancement" },
|
|
23
|
+
coeurNumerique: { costumId: "5dce3496690864e5758b45d9", costumType: "organizations", host: null, engine: "coeurNumerique" },
|
|
24
|
+
communLundi: { costumId: "636bae7be225a20c3754ea48", costumType: "events", host: "communlundi.tiers-lieux.org", engine: "coevent" },
|
|
25
|
+
cressReunion: { costumId: "5add6e1240bb4eeb16987218", costumType: "organizations", host: "www.aress-reunion.re", engine: "filiereGenerique" },
|
|
26
|
+
cressReunionNetwork: { costumId: "6151663ad77b6e383124f413", costumType: "organizations", host: "www.aress-reunion.re", engine: "filiereGenerique" },
|
|
27
|
+
ctenat: { costumId: "5ca1b2bb40bb4e9352ba351b", costumType: "organizations", host: "territoires-en-transition.ecologie.gouv.fr", engine: "ctenat" },
|
|
28
|
+
cyberReunion: { costumId: "695b58ca8693fc2c121208e4", costumType: "organizations", host: null, engine: "costumize" },
|
|
29
|
+
ekisphere: { costumId: "651e46541a70083900557c09", costumType: "organizations", host: null, engine: "costumize" },
|
|
30
|
+
equipementsSportifs974: { costumId: "6a04155ed047177b92399685", costumType: "organizations", host: null, engine: "costumize" },
|
|
31
|
+
federationDesCae: { costumId: "677e7e13bd08b2478f5f5314", costumType: "organizations", host: "communs.les-cae.coop", engine: "costumize" },
|
|
32
|
+
formationGenerique: { costumId: "68184de2ad1e8a5cae19e023", costumType: "organizations", host: null, engine: "templateFormation" },
|
|
33
|
+
franceTierslieux: { costumId: "5ec3b895690864db108b46b8", costumType: "organizations", host: "cartographie.francetierslieux.fr", engine: "franceTierslieux" },
|
|
34
|
+
hinaura: { costumId: "5e578751690864b3338b45f9", costumType: "organizations", host: null, engine: "mednumRhoneAlpe" },
|
|
35
|
+
hubmayotte: { costumId: "5e5788bd69086435328b4664", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
36
|
+
hubnouvellecaledonie: { costumId: "5e57894d6908643a328b469f", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
37
|
+
hubpolynesiefrancaise: { costumId: "5e5788fc6908646a478b4590", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
38
|
+
hubreunion: { costumId: "5e57887269086497338b46b8", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
39
|
+
hubterritoires: { costumId: "5e5787c56908643a328b4628", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
40
|
+
hubwallisetfutuna: { costumId: "5e57897169086497338b470b", costumType: "organizations", host: null, engine: "hubTerritoires" },
|
|
41
|
+
hva: { costumId: "5b713de540bb4eb87a808363", costumType: "organizations", host: "www.portailhva.org", engine: "hva" },
|
|
42
|
+
ibv2: { costumId: "69a66a6bff55d4489e6f2c6e", costumType: "organizations", host: null, engine: "costumize" },
|
|
43
|
+
institutBleu: { costumId: "66f2adcfba41c614b86c0af8", costumType: "organizations", host: "annuaire.institutbleu.re", engine: "costumize" },
|
|
44
|
+
journalInsoumisChambery: { costumId: "5c8102ac40bb4e1c6c4601c8", costumType: "organizations", host: "www.journal-insoumis-chambery.com", engine: "journalInsoumisChambery" },
|
|
45
|
+
kpacite: { costumId: "60365ebb690864c1688b4587", costumType: "organizations", host: "observatoire.kpacite.fr", engine: "reseauTierslieux" },
|
|
46
|
+
laCompagnieDesTierslieux: { costumId: "5d36ad9340bb4ea9625e0915", costumType: "organizations", host: "plateforme-cie.tiers-lieux.org", engine: "reseauTierslieux" },
|
|
47
|
+
laMaisonDesFaiseurs: { costumId: "5cc30df140bb4e83202179cd", costumType: "organizations", host: null, engine: "laRaffinerie3" },
|
|
48
|
+
laReunionPourUnNumeriqueInclusif: { costumId: "5f9991e2690864d64f8b4666", costumType: "organizations", host: "reunion.ultranumerique.fr", engine: "hubTerritoires" },
|
|
49
|
+
laSemaineDesTierslieux: { costumId: "634fe57321f16458d240adc3", costumType: "events", host: "lasemaine.tierslieux.re", engine: "costumize" },
|
|
50
|
+
labEnCommuns: { costumId: "607ecf90690864c2578b45bc", costumType: "organizations", host: null, engine: "labEnCommuns" },
|
|
51
|
+
lakou: { costumId: "66605dff37cbe5791b506ebf", costumType: "organizations", host: null, engine: "costumize" },
|
|
52
|
+
lesCommunsDesTierslieux: { costumId: "615724525a88061a684d4916", costumType: "organizations", host: "lescommuns.tiers-lieux.org", engine: "costumize" },
|
|
53
|
+
mayottePourUnNumeriqueInclusif: { costumId: "5f9fb3f1690864041c8b4b1c", costumType: "organizations", host: "mayotte.ultranumerique.fr", engine: "hubTerritoires" },
|
|
54
|
+
meir: { costumId: "614a134c3bf54a64bf3ed23e", costumType: "projects", host: null, engine: "meir" },
|
|
55
|
+
navigatorDesTierslieux: { costumId: "649ed498f93ee7202e6c8b12", costumType: "projects", host: "www.tiers-lieux.org", engine: "costumize" },
|
|
56
|
+
notragora: { costumId: "5b99efbc40bb4eaf50e2067c", costumType: "projects", host: null, engine: "notragora" },
|
|
57
|
+
nouvellecaledoniePourUnNumeriqueInclusif: { costumId: "5f9fbd156908648a6d8b4675", costumType: "organizations", host: "nouvellecaledonie.ultranumerique.fr", engine: "hubTerritoires" },
|
|
58
|
+
openAtlas: { costumId: "555eba56c655675cdd65bf19", costumType: "organizations", host: "www.open-atlas.org", engine: "OpenAtlas" },
|
|
59
|
+
polynesieFrancaisePourUnNumeriqueInclusif: { costumId: "5f9fbc4c6908648a6d8b4607", costumType: "organizations", host: "polynesiefrancaise.ultranumerique.fr", engine: "hubTerritoires" },
|
|
60
|
+
prdr: { costumId: "5e25910c690864233b8b4671", costumType: "organizations", host: null, engine: "filiereGenerique" },
|
|
61
|
+
reseauTierslieux: { costumId: "61960c990365ed3a8402341f", costumType: "organizations", host: null, engine: "reseauTierslieux" },
|
|
62
|
+
rfflabs: { costumId: "61f3eba10870e2287b71c2fe", costumType: "organizations", host: "carto.rfflabs.fr", engine: "reseauTierslieux" },
|
|
63
|
+
ries: { costumId: "60b879df690864d6438b4581", costumType: "projects", host: "www.oest.it", engine: "filiereGenerique" },
|
|
64
|
+
siteDuPactePourLaTransition: { costumId: "5ca8650240bb4e13267b23c7", costumType: "projects", host: "www.pacte-transition.org", engine: "siteDuPactePourLaTransition" },
|
|
65
|
+
sportSanteBienetre: { costumId: "682b2ac5e05a1d45844340e7", costumType: "organizations", host: null, engine: "costumize" },
|
|
66
|
+
suppa: { costumId: "6442b67553f10671d16d3879", costumType: "organizations", host: null, engine: "costumize" },
|
|
67
|
+
terramies: { costumId: "5e33da2a6908644c5f8b4829", costumType: "organizations", host: "www.terramies.fr", engine: "terramies" },
|
|
68
|
+
testeTplFormation: { costumId: "6819e960f7765e69ee49d748", costumType: "organizations", host: null, engine: "templateFormation" },
|
|
69
|
+
tierslieuxbelgique: { costumId: "66fa6c01f8b5267b59215dc9", costumType: "organizations", host: "www.tierslieux.xyz", engine: "costumize" },
|
|
70
|
+
tierslieuxorg1: { costumId: "682f0e563567ec1a4c3194b8", costumType: "organizations", host: null, engine: "templateFormation" },
|
|
71
|
+
transiter: { costumId: "65df30c185682029fd7e42bf", costumType: "organizations", host: "www.transiter.re", engine: "costumize" },
|
|
72
|
+
vhelioPeiTour2025: { costumId: "67adabf89f10500a3c1872d6", costumType: "projects", host: null, engine: "costumize" },
|
|
73
|
+
wallisetfutunaPourUnNumeriqueInclusif: { costumId: "5f9fbaa9690864dc4c8b4933", costumType: "organizations", host: "wallisetfutuna.ultranumerique.fr", engine: "hubTerritoires" },
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// dynamic-import => code-split : seul le costum utilisé est chargé.
|
|
77
|
+
export const COSTUM_SCHEMAS: Record<KnownCostumSlug, () => Promise<{ default: CostumExtensionModule }>> = {
|
|
78
|
+
CercleTravailleursSociauxLiberauxLaPlumeSociale: () => import("./schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.js"),
|
|
79
|
+
FabEn: () => import("./schemas/FabEn.js"),
|
|
80
|
+
LivingLabInnovationSocialeBraspanon: () => import("./schemas/LivingLabInnovationSocialeBraspanon.js"),
|
|
81
|
+
alfph: () => import("./schemas/alfph.js"),
|
|
82
|
+
campagne: () => import("./schemas/campagne.js"),
|
|
83
|
+
chtitube: () => import("./schemas/chtitube.js"),
|
|
84
|
+
circuitCourt: () => import("./schemas/circuitCourt.js"),
|
|
85
|
+
cmcasHauteBretagne: () => import("./schemas/cmcasHauteBretagne.js"),
|
|
86
|
+
coFinancementTierslieux: () => import("./schemas/coFinancementTierslieux.js"),
|
|
87
|
+
coeurNumerique: () => import("./schemas/coeurNumerique.js"),
|
|
88
|
+
communLundi: () => import("./schemas/communLundi.js"),
|
|
89
|
+
cressReunion: () => import("./schemas/cressReunion.js"),
|
|
90
|
+
cressReunionNetwork: () => import("./schemas/cressReunionNetwork.js"),
|
|
91
|
+
ctenat: () => import("./schemas/ctenat.js"),
|
|
92
|
+
cyberReunion: () => import("./schemas/cyberReunion.js"),
|
|
93
|
+
ekisphere: () => import("./schemas/ekisphere.js"),
|
|
94
|
+
equipementsSportifs974: () => import("./schemas/equipementsSportifs974.js"),
|
|
95
|
+
federationDesCae: () => import("./schemas/federationDesCae.js"),
|
|
96
|
+
formationGenerique: () => import("./schemas/formationGenerique.js"),
|
|
97
|
+
franceTierslieux: () => import("./schemas/franceTierslieux.js"),
|
|
98
|
+
hinaura: () => import("./schemas/hinaura.js"),
|
|
99
|
+
hubmayotte: () => import("./schemas/hubmayotte.js"),
|
|
100
|
+
hubnouvellecaledonie: () => import("./schemas/hubnouvellecaledonie.js"),
|
|
101
|
+
hubpolynesiefrancaise: () => import("./schemas/hubpolynesiefrancaise.js"),
|
|
102
|
+
hubreunion: () => import("./schemas/hubreunion.js"),
|
|
103
|
+
hubterritoires: () => import("./schemas/hubterritoires.js"),
|
|
104
|
+
hubwallisetfutuna: () => import("./schemas/hubwallisetfutuna.js"),
|
|
105
|
+
hva: () => import("./schemas/hva.js"),
|
|
106
|
+
ibv2: () => import("./schemas/ibv2.js"),
|
|
107
|
+
institutBleu: () => import("./schemas/institutBleu.js"),
|
|
108
|
+
journalInsoumisChambery: () => import("./schemas/journalInsoumisChambery.js"),
|
|
109
|
+
kpacite: () => import("./schemas/kpacite.js"),
|
|
110
|
+
laCompagnieDesTierslieux: () => import("./schemas/laCompagnieDesTierslieux.js"),
|
|
111
|
+
laMaisonDesFaiseurs: () => import("./schemas/laMaisonDesFaiseurs.js"),
|
|
112
|
+
laReunionPourUnNumeriqueInclusif: () => import("./schemas/laReunionPourUnNumeriqueInclusif.js"),
|
|
113
|
+
laSemaineDesTierslieux: () => import("./schemas/laSemaineDesTierslieux.js"),
|
|
114
|
+
labEnCommuns: () => import("./schemas/labEnCommuns.js"),
|
|
115
|
+
lakou: () => import("./schemas/lakou.js"),
|
|
116
|
+
lesCommunsDesTierslieux: () => import("./schemas/lesCommunsDesTierslieux.js"),
|
|
117
|
+
mayottePourUnNumeriqueInclusif: () => import("./schemas/mayottePourUnNumeriqueInclusif.js"),
|
|
118
|
+
meir: () => import("./schemas/meir.js"),
|
|
119
|
+
navigatorDesTierslieux: () => import("./schemas/navigatorDesTierslieux.js"),
|
|
120
|
+
notragora: () => import("./schemas/notragora.js"),
|
|
121
|
+
nouvellecaledoniePourUnNumeriqueInclusif: () => import("./schemas/nouvellecaledoniePourUnNumeriqueInclusif.js"),
|
|
122
|
+
openAtlas: () => import("./schemas/openAtlas.js"),
|
|
123
|
+
polynesieFrancaisePourUnNumeriqueInclusif: () => import("./schemas/polynesieFrancaisePourUnNumeriqueInclusif.js"),
|
|
124
|
+
prdr: () => import("./schemas/prdr.js"),
|
|
125
|
+
reseauTierslieux: () => import("./schemas/reseauTierslieux.js"),
|
|
126
|
+
rfflabs: () => import("./schemas/rfflabs.js"),
|
|
127
|
+
ries: () => import("./schemas/ries.js"),
|
|
128
|
+
siteDuPactePourLaTransition: () => import("./schemas/siteDuPactePourLaTransition.js"),
|
|
129
|
+
sportSanteBienetre: () => import("./schemas/sportSanteBienetre.js"),
|
|
130
|
+
suppa: () => import("./schemas/suppa.js"),
|
|
131
|
+
terramies: () => import("./schemas/terramies.js"),
|
|
132
|
+
testeTplFormation: () => import("./schemas/testeTplFormation.js"),
|
|
133
|
+
tierslieuxbelgique: () => import("./schemas/tierslieuxbelgique.js"),
|
|
134
|
+
tierslieuxorg1: () => import("./schemas/tierslieuxorg1.js"),
|
|
135
|
+
transiter: () => import("./schemas/transiter.js"),
|
|
136
|
+
vhelioPeiTour2025: () => import("./schemas/vhelioPeiTour2025.js"),
|
|
137
|
+
wallisetfutunaPourUnNumeriqueInclusif: () => import("./schemas/wallisetfutunaPourUnNumeriqueInclusif.js"),
|
|
138
|
+
};
|