@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.
Files changed (354) hide show
  1. package/dist/1035.cocolight-api-client.browser.js +1 -0
  2. package/dist/1035.cocolight-api-client.cjs +1 -0
  3. package/dist/1035.cocolight-api-client.mjs.js +1 -0
  4. package/dist/1483.cocolight-api-client.browser.js +1 -0
  5. package/dist/1483.cocolight-api-client.cjs +1 -0
  6. package/dist/1483.cocolight-api-client.mjs.js +1 -0
  7. package/dist/1491.cocolight-api-client.browser.js +1 -0
  8. package/dist/1491.cocolight-api-client.cjs +1 -0
  9. package/dist/1491.cocolight-api-client.mjs.js +1 -0
  10. package/dist/1494.cocolight-api-client.browser.js +1 -0
  11. package/dist/1494.cocolight-api-client.cjs +1 -0
  12. package/dist/1494.cocolight-api-client.mjs.js +1 -0
  13. package/dist/1641.cocolight-api-client.browser.js +1 -0
  14. package/dist/1641.cocolight-api-client.cjs +1 -0
  15. package/dist/1641.cocolight-api-client.mjs.js +1 -0
  16. package/dist/1678.cocolight-api-client.browser.js +1 -0
  17. package/dist/1678.cocolight-api-client.cjs +1 -0
  18. package/dist/1678.cocolight-api-client.mjs.js +1 -0
  19. package/dist/2041.cocolight-api-client.browser.js +1 -0
  20. package/dist/2041.cocolight-api-client.cjs +1 -0
  21. package/dist/2041.cocolight-api-client.mjs.js +1 -0
  22. package/dist/2302.cocolight-api-client.browser.js +1 -0
  23. package/dist/2302.cocolight-api-client.cjs +1 -0
  24. package/dist/2302.cocolight-api-client.mjs.js +1 -0
  25. package/dist/2313.cocolight-api-client.browser.js +1 -0
  26. package/dist/2313.cocolight-api-client.cjs +1 -0
  27. package/dist/2313.cocolight-api-client.mjs.js +1 -0
  28. package/dist/2379.cocolight-api-client.browser.js +1 -0
  29. package/dist/2379.cocolight-api-client.cjs +1 -0
  30. package/dist/2379.cocolight-api-client.mjs.js +1 -0
  31. package/dist/2439.cocolight-api-client.browser.js +1 -0
  32. package/dist/2439.cocolight-api-client.cjs +1 -0
  33. package/dist/2439.cocolight-api-client.mjs.js +1 -0
  34. package/dist/2594.cocolight-api-client.browser.js +1 -0
  35. package/dist/2594.cocolight-api-client.cjs +1 -0
  36. package/dist/2594.cocolight-api-client.mjs.js +1 -0
  37. package/dist/2766.cocolight-api-client.browser.js +1 -0
  38. package/dist/2766.cocolight-api-client.cjs +1 -0
  39. package/dist/2766.cocolight-api-client.mjs.js +1 -0
  40. package/dist/2812.cocolight-api-client.browser.js +1 -0
  41. package/dist/2812.cocolight-api-client.cjs +1 -0
  42. package/dist/2812.cocolight-api-client.mjs.js +1 -0
  43. package/dist/2918.cocolight-api-client.browser.js +1 -0
  44. package/dist/2918.cocolight-api-client.cjs +1 -0
  45. package/dist/2918.cocolight-api-client.mjs.js +1 -0
  46. package/dist/3028.cocolight-api-client.browser.js +1 -0
  47. package/dist/3028.cocolight-api-client.cjs +1 -0
  48. package/dist/3028.cocolight-api-client.mjs.js +1 -0
  49. package/dist/3330.cocolight-api-client.browser.js +1 -0
  50. package/dist/3330.cocolight-api-client.cjs +1 -0
  51. package/dist/3330.cocolight-api-client.mjs.js +1 -0
  52. package/dist/3371.cocolight-api-client.browser.js +1 -0
  53. package/dist/3371.cocolight-api-client.cjs +1 -0
  54. package/dist/3371.cocolight-api-client.mjs.js +1 -0
  55. package/dist/3401.cocolight-api-client.browser.js +1 -0
  56. package/dist/3401.cocolight-api-client.cjs +1 -0
  57. package/dist/3401.cocolight-api-client.mjs.js +1 -0
  58. package/dist/3516.cocolight-api-client.browser.js +1 -0
  59. package/dist/3516.cocolight-api-client.cjs +1 -0
  60. package/dist/3516.cocolight-api-client.mjs.js +1 -0
  61. package/dist/3593.cocolight-api-client.browser.js +1 -0
  62. package/dist/3593.cocolight-api-client.cjs +1 -0
  63. package/dist/3593.cocolight-api-client.mjs.js +1 -0
  64. package/dist/3764.cocolight-api-client.browser.js +1 -0
  65. package/dist/3764.cocolight-api-client.cjs +1 -0
  66. package/dist/3764.cocolight-api-client.mjs.js +1 -0
  67. package/dist/3873.cocolight-api-client.browser.js +1 -0
  68. package/dist/3873.cocolight-api-client.cjs +1 -0
  69. package/dist/3873.cocolight-api-client.mjs.js +1 -0
  70. package/dist/3911.cocolight-api-client.browser.js +1 -0
  71. package/dist/3911.cocolight-api-client.cjs +1 -0
  72. package/dist/3911.cocolight-api-client.mjs.js +1 -0
  73. package/dist/4031.cocolight-api-client.browser.js +1 -0
  74. package/dist/4031.cocolight-api-client.cjs +1 -0
  75. package/dist/4031.cocolight-api-client.mjs.js +1 -0
  76. package/dist/4152.cocolight-api-client.browser.js +1 -0
  77. package/dist/4152.cocolight-api-client.cjs +1 -0
  78. package/dist/4152.cocolight-api-client.mjs.js +1 -0
  79. package/dist/4203.cocolight-api-client.browser.js +1 -0
  80. package/dist/4203.cocolight-api-client.cjs +1 -0
  81. package/dist/4203.cocolight-api-client.mjs.js +1 -0
  82. package/dist/424.cocolight-api-client.browser.js +1 -0
  83. package/dist/424.cocolight-api-client.cjs +1 -0
  84. package/dist/424.cocolight-api-client.mjs.js +1 -0
  85. package/dist/435.cocolight-api-client.browser.js +1 -0
  86. package/dist/435.cocolight-api-client.cjs +1 -0
  87. package/dist/435.cocolight-api-client.mjs.js +1 -0
  88. package/dist/4402.cocolight-api-client.browser.js +1 -0
  89. package/dist/4402.cocolight-api-client.cjs +1 -0
  90. package/dist/4402.cocolight-api-client.mjs.js +1 -0
  91. package/dist/4425.cocolight-api-client.browser.js +1 -0
  92. package/dist/4425.cocolight-api-client.cjs +1 -0
  93. package/dist/4425.cocolight-api-client.mjs.js +1 -0
  94. package/dist/4472.cocolight-api-client.browser.js +1 -0
  95. package/dist/4472.cocolight-api-client.cjs +1 -0
  96. package/dist/4472.cocolight-api-client.mjs.js +1 -0
  97. package/dist/4914.cocolight-api-client.browser.js +1 -0
  98. package/dist/4914.cocolight-api-client.cjs +1 -0
  99. package/dist/4914.cocolight-api-client.mjs.js +1 -0
  100. package/dist/4959.cocolight-api-client.browser.js +1 -0
  101. package/dist/4959.cocolight-api-client.cjs +1 -0
  102. package/dist/4959.cocolight-api-client.mjs.js +1 -0
  103. package/dist/5100.cocolight-api-client.browser.js +1 -0
  104. package/dist/5100.cocolight-api-client.cjs +1 -0
  105. package/dist/5100.cocolight-api-client.mjs.js +1 -0
  106. package/dist/5111.cocolight-api-client.browser.js +1 -0
  107. package/dist/5111.cocolight-api-client.cjs +1 -0
  108. package/dist/5111.cocolight-api-client.mjs.js +1 -0
  109. package/dist/5286.cocolight-api-client.browser.js +1 -0
  110. package/dist/5286.cocolight-api-client.cjs +1 -0
  111. package/dist/5286.cocolight-api-client.mjs.js +1 -0
  112. package/dist/5380.cocolight-api-client.browser.js +1 -0
  113. package/dist/5380.cocolight-api-client.cjs +1 -0
  114. package/dist/5380.cocolight-api-client.mjs.js +1 -0
  115. package/dist/5383.cocolight-api-client.browser.js +1 -0
  116. package/dist/5383.cocolight-api-client.cjs +1 -0
  117. package/dist/5383.cocolight-api-client.mjs.js +1 -0
  118. package/dist/5480.cocolight-api-client.browser.js +1 -0
  119. package/dist/5480.cocolight-api-client.cjs +1 -0
  120. package/dist/5480.cocolight-api-client.mjs.js +1 -0
  121. package/dist/5541.cocolight-api-client.browser.js +1 -0
  122. package/dist/5541.cocolight-api-client.cjs +1 -0
  123. package/dist/5541.cocolight-api-client.mjs.js +1 -0
  124. package/dist/5839.cocolight-api-client.browser.js +1 -0
  125. package/dist/5839.cocolight-api-client.cjs +1 -0
  126. package/dist/5839.cocolight-api-client.mjs.js +1 -0
  127. package/dist/5862.cocolight-api-client.browser.js +1 -0
  128. package/dist/5862.cocolight-api-client.cjs +1 -0
  129. package/dist/5862.cocolight-api-client.mjs.js +1 -0
  130. package/dist/5869.cocolight-api-client.browser.js +1 -0
  131. package/dist/5869.cocolight-api-client.cjs +1 -0
  132. package/dist/5869.cocolight-api-client.mjs.js +1 -0
  133. package/dist/588.cocolight-api-client.cjs +1 -1
  134. package/dist/588.cocolight-api-client.mjs.js +1 -1
  135. package/dist/601.cocolight-api-client.browser.js +1 -0
  136. package/dist/601.cocolight-api-client.cjs +1 -0
  137. package/dist/601.cocolight-api-client.mjs.js +1 -0
  138. package/dist/6012.cocolight-api-client.browser.js +1 -0
  139. package/dist/6012.cocolight-api-client.cjs +1 -0
  140. package/dist/6012.cocolight-api-client.mjs.js +1 -0
  141. package/dist/6200.cocolight-api-client.browser.js +1 -0
  142. package/dist/6200.cocolight-api-client.cjs +1 -0
  143. package/dist/6200.cocolight-api-client.mjs.js +1 -0
  144. package/dist/6369.cocolight-api-client.browser.js +1 -0
  145. package/dist/6369.cocolight-api-client.cjs +1 -0
  146. package/dist/6369.cocolight-api-client.mjs.js +1 -0
  147. package/dist/7009.cocolight-api-client.browser.js +1 -0
  148. package/dist/7009.cocolight-api-client.cjs +1 -0
  149. package/dist/7009.cocolight-api-client.mjs.js +1 -0
  150. package/dist/725.cocolight-api-client.browser.js +1 -0
  151. package/dist/725.cocolight-api-client.cjs +1 -0
  152. package/dist/725.cocolight-api-client.mjs.js +1 -0
  153. package/dist/7320.cocolight-api-client.browser.js +1 -0
  154. package/dist/7339.cocolight-api-client.browser.js +1 -0
  155. package/dist/7339.cocolight-api-client.cjs +1 -0
  156. package/dist/7339.cocolight-api-client.mjs.js +1 -0
  157. package/dist/7398.cocolight-api-client.browser.js +1 -0
  158. package/dist/7398.cocolight-api-client.cjs +1 -0
  159. package/dist/7398.cocolight-api-client.mjs.js +1 -0
  160. package/dist/7888.cocolight-api-client.browser.js +1 -0
  161. package/dist/7888.cocolight-api-client.cjs +1 -0
  162. package/dist/7888.cocolight-api-client.mjs.js +1 -0
  163. package/dist/7975.cocolight-api-client.browser.js +1 -0
  164. package/dist/7975.cocolight-api-client.cjs +1 -0
  165. package/dist/7975.cocolight-api-client.mjs.js +1 -0
  166. package/dist/809.cocolight-api-client.browser.js +1 -0
  167. package/dist/809.cocolight-api-client.cjs +1 -0
  168. package/dist/809.cocolight-api-client.mjs.js +1 -0
  169. package/dist/8300.cocolight-api-client.browser.js +1 -0
  170. package/dist/8300.cocolight-api-client.cjs +1 -0
  171. package/dist/8300.cocolight-api-client.mjs.js +1 -0
  172. package/dist/8317.cocolight-api-client.browser.js +1 -0
  173. package/dist/8317.cocolight-api-client.cjs +1 -0
  174. package/dist/8317.cocolight-api-client.mjs.js +1 -0
  175. package/dist/8525.cocolight-api-client.browser.js +1 -0
  176. package/dist/8525.cocolight-api-client.cjs +1 -0
  177. package/dist/8525.cocolight-api-client.mjs.js +1 -0
  178. package/dist/8894.cocolight-api-client.browser.js +1 -0
  179. package/dist/8894.cocolight-api-client.cjs +1 -0
  180. package/dist/8894.cocolight-api-client.mjs.js +1 -0
  181. package/dist/9301.cocolight-api-client.browser.js +1 -0
  182. package/dist/9301.cocolight-api-client.cjs +1 -0
  183. package/dist/9301.cocolight-api-client.mjs.js +1 -0
  184. package/dist/9438.cocolight-api-client.browser.js +1 -0
  185. package/dist/9438.cocolight-api-client.cjs +1 -0
  186. package/dist/9438.cocolight-api-client.mjs.js +1 -0
  187. package/dist/9478.cocolight-api-client.browser.js +1 -0
  188. package/dist/9478.cocolight-api-client.cjs +1 -0
  189. package/dist/9478.cocolight-api-client.mjs.js +1 -0
  190. package/dist/9568.cocolight-api-client.browser.js +1 -0
  191. package/dist/9568.cocolight-api-client.cjs +1 -0
  192. package/dist/9568.cocolight-api-client.mjs.js +1 -0
  193. package/dist/cocolight-api-client.browser.js +3 -3
  194. package/dist/cocolight-api-client.cjs +1 -1
  195. package/dist/cocolight-api-client.mjs.js +1 -1
  196. package/dist/cocolight-api-client.vite.mjs.js +1 -1
  197. package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
  198. package/package.json +1 -1
  199. package/src/ApiClient.ts +53 -13
  200. package/src/api/BaseEntity.ts +237 -6
  201. package/src/api/EndpointApi.ts +17 -1
  202. package/src/api/EndpointApi.types.ts +29 -230
  203. package/src/api/Event.ts +6 -0
  204. package/src/api/Organization.ts +21 -85
  205. package/src/api/Poi.ts +10 -101
  206. package/src/api/Project.ts +6 -0
  207. package/src/api/User.ts +19 -1
  208. package/src/costum/normalize.ts +7 -0
  209. package/src/costum/registry.ts +138 -0
  210. package/src/costum/runtime-map.ts +221 -0
  211. package/src/costum/runtime.ts +221 -0
  212. package/src/costum/schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.ts +19 -0
  213. package/src/costum/schemas/FabEn.ts +19 -0
  214. package/src/costum/schemas/LivingLabInnovationSocialeBraspanon.ts +19 -0
  215. package/src/costum/schemas/alfph.ts +27 -0
  216. package/src/costum/schemas/campagne.ts +19 -0
  217. package/src/costum/schemas/chtitube.ts +19 -0
  218. package/src/costum/schemas/circuitCourt.ts +19 -0
  219. package/src/costum/schemas/cmcasHauteBretagne.ts +19 -0
  220. package/src/costum/schemas/coFinancementTierslieux.ts +27 -0
  221. package/src/costum/schemas/coeurNumerique.ts +19 -0
  222. package/src/costum/schemas/communLundi.ts +19 -0
  223. package/src/costum/schemas/cressReunion.ts +35 -0
  224. package/src/costum/schemas/cressReunionNetwork.ts +35 -0
  225. package/src/costum/schemas/ctenat.ts +43 -0
  226. package/src/costum/schemas/cyberReunion.ts +19 -0
  227. package/src/costum/schemas/ekisphere.ts +35 -0
  228. package/src/costum/schemas/equipementsSportifs974.ts +19 -0
  229. package/src/costum/schemas/federationDesCae.ts +19 -0
  230. package/src/costum/schemas/formationGenerique.ts +35 -0
  231. package/src/costum/schemas/franceTierslieux.ts +19 -0
  232. package/src/costum/schemas/hinaura.ts +27 -0
  233. package/src/costum/schemas/hubmayotte.ts +19 -0
  234. package/src/costum/schemas/hubnouvellecaledonie.ts +19 -0
  235. package/src/costum/schemas/hubpolynesiefrancaise.ts +19 -0
  236. package/src/costum/schemas/hubreunion.ts +19 -0
  237. package/src/costum/schemas/hubterritoires.ts +19 -0
  238. package/src/costum/schemas/hubwallisetfutuna.ts +19 -0
  239. package/src/costum/schemas/hva.ts +27 -0
  240. package/src/costum/schemas/ibv2.ts +19 -0
  241. package/src/costum/schemas/institutBleu.ts +19 -0
  242. package/src/costum/schemas/journalInsoumisChambery.ts +27 -0
  243. package/src/costum/schemas/kpacite.ts +19 -0
  244. package/src/costum/schemas/laCompagnieDesTierslieux.ts +43 -0
  245. package/src/costum/schemas/laMaisonDesFaiseurs.ts +19 -0
  246. package/src/costum/schemas/laReunionPourUnNumeriqueInclusif.ts +19 -0
  247. package/src/costum/schemas/laSemaineDesTierslieux.ts +19 -0
  248. package/src/costum/schemas/labEnCommuns.ts +19 -0
  249. package/src/costum/schemas/lakou.ts +27 -0
  250. package/src/costum/schemas/lesCommunsDesTierslieux.ts +19 -0
  251. package/src/costum/schemas/mayottePourUnNumeriqueInclusif.ts +19 -0
  252. package/src/costum/schemas/meir.ts +27 -0
  253. package/src/costum/schemas/navigatorDesTierslieux.ts +19 -0
  254. package/src/costum/schemas/notragora.ts +27 -0
  255. package/src/costum/schemas/nouvellecaledoniePourUnNumeriqueInclusif.ts +19 -0
  256. package/src/costum/schemas/openAtlas.ts +19 -0
  257. package/src/costum/schemas/polynesieFrancaisePourUnNumeriqueInclusif.ts +19 -0
  258. package/src/costum/schemas/prdr.ts +19 -0
  259. package/src/costum/schemas/reseauTierslieux.ts +19 -0
  260. package/src/costum/schemas/rfflabs.ts +19 -0
  261. package/src/costum/schemas/ries.ts +19 -0
  262. package/src/costum/schemas/siteDuPactePourLaTransition.ts +27 -0
  263. package/src/costum/schemas/sportSanteBienetre.ts +43 -0
  264. package/src/costum/schemas/suppa.ts +19 -0
  265. package/src/costum/schemas/terramies.ts +19 -0
  266. package/src/costum/schemas/testeTplFormation.ts +35 -0
  267. package/src/costum/schemas/tierslieuxbelgique.ts +19 -0
  268. package/src/costum/schemas/tierslieuxorg1.ts +35 -0
  269. package/src/costum/schemas/transiter.ts +35 -0
  270. package/src/costum/schemas/vhelioPeiTour2025.ts +19 -0
  271. package/src/costum/schemas/wallisetfutunaPourUnNumeriqueInclusif.ts +19 -0
  272. package/src/costum/symbol.ts +26 -0
  273. package/src/costum/types.ts +895 -0
  274. package/src/endpoints.module.ts +13 -13
  275. package/src/forms/entityForm.ts +142 -0
  276. package/src/index.ts +14 -0
  277. package/types/ApiClient.d.ts +1 -0
  278. package/types/api/BaseEntity.d.ts +69 -2
  279. package/types/api/EndpointApi.d.ts +11 -1
  280. package/types/api/EndpointApi.types.d.ts +27 -230
  281. package/types/api/Event.d.ts +2 -0
  282. package/types/api/Organization.d.ts +15 -71
  283. package/types/api/Poi.d.ts +2 -36
  284. package/types/api/Project.d.ts +2 -0
  285. package/types/api/User.d.ts +14 -0
  286. package/types/costum/normalize.d.ts +2 -0
  287. package/types/costum/registry.d.ts +11 -0
  288. package/types/costum/runtime-map.d.ts +3 -0
  289. package/types/costum/runtime.d.ts +99 -0
  290. package/types/costum/schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.d.ts +3 -0
  291. package/types/costum/schemas/FabEn.d.ts +3 -0
  292. package/types/costum/schemas/LivingLabInnovationSocialeBraspanon.d.ts +3 -0
  293. package/types/costum/schemas/alfph.d.ts +3 -0
  294. package/types/costum/schemas/campagne.d.ts +3 -0
  295. package/types/costum/schemas/chtitube.d.ts +3 -0
  296. package/types/costum/schemas/circuitCourt.d.ts +3 -0
  297. package/types/costum/schemas/cmcasHauteBretagne.d.ts +3 -0
  298. package/types/costum/schemas/coFinancementTierslieux.d.ts +3 -0
  299. package/types/costum/schemas/coeurNumerique.d.ts +3 -0
  300. package/types/costum/schemas/communLundi.d.ts +3 -0
  301. package/types/costum/schemas/cressReunion.d.ts +3 -0
  302. package/types/costum/schemas/cressReunionNetwork.d.ts +3 -0
  303. package/types/costum/schemas/ctenat.d.ts +3 -0
  304. package/types/costum/schemas/cyberReunion.d.ts +3 -0
  305. package/types/costum/schemas/ekisphere.d.ts +3 -0
  306. package/types/costum/schemas/equipementsSportifs974.d.ts +3 -0
  307. package/types/costum/schemas/federationDesCae.d.ts +3 -0
  308. package/types/costum/schemas/formationGenerique.d.ts +3 -0
  309. package/types/costum/schemas/franceTierslieux.d.ts +3 -0
  310. package/types/costum/schemas/hinaura.d.ts +3 -0
  311. package/types/costum/schemas/hubmayotte.d.ts +3 -0
  312. package/types/costum/schemas/hubnouvellecaledonie.d.ts +3 -0
  313. package/types/costum/schemas/hubpolynesiefrancaise.d.ts +3 -0
  314. package/types/costum/schemas/hubreunion.d.ts +3 -0
  315. package/types/costum/schemas/hubterritoires.d.ts +3 -0
  316. package/types/costum/schemas/hubwallisetfutuna.d.ts +3 -0
  317. package/types/costum/schemas/hva.d.ts +3 -0
  318. package/types/costum/schemas/ibv2.d.ts +3 -0
  319. package/types/costum/schemas/institutBleu.d.ts +3 -0
  320. package/types/costum/schemas/journalInsoumisChambery.d.ts +3 -0
  321. package/types/costum/schemas/kpacite.d.ts +3 -0
  322. package/types/costum/schemas/laCompagnieDesTierslieux.d.ts +3 -0
  323. package/types/costum/schemas/laMaisonDesFaiseurs.d.ts +3 -0
  324. package/types/costum/schemas/laReunionPourUnNumeriqueInclusif.d.ts +3 -0
  325. package/types/costum/schemas/laSemaineDesTierslieux.d.ts +3 -0
  326. package/types/costum/schemas/labEnCommuns.d.ts +3 -0
  327. package/types/costum/schemas/lakou.d.ts +3 -0
  328. package/types/costum/schemas/lesCommunsDesTierslieux.d.ts +3 -0
  329. package/types/costum/schemas/mayottePourUnNumeriqueInclusif.d.ts +3 -0
  330. package/types/costum/schemas/meir.d.ts +3 -0
  331. package/types/costum/schemas/navigatorDesTierslieux.d.ts +3 -0
  332. package/types/costum/schemas/notragora.d.ts +3 -0
  333. package/types/costum/schemas/nouvellecaledoniePourUnNumeriqueInclusif.d.ts +3 -0
  334. package/types/costum/schemas/openAtlas.d.ts +3 -0
  335. package/types/costum/schemas/polynesieFrancaisePourUnNumeriqueInclusif.d.ts +3 -0
  336. package/types/costum/schemas/prdr.d.ts +3 -0
  337. package/types/costum/schemas/reseauTierslieux.d.ts +3 -0
  338. package/types/costum/schemas/rfflabs.d.ts +3 -0
  339. package/types/costum/schemas/ries.d.ts +3 -0
  340. package/types/costum/schemas/siteDuPactePourLaTransition.d.ts +3 -0
  341. package/types/costum/schemas/sportSanteBienetre.d.ts +3 -0
  342. package/types/costum/schemas/suppa.d.ts +3 -0
  343. package/types/costum/schemas/terramies.d.ts +3 -0
  344. package/types/costum/schemas/testeTplFormation.d.ts +3 -0
  345. package/types/costum/schemas/tierslieuxbelgique.d.ts +3 -0
  346. package/types/costum/schemas/tierslieuxorg1.d.ts +3 -0
  347. package/types/costum/schemas/transiter.d.ts +3 -0
  348. package/types/costum/schemas/vhelioPeiTour2025.d.ts +3 -0
  349. package/types/costum/schemas/wallisetfutunaPourUnNumeriqueInclusif.d.ts +3 -0
  350. package/types/costum/symbol.d.ts +25 -0
  351. package/types/costum/types.d.ts +822 -0
  352. package/types/endpoints.module.d.ts +639 -5409
  353. package/types/forms/entityForm.d.ts +28 -0
  354. 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
- * Slug du costum d'origine
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
- costumSlug?: string;
3074
- /**
3075
- * ID Mongo du costum d'origine
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(
@@ -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
- "VIRTUAL_ORG_TIERS_LIEU_FIELDS"
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 custom tiers-lieu enregistrent les champs éditables côté draft proxy
88
- * via _composeAllowedFields. Aucun endpoint UPDATE_BLOCK_* ne couvre ces champs
89
- * côté backend ; chaque champ est dispatché via UPDATE_PATH_VALUE (cf. updateField()).
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
- VIRTUAL_ORG_TIERS_LIEU_FIELDS: {
95
+ VIRTUAL_ORG_BASE_FIELDS: {
95
96
  type: "object",
96
97
  properties: {
97
- holderOrganization: { type: "string" },
98
- manageModel: { type: "string" },
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
- ["holderOrganization", { updateMethod: "updateHolderOrganization", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
115
- ["manageModel", { updateMethod: "updateManageModel", schemaConstant: "VIRTUAL_ORG_TIERS_LIEU_FIELDS" }],
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 custom tiers-lieu (navigatorDesTierslieux, etc.)
643
- *
644
- * Tous les champs ci-dessous sont dispatched via UPDATE_PATH_VALUE car aucun
645
- * endpoint UPDATE_BLOCK_* côté backend ne les couvre. Sans ces méthodes, le
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 `holderOrganization` (nom de la structure porteuse). */
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
- * Source unique des champs « équipement sportif » (RES) éditables sur le POI :
11
- * - `schema` : type JSON alimente le VIRTUAL_SCHEMA (draft-allow + cohérence des types)
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),
@@ -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