@communecter/cocolight-api-client 1.0.154 → 1.0.156

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 (331) hide show
  1. package/dist/1035.cocolight-api-client.browser.js +1 -1
  2. package/dist/1035.cocolight-api-client.cjs +1 -1
  3. package/dist/1483.cocolight-api-client.browser.js +1 -1
  4. package/dist/1483.cocolight-api-client.cjs +1 -1
  5. package/dist/1491.cocolight-api-client.browser.js +1 -1
  6. package/dist/1491.cocolight-api-client.cjs +1 -1
  7. package/dist/1494.cocolight-api-client.browser.js +1 -1
  8. package/dist/1494.cocolight-api-client.cjs +1 -1
  9. package/dist/1641.cocolight-api-client.browser.js +1 -1
  10. package/dist/1641.cocolight-api-client.cjs +1 -1
  11. package/dist/1678.cocolight-api-client.browser.js +1 -1
  12. package/dist/1678.cocolight-api-client.cjs +1 -1
  13. package/dist/2041.cocolight-api-client.browser.js +1 -1
  14. package/dist/2041.cocolight-api-client.cjs +1 -1
  15. package/dist/2302.cocolight-api-client.browser.js +1 -1
  16. package/dist/2302.cocolight-api-client.cjs +1 -1
  17. package/dist/2313.cocolight-api-client.browser.js +1 -1
  18. package/dist/2313.cocolight-api-client.cjs +1 -1
  19. package/dist/2379.cocolight-api-client.browser.js +1 -1
  20. package/dist/2379.cocolight-api-client.cjs +1 -1
  21. package/dist/2439.cocolight-api-client.browser.js +1 -1
  22. package/dist/2439.cocolight-api-client.cjs +1 -1
  23. package/dist/2594.cocolight-api-client.browser.js +1 -1
  24. package/dist/2594.cocolight-api-client.cjs +1 -1
  25. package/dist/2766.cocolight-api-client.browser.js +1 -1
  26. package/dist/2766.cocolight-api-client.cjs +1 -1
  27. package/dist/2812.cocolight-api-client.browser.js +1 -1
  28. package/dist/2812.cocolight-api-client.cjs +1 -1
  29. package/dist/2918.cocolight-api-client.browser.js +1 -1
  30. package/dist/2918.cocolight-api-client.cjs +1 -1
  31. package/dist/3028.cocolight-api-client.browser.js +1 -1
  32. package/dist/3028.cocolight-api-client.cjs +1 -1
  33. package/dist/3330.cocolight-api-client.browser.js +1 -1
  34. package/dist/3330.cocolight-api-client.cjs +1 -1
  35. package/dist/3371.cocolight-api-client.browser.js +1 -1
  36. package/dist/3371.cocolight-api-client.cjs +1 -1
  37. package/dist/3401.cocolight-api-client.browser.js +1 -1
  38. package/dist/3401.cocolight-api-client.cjs +1 -1
  39. package/dist/3516.cocolight-api-client.browser.js +1 -1
  40. package/dist/3516.cocolight-api-client.cjs +1 -1
  41. package/dist/3593.cocolight-api-client.browser.js +1 -1
  42. package/dist/3593.cocolight-api-client.cjs +1 -1
  43. package/dist/3764.cocolight-api-client.browser.js +1 -1
  44. package/dist/3764.cocolight-api-client.cjs +1 -1
  45. package/dist/3873.cocolight-api-client.browser.js +1 -1
  46. package/dist/3873.cocolight-api-client.cjs +1 -1
  47. package/dist/3911.cocolight-api-client.browser.js +1 -1
  48. package/dist/3911.cocolight-api-client.cjs +1 -1
  49. package/dist/4031.cocolight-api-client.browser.js +1 -1
  50. package/dist/4031.cocolight-api-client.cjs +1 -1
  51. package/dist/4152.cocolight-api-client.browser.js +1 -1
  52. package/dist/4152.cocolight-api-client.cjs +1 -1
  53. package/dist/4203.cocolight-api-client.browser.js +1 -1
  54. package/dist/4203.cocolight-api-client.cjs +1 -1
  55. package/dist/424.cocolight-api-client.browser.js +1 -1
  56. package/dist/424.cocolight-api-client.cjs +1 -1
  57. package/dist/435.cocolight-api-client.browser.js +1 -1
  58. package/dist/435.cocolight-api-client.cjs +1 -1
  59. package/dist/4402.cocolight-api-client.browser.js +1 -1
  60. package/dist/4402.cocolight-api-client.cjs +1 -1
  61. package/dist/4425.cocolight-api-client.browser.js +1 -1
  62. package/dist/4425.cocolight-api-client.cjs +1 -1
  63. package/dist/4472.cocolight-api-client.browser.js +1 -1
  64. package/dist/4472.cocolight-api-client.cjs +1 -1
  65. package/dist/4914.cocolight-api-client.browser.js +1 -1
  66. package/dist/4914.cocolight-api-client.cjs +1 -1
  67. package/dist/4959.cocolight-api-client.browser.js +1 -1
  68. package/dist/4959.cocolight-api-client.cjs +1 -1
  69. package/dist/5100.cocolight-api-client.browser.js +1 -1
  70. package/dist/5100.cocolight-api-client.cjs +1 -1
  71. package/dist/5111.cocolight-api-client.browser.js +1 -1
  72. package/dist/5111.cocolight-api-client.cjs +1 -1
  73. package/dist/5286.cocolight-api-client.browser.js +1 -1
  74. package/dist/5286.cocolight-api-client.cjs +1 -1
  75. package/dist/5380.cocolight-api-client.browser.js +1 -1
  76. package/dist/5380.cocolight-api-client.cjs +1 -1
  77. package/dist/5383.cocolight-api-client.browser.js +1 -1
  78. package/dist/5383.cocolight-api-client.cjs +1 -1
  79. package/dist/5480.cocolight-api-client.browser.js +1 -1
  80. package/dist/5480.cocolight-api-client.cjs +1 -1
  81. package/dist/5541.cocolight-api-client.browser.js +1 -1
  82. package/dist/5541.cocolight-api-client.cjs +1 -1
  83. package/dist/5839.cocolight-api-client.browser.js +1 -1
  84. package/dist/5839.cocolight-api-client.cjs +1 -1
  85. package/dist/5862.cocolight-api-client.browser.js +1 -1
  86. package/dist/5862.cocolight-api-client.cjs +1 -1
  87. package/dist/5869.cocolight-api-client.browser.js +1 -1
  88. package/dist/5869.cocolight-api-client.cjs +1 -1
  89. package/dist/588.cocolight-api-client.browser.js +1 -1
  90. package/dist/588.cocolight-api-client.cjs +1 -1
  91. package/dist/601.cocolight-api-client.browser.js +1 -1
  92. package/dist/601.cocolight-api-client.cjs +1 -1
  93. package/dist/6012.cocolight-api-client.browser.js +1 -1
  94. package/dist/6012.cocolight-api-client.cjs +1 -1
  95. package/dist/6200.cocolight-api-client.browser.js +1 -1
  96. package/dist/6200.cocolight-api-client.cjs +1 -1
  97. package/dist/6369.cocolight-api-client.browser.js +1 -1
  98. package/dist/6369.cocolight-api-client.cjs +1 -1
  99. package/dist/7009.cocolight-api-client.browser.js +1 -1
  100. package/dist/7009.cocolight-api-client.cjs +1 -1
  101. package/dist/725.cocolight-api-client.browser.js +1 -1
  102. package/dist/725.cocolight-api-client.cjs +1 -1
  103. package/dist/7320.cocolight-api-client.browser.js +1 -1
  104. package/dist/7339.cocolight-api-client.browser.js +1 -1
  105. package/dist/7339.cocolight-api-client.cjs +1 -1
  106. package/dist/7398.cocolight-api-client.browser.js +1 -1
  107. package/dist/7398.cocolight-api-client.cjs +1 -1
  108. package/dist/7888.cocolight-api-client.browser.js +1 -1
  109. package/dist/7888.cocolight-api-client.cjs +1 -1
  110. package/dist/7975.cocolight-api-client.browser.js +1 -1
  111. package/dist/7975.cocolight-api-client.cjs +1 -1
  112. package/dist/809.cocolight-api-client.browser.js +1 -1
  113. package/dist/809.cocolight-api-client.cjs +1 -1
  114. package/dist/8300.cocolight-api-client.browser.js +1 -1
  115. package/dist/8300.cocolight-api-client.cjs +1 -1
  116. package/dist/8317.cocolight-api-client.browser.js +1 -1
  117. package/dist/8317.cocolight-api-client.cjs +1 -1
  118. package/dist/8525.cocolight-api-client.browser.js +1 -1
  119. package/dist/8525.cocolight-api-client.cjs +1 -1
  120. package/dist/8894.cocolight-api-client.browser.js +1 -1
  121. package/dist/8894.cocolight-api-client.cjs +1 -1
  122. package/dist/9301.cocolight-api-client.browser.js +1 -1
  123. package/dist/9301.cocolight-api-client.cjs +1 -1
  124. package/dist/9438.cocolight-api-client.browser.js +1 -1
  125. package/dist/9438.cocolight-api-client.cjs +1 -1
  126. package/dist/9478.cocolight-api-client.browser.js +1 -1
  127. package/dist/9478.cocolight-api-client.cjs +1 -1
  128. package/dist/9568.cocolight-api-client.browser.js +1 -1
  129. package/dist/9568.cocolight-api-client.cjs +1 -1
  130. package/dist/cocolight-api-client.browser.js +6 -6
  131. package/dist/cocolight-api-client.cjs +1 -1
  132. package/dist/cocolight-api-client.vite.mjs.js +1 -1
  133. package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
  134. package/package.json +7 -17
  135. package/types/Api.d.ts +1 -0
  136. package/types/ApiClient.d.ts +10 -1
  137. package/types/api/BaseEntity.d.ts +24 -0
  138. package/types/api/EndpointApi.d.ts +4 -4
  139. package/types/api/EndpointApi.types.d.ts +3 -3
  140. package/types/utils/OfflineClientManager.d.ts +8 -0
  141. package/dist/1035.cocolight-api-client.mjs.js +0 -1
  142. package/dist/1483.cocolight-api-client.mjs.js +0 -1
  143. package/dist/1491.cocolight-api-client.mjs.js +0 -1
  144. package/dist/1494.cocolight-api-client.mjs.js +0 -1
  145. package/dist/1641.cocolight-api-client.mjs.js +0 -1
  146. package/dist/1678.cocolight-api-client.mjs.js +0 -1
  147. package/dist/2041.cocolight-api-client.mjs.js +0 -1
  148. package/dist/2302.cocolight-api-client.mjs.js +0 -1
  149. package/dist/2313.cocolight-api-client.mjs.js +0 -1
  150. package/dist/2379.cocolight-api-client.mjs.js +0 -1
  151. package/dist/2439.cocolight-api-client.mjs.js +0 -1
  152. package/dist/2594.cocolight-api-client.mjs.js +0 -1
  153. package/dist/2766.cocolight-api-client.mjs.js +0 -1
  154. package/dist/2812.cocolight-api-client.mjs.js +0 -1
  155. package/dist/2918.cocolight-api-client.mjs.js +0 -1
  156. package/dist/3028.cocolight-api-client.mjs.js +0 -1
  157. package/dist/3330.cocolight-api-client.mjs.js +0 -1
  158. package/dist/3371.cocolight-api-client.mjs.js +0 -1
  159. package/dist/3401.cocolight-api-client.mjs.js +0 -1
  160. package/dist/3516.cocolight-api-client.mjs.js +0 -1
  161. package/dist/3593.cocolight-api-client.mjs.js +0 -1
  162. package/dist/3764.cocolight-api-client.mjs.js +0 -1
  163. package/dist/3873.cocolight-api-client.mjs.js +0 -1
  164. package/dist/3911.cocolight-api-client.mjs.js +0 -1
  165. package/dist/4031.cocolight-api-client.mjs.js +0 -1
  166. package/dist/4152.cocolight-api-client.mjs.js +0 -1
  167. package/dist/4203.cocolight-api-client.mjs.js +0 -1
  168. package/dist/424.cocolight-api-client.mjs.js +0 -1
  169. package/dist/435.cocolight-api-client.mjs.js +0 -1
  170. package/dist/4402.cocolight-api-client.mjs.js +0 -1
  171. package/dist/4425.cocolight-api-client.mjs.js +0 -1
  172. package/dist/4472.cocolight-api-client.mjs.js +0 -1
  173. package/dist/4914.cocolight-api-client.mjs.js +0 -1
  174. package/dist/4959.cocolight-api-client.mjs.js +0 -1
  175. package/dist/5100.cocolight-api-client.mjs.js +0 -1
  176. package/dist/5111.cocolight-api-client.mjs.js +0 -1
  177. package/dist/5286.cocolight-api-client.mjs.js +0 -1
  178. package/dist/5380.cocolight-api-client.mjs.js +0 -1
  179. package/dist/5383.cocolight-api-client.mjs.js +0 -1
  180. package/dist/5480.cocolight-api-client.mjs.js +0 -1
  181. package/dist/5541.cocolight-api-client.mjs.js +0 -1
  182. package/dist/5839.cocolight-api-client.mjs.js +0 -1
  183. package/dist/5862.cocolight-api-client.mjs.js +0 -1
  184. package/dist/5869.cocolight-api-client.mjs.js +0 -1
  185. package/dist/588.cocolight-api-client.mjs.js +0 -1
  186. package/dist/601.cocolight-api-client.mjs.js +0 -1
  187. package/dist/6012.cocolight-api-client.mjs.js +0 -1
  188. package/dist/6200.cocolight-api-client.mjs.js +0 -1
  189. package/dist/6369.cocolight-api-client.mjs.js +0 -1
  190. package/dist/7009.cocolight-api-client.mjs.js +0 -1
  191. package/dist/725.cocolight-api-client.mjs.js +0 -1
  192. package/dist/7339.cocolight-api-client.mjs.js +0 -1
  193. package/dist/7398.cocolight-api-client.mjs.js +0 -1
  194. package/dist/7888.cocolight-api-client.mjs.js +0 -1
  195. package/dist/7975.cocolight-api-client.mjs.js +0 -1
  196. package/dist/809.cocolight-api-client.mjs.js +0 -1
  197. package/dist/8300.cocolight-api-client.mjs.js +0 -1
  198. package/dist/8317.cocolight-api-client.mjs.js +0 -1
  199. package/dist/8525.cocolight-api-client.mjs.js +0 -1
  200. package/dist/8894.cocolight-api-client.mjs.js +0 -1
  201. package/dist/9301.cocolight-api-client.mjs.js +0 -1
  202. package/dist/9438.cocolight-api-client.mjs.js +0 -1
  203. package/dist/9478.cocolight-api-client.mjs.js +0 -1
  204. package/dist/9568.cocolight-api-client.mjs.js +0 -1
  205. package/dist/cocolight-api-client.mjs.js +0 -1
  206. package/src/Api.ts +0 -348
  207. package/src/ApiClient.ts +0 -1994
  208. package/src/EJSONType.ts +0 -103
  209. package/src/api/Action.ts +0 -665
  210. package/src/api/Answer.ts +0 -1392
  211. package/src/api/Badge.ts +0 -143
  212. package/src/api/BaseEntity.ts +0 -6338
  213. package/src/api/Classified.ts +0 -175
  214. package/src/api/Comment.ts +0 -280
  215. package/src/api/EndpointApi.ts +0 -2270
  216. package/src/api/EndpointApi.types.ts +0 -6566
  217. package/src/api/EntityRegistry.ts +0 -324
  218. package/src/api/Event.ts +0 -360
  219. package/src/api/Form.ts +0 -282
  220. package/src/api/News.ts +0 -547
  221. package/src/api/Notifications.ts +0 -196
  222. package/src/api/Organization.ts +0 -771
  223. package/src/api/Poi.ts +0 -242
  224. package/src/api/Project.ts +0 -545
  225. package/src/api/User.ts +0 -1889
  226. package/src/api/UserApi.ts +0 -192
  227. package/src/api/serverDataType/Action.ts +0 -177
  228. package/src/api/serverDataType/Answer.ts +0 -106
  229. package/src/api/serverDataType/Classified.ts +0 -152
  230. package/src/api/serverDataType/Comment.ts +0 -88
  231. package/src/api/serverDataType/Country.ts +0 -1
  232. package/src/api/serverDataType/Event.ts +0 -112
  233. package/src/api/serverDataType/Form.ts +0 -157
  234. package/src/api/serverDataType/News.ts +0 -138
  235. package/src/api/serverDataType/Notification.ts +0 -81
  236. package/src/api/serverDataType/Organization.ts +0 -111
  237. package/src/api/serverDataType/Poi.ts +0 -75
  238. package/src/api/serverDataType/Project.ts +0 -115
  239. package/src/api/serverDataType/User.ts +0 -112
  240. package/src/api/serverDataType/Zone.ts +0 -33
  241. package/src/api/serverDataType/common.ts +0 -84
  242. package/src/costum/normalize.ts +0 -7
  243. package/src/costum/registry.ts +0 -138
  244. package/src/costum/runtime-map.ts +0 -221
  245. package/src/costum/runtime.ts +0 -274
  246. package/src/costum/schemas/CercleTravailleursSociauxLiberauxLaPlumeSociale.ts +0 -19
  247. package/src/costum/schemas/FabEn.ts +0 -19
  248. package/src/costum/schemas/LivingLabInnovationSocialeBraspanon.ts +0 -19
  249. package/src/costum/schemas/alfph.ts +0 -27
  250. package/src/costum/schemas/campagne.ts +0 -19
  251. package/src/costum/schemas/chtitube.ts +0 -19
  252. package/src/costum/schemas/circuitCourt.ts +0 -19
  253. package/src/costum/schemas/cmcasHauteBretagne.ts +0 -19
  254. package/src/costum/schemas/coFinancementTierslieux.ts +0 -27
  255. package/src/costum/schemas/coeurNumerique.ts +0 -19
  256. package/src/costum/schemas/communLundi.ts +0 -19
  257. package/src/costum/schemas/cressReunion.ts +0 -35
  258. package/src/costum/schemas/cressReunionNetwork.ts +0 -35
  259. package/src/costum/schemas/ctenat.ts +0 -43
  260. package/src/costum/schemas/cyberReunion.ts +0 -19
  261. package/src/costum/schemas/ekisphere.ts +0 -35
  262. package/src/costum/schemas/equipementsSportifs974.ts +0 -19
  263. package/src/costum/schemas/federationDesCae.ts +0 -19
  264. package/src/costum/schemas/formationGenerique.ts +0 -35
  265. package/src/costum/schemas/franceTierslieux.ts +0 -19
  266. package/src/costum/schemas/hinaura.ts +0 -27
  267. package/src/costum/schemas/hubmayotte.ts +0 -19
  268. package/src/costum/schemas/hubnouvellecaledonie.ts +0 -19
  269. package/src/costum/schemas/hubpolynesiefrancaise.ts +0 -19
  270. package/src/costum/schemas/hubreunion.ts +0 -19
  271. package/src/costum/schemas/hubterritoires.ts +0 -19
  272. package/src/costum/schemas/hubwallisetfutuna.ts +0 -19
  273. package/src/costum/schemas/hva.ts +0 -27
  274. package/src/costum/schemas/ibv2.ts +0 -19
  275. package/src/costum/schemas/institutBleu.ts +0 -19
  276. package/src/costum/schemas/journalInsoumisChambery.ts +0 -27
  277. package/src/costum/schemas/kpacite.ts +0 -19
  278. package/src/costum/schemas/laCompagnieDesTierslieux.ts +0 -43
  279. package/src/costum/schemas/laMaisonDesFaiseurs.ts +0 -19
  280. package/src/costum/schemas/laReunionPourUnNumeriqueInclusif.ts +0 -19
  281. package/src/costum/schemas/laSemaineDesTierslieux.ts +0 -19
  282. package/src/costum/schemas/labEnCommuns.ts +0 -19
  283. package/src/costum/schemas/lakou.ts +0 -27
  284. package/src/costum/schemas/lesCommunsDesTierslieux.ts +0 -19
  285. package/src/costum/schemas/mayottePourUnNumeriqueInclusif.ts +0 -19
  286. package/src/costum/schemas/meir.ts +0 -27
  287. package/src/costum/schemas/navigatorDesTierslieux.ts +0 -19
  288. package/src/costum/schemas/notragora.ts +0 -27
  289. package/src/costum/schemas/nouvellecaledoniePourUnNumeriqueInclusif.ts +0 -19
  290. package/src/costum/schemas/openAtlas.ts +0 -19
  291. package/src/costum/schemas/polynesieFrancaisePourUnNumeriqueInclusif.ts +0 -19
  292. package/src/costum/schemas/prdr.ts +0 -19
  293. package/src/costum/schemas/reseauTierslieux.ts +0 -19
  294. package/src/costum/schemas/rfflabs.ts +0 -19
  295. package/src/costum/schemas/ries.ts +0 -19
  296. package/src/costum/schemas/siteDuPactePourLaTransition.ts +0 -27
  297. package/src/costum/schemas/sportSanteBienetre.ts +0 -43
  298. package/src/costum/schemas/suppa.ts +0 -19
  299. package/src/costum/schemas/terramies.ts +0 -19
  300. package/src/costum/schemas/testeTplFormation.ts +0 -35
  301. package/src/costum/schemas/tierslieuxbelgique.ts +0 -19
  302. package/src/costum/schemas/tierslieuxorg1.ts +0 -35
  303. package/src/costum/schemas/transiter.ts +0 -35
  304. package/src/costum/schemas/vhelioPeiTour2025.ts +0 -19
  305. package/src/costum/schemas/wallisetfutunaPourUnNumeriqueInclusif.ts +0 -19
  306. package/src/costum/symbol.ts +0 -26
  307. package/src/costum/types.ts +0 -895
  308. package/src/endpoints.module.ts +0 -4253
  309. package/src/error.ts +0 -86
  310. package/src/forms/entityForm.ts +0 -142
  311. package/src/index.ts +0 -161
  312. package/src/mixin/UserMixin.ts +0 -4
  313. package/src/types/api-responses.ts +0 -217
  314. package/src/types/entities.ts +0 -58
  315. package/src/types/error-guards.ts +0 -230
  316. package/src/types/index.ts +0 -41
  317. package/src/types/payloads.ts +0 -21
  318. package/src/types/transforms.ts +0 -119
  319. package/src/utils/FileOfflineStorageStrategy.node.ts +0 -50
  320. package/src/utils/FileStorageStrategy.node.ts +0 -63
  321. package/src/utils/MultiServerFileStorageStrategy.node.ts +0 -67
  322. package/src/utils/MultiServerTokenStorageStrategy.ts +0 -139
  323. package/src/utils/OfflineClientManager.ts +0 -216
  324. package/src/utils/OfflineQueueStorageStrategy.ts +0 -47
  325. package/src/utils/TokenStorage.ts +0 -77
  326. package/src/utils/compat.ts +0 -12
  327. package/src/utils/createDefaultMultiServerTokenStorageStrategy.ts +0 -35
  328. package/src/utils/createDefaultOfflineStrategy.ts +0 -34
  329. package/src/utils/createDefaultTokenStorageStrategy.ts +0 -33
  330. package/src/utils/reactive.ts +0 -243
  331. package/src/utils/stream-utils.node.ts +0 -12
@@ -1,88 +0,0 @@
1
- import type {
2
- IdObject,
3
- DateValue
4
- } from "./common.js";
5
- import type EJSONType from "../../EJSONType.js";
6
- import type { Organization } from "../Organization.js";
7
- import type { User } from "../User.js";
8
-
9
- type ObjectIDCtor = typeof EJSONType["ObjectID"];
10
- type ObjectID = InstanceType<ObjectIDCtor>;
11
-
12
- /**
13
- * Auteur d'un commentaire (version brute de l'API)
14
- */
15
- export interface CommentAuthorJson {
16
- id: string;
17
- name: string;
18
- username?: string;
19
- email?: string;
20
- profilImageUrl?: string;
21
- profilThumbImageUrl?: string;
22
- typeSig?: string;
23
- [k: string]: unknown;
24
- }
25
-
26
- /**
27
- * Auteur d'un commentaire (version normalisée côté client)
28
- */
29
- export interface CommentAuthor extends CommentAuthorJson {
30
- type?: string;
31
- }
32
-
33
- /**
34
- * Vues d'un commentaire (qui a vu et quand)
35
- */
36
- export interface CommentViews {
37
- [userId: string]: {
38
- date: DateValue;
39
- [k: string]: unknown;
40
- };
41
- }
42
-
43
- /**
44
- * Structure JSON brute retournée par l'API
45
- */
46
- export interface CommentItemJson {
47
- _id: IdObject;
48
- collection: "comments";
49
- contextId: string;
50
- contextType: string;
51
- parentId: string;
52
- text: string;
53
- created: DateValue;
54
- author: CommentAuthorJson;
55
- tags?: string[] | null;
56
- status: string;
57
- views?: CommentViews;
58
- postedDate: number;
59
- markdownActive: boolean;
60
- argval?: string;
61
- replies?: CommentItemJson[];
62
- [key: string]: unknown;
63
- }
64
-
65
- /**
66
- * Structure normalisée utilisée côté client
67
- * Les dates sont converties en objets Date
68
- * Le champ author peut être une instance d'entité (User ou Organization)
69
- */
70
- export interface CommentItemNormalized {
71
- id: string;
72
- _id: ObjectID;
73
- collection: "comments";
74
- contextId: string;
75
- contextType: string;
76
- parentId: string;
77
- text: string;
78
- created: Date;
79
- author: CommentAuthor | User | Organization;
80
- tags?: string[] | null;
81
- status: string;
82
- views?: Record<string, { date: Date; [k: string]: unknown }>;
83
- postedDate: number;
84
- markdownActive: boolean;
85
- argval?: string;
86
- replies?: CommentItemNormalized[];
87
- [key: string]: unknown;
88
- }
@@ -1 +0,0 @@
1
- export type { ZoneItemNormalized as CountryItem } from "./Zone.js";
@@ -1,112 +0,0 @@
1
- import type {
2
- GeoCoordinates,
3
- GeoPosition,
4
- IdObject,
5
- LinkAttendeesRef,
6
- LinkOrganizerRef,
7
- ParentsMap,
8
- OrganizerMap,
9
- PostalAddress,
10
- DateValue
11
- } from "./common.js";
12
- import type EJSONType from "../../EJSONType.js";
13
-
14
- type ObjectIDCtor = typeof EJSONType["ObjectID"];
15
- type ObjectID = InstanceType<ObjectIDCtor>;
16
-
17
- export interface EventLinksBlock {
18
- attendees?: Record<string, LinkAttendeesRef>;
19
- organizer?: Record<string, LinkOrganizerRef>;
20
- [k: string]: unknown;
21
- }
22
-
23
- /**
24
- * Types d'événements supportés
25
- */
26
- export const EVENT_TYPES = [
27
- "workshop",
28
- "competition",
29
- "concert",
30
- "contest",
31
- "conference",
32
- "debate",
33
- "exhibition",
34
- "festival",
35
- "crowdfunding",
36
- "fair",
37
- "course",
38
- "protest",
39
- "market",
40
- "film",
41
- "getTogether",
42
- "meeting",
43
- "spectacle",
44
- "internship",
45
- "stand",
46
- "others",
47
- ] as const;
48
-
49
- export type EventType = (typeof EVENT_TYPES)[number];
50
-
51
- export interface EventItemJson {
52
- _id: IdObject;
53
- collection: "events";
54
- name: string;
55
- type: EventType;
56
- startDate: DateValue;
57
- endDate: DateValue;
58
- created?: DateValue;
59
- updated?: DateValue;
60
- modified?: DateValue;
61
- parent?: ParentsMap;
62
- description?: string;
63
- shortDescription?: string;
64
- slug?: string;
65
- address?: PostalAddress;
66
- geo?: GeoCoordinates;
67
- geoPosition?: GeoPosition;
68
- tags?: string[];
69
- links?: EventLinksBlock;
70
- organizer?: OrganizerMap;
71
- creator?: string;
72
- profilImageUrl?: string;
73
- profilMediumImageUrl?: string;
74
- profilThumbImageUrl?: string;
75
- profilMarkerImageUrl?: string;
76
- timeZone?: string;
77
- email?: string;
78
- url?: string;
79
- [key: string]: unknown;
80
- }
81
-
82
- export interface EventItemNormalized {
83
- id: string;
84
- _id: ObjectID;
85
- collection: "events";
86
- name: string;
87
- type: EventType;
88
- startDate: Date;
89
- endDate: Date;
90
- created?: Date;
91
- updated?: Date;
92
- modified?: Date;
93
- parent?: ParentsMap;
94
- description?: string;
95
- shortDescription?: string;
96
- slug?: string;
97
- address?: PostalAddress;
98
- geo?: GeoCoordinates;
99
- geoPosition?: GeoPosition;
100
- tags?: string[];
101
- links?: EventLinksBlock;
102
- organizer?: OrganizerMap;
103
- creator?: string;
104
- profilImageUrl?: string;
105
- profilMediumImageUrl?: string;
106
- profilThumbImageUrl?: string;
107
- profilMarkerImageUrl?: string;
108
- timeZone?: string;
109
- email?: string;
110
- url?: string;
111
- [key: string]: unknown;
112
- }
@@ -1,157 +0,0 @@
1
- import { DateValue, IdObject, ParentsMap } from "./common.js";
2
-
3
- import type EJSONType from "../../EJSONType.js";
4
-
5
- type ObjectIDCtor = typeof EJSONType["ObjectID"];
6
- type ObjectID = InstanceType<ObjectIDCtor>;
7
-
8
- export interface FormSubFormInputField {
9
- label?: string;
10
- placeholder?: string;
11
- info?: string;
12
- type?: string;
13
- position?: string;
14
- positions?: Record<string, string>;
15
- width?: string;
16
- markdown?: boolean;
17
- uploader?: Record<string, any>;
18
- rules?: {
19
- width?: { min: number; max: number };
20
- syntaxe?: { regexp: string; errormsg: string };
21
- [key: string]: unknown;
22
- };
23
- [key: string]: unknown;
24
- }
25
-
26
- export interface FormSubFormInputs {
27
- name: string;
28
- info?: string;
29
- id: string;
30
- formParent: string;
31
- hasMultiEval?: boolean;
32
- inputs: Record<string, FormSubFormInputField>;
33
- [key: string]: unknown;
34
- }
35
-
36
- /**
37
- * Bloc d'accès au Form — décrit qui peut répondre, quand, comment.
38
- * Renvoyé par `GET_COFORM_BY_ID` (cf. /survey/coform/getformbyid).
39
- */
40
- export interface FormAccess {
41
- /** Si l'utilisateur courant peut répondre maintenant. */
42
- canAnswer: boolean;
43
- /** Raison si `canAnswer` est false (ex: "not_logged_in", "form_closed"). */
44
- reason?: string;
45
- /** État global du form (ex: "open", "closed", "pending"). */
46
- formStatus?: string;
47
- /** Id de la réponse existante de l'user courant (s'il en a une). */
48
- existingAnswerId?: string | null;
49
- /** Doc de la réponse existante (peut être enrichi). */
50
- existingAnswer?: Record<string, unknown> | null;
51
- /** Si le form requiert d'être connecté. */
52
- requiresLogin?: boolean;
53
- /** Réponse temporaire (brouillon) autorisée. */
54
- allowTemporary?: boolean;
55
- /** Réponse nécessite confirmation. */
56
- withConfirmation?: boolean;
57
- /** Réservé aux membres uniquement. */
58
- isOnlyMember?: boolean;
59
- /** Une seule réponse par personne. */
60
- isOneAnswerPerPers?: boolean;
61
- /** Form actif (vs désactivé). */
62
- isActive?: boolean;
63
- /** Fenêtres de dates (ouverture/fermeture, avec/sans confirmation). */
64
- dates?: {
65
- start?: string | null;
66
- end?: string | null;
67
- startNoConfirmation?: string | null;
68
- endNoConfirmation?: string | null;
69
- };
70
- /** Liste des champs restreints (non visibles selon le rôle). */
71
- restrictedFields?: string[];
72
- [key: string]: unknown;
73
- }
74
-
75
- /**
76
- * Forme JSON brute du Form telle que renvoyée par `GET_COFORM_BY_ID`.
77
- *
78
- * ⚠️ Le champ `collection` n'est PAS présent dans le payload backend natif
79
- * (PHDB::find renvoie le doc brut sans nom de table). Il doit être injecté
80
- * côté SDK par `Form.get()` pour cohérence avec les autres entités.
81
- */
82
- export interface FormItemJson {
83
- _id: IdObject;
84
- id?: string;
85
- /** Injecté côté SDK (le backend ne le renvoie pas). */
86
- collection?: "forms";
87
- /** Nom du Form (ex: "Coworking", "Hébergement"). */
88
- name?: string;
89
- /** Type du Form (ex: "coformgeneric", "template"). */
90
- type: string;
91
- config?: Record<string, unknown> | null;
92
- parent?: ParentsMap | null;
93
- subForms?: string[] | null;
94
- created?: DateValue;
95
- creator?: string;
96
- params?: Record<string, unknown> | null;
97
- updated?: DateValue;
98
- inputs?: Record<string, FormSubFormInputs> | null;
99
- /** Logique d'accès calculée côté backend pour l'user courant. */
100
- access?: FormAccess;
101
- /** Champs réservés aux admins du lieu/projet. */
102
- placeAdminOnlyFields?: string[];
103
- /** Champs réservés aux membres du lieu/projet. */
104
- placeMemberOnlyFields?: string[];
105
- /** Si le grand public peut éditer une réponse partagée. */
106
- publicCanEditSharedAnswer?: boolean;
107
- /** Path vers une question partagée (legacy / advanced usage). */
108
- sharedQuestionPath?: Record<string, unknown> | null;
109
- /** Utilise une image de bannière (présent surtout sur `type=template`). */
110
- useBannerImg?: boolean;
111
- [key: string]: unknown;
112
- }
113
-
114
- export interface FormItemNormalized {
115
- id: string;
116
- _id: ObjectID;
117
- /** Injecté côté SDK (le backend ne le renvoie pas). */
118
- collection?: "forms";
119
- name?: string;
120
- type: string;
121
- config?: Record<string, unknown> | null;
122
- parent?: ParentsMap | null;
123
- subForms?: string[] | null;
124
- created?: Date;
125
- creator?: string;
126
- params?: Record<string, unknown> | null;
127
- updated?: Date;
128
- inputs?: Record<string, FormSubFormInputs> | null;
129
- access?: FormAccess;
130
- placeAdminOnlyFields?: string[];
131
- placeMemberOnlyFields?: string[];
132
- publicCanEditSharedAnswer?: boolean;
133
- sharedQuestionPath?: Record<string, unknown> | null;
134
- useBannerImg?: boolean;
135
- [key: string]: unknown;
136
- }
137
-
138
- /**
139
- * Une contribution individuelle à une table commune (commonTable) d'un coform.
140
- * Retournée par `Form.getCommonTableContributors()` (endpoint GET_COFORM_COMMONTABLE_CONTRIBUTORS).
141
- * Plusieurs entrées possibles pour un même `userId` (plusieurs solutions au même usage).
142
- */
143
- export interface CoformCommonTableContributor {
144
- userId: string;
145
- userName?: string;
146
- userSlug?: string;
147
- criteriaId: string;
148
- /** Nom de la solution saisie. */
149
- criteria: string;
150
- /** love | happySmile | neutral | sad | cry | "" */
151
- happiness?: string;
152
- /** Note de 0 à 5. */
153
- note?: number;
154
- comment?: string;
155
- fromAnswerId?: string;
156
- [k: string]: unknown;
157
- }
@@ -1,138 +0,0 @@
1
- import type {
2
- IdObject,
3
- DateValue,
4
- } from "./common.js";
5
- import type EJSONType from "../../EJSONType.js";
6
- import type { Organization } from "../Organization.js";
7
- import type { Project } from "../Project.js";
8
- import type { User } from "../User.js";
9
-
10
- type ObjectIDCtor = typeof EJSONType["ObjectID"];
11
- type ObjectID = InstanceType<ObjectIDCtor>;
12
-
13
- /**
14
- * Auteur d'une actualité
15
- */
16
- export interface NewsAuthor {
17
- id: string;
18
- name: string;
19
- type: string;
20
- profilThumbImageUrl?: string;
21
- [k: string]: unknown;
22
- }
23
-
24
- /**
25
- * Personne ayant partagé l'actualité
26
- */
27
- export interface NewsSharedBy {
28
- id: string;
29
- name: string;
30
- type: string;
31
- updated: DateValue;
32
- comment: string | null;
33
- profilThumbImageUrl?: string;
34
- [k: string]: unknown;
35
- }
36
-
37
- /**
38
- * Cible de l'actualité
39
- */
40
- export interface NewsTarget {
41
- id: string;
42
- name: string;
43
- type: string;
44
- profilThumbImageUrl?: string;
45
- [k: string]: unknown;
46
- }
47
-
48
- /**
49
- * Mention dans une actualité
50
- */
51
- export interface NewsMention {
52
- id: string;
53
- slug: string;
54
- type: string;
55
- name: string;
56
- value: string;
57
- count: string; // API returns as string
58
- [k: string]: unknown;
59
- }
60
-
61
- /**
62
- * Médias fichiers
63
- */
64
- export interface NewsMediaFile {
65
- countFiles: string; // API returns as string
66
- files: any[];
67
- }
68
-
69
- /**
70
- * Médias images
71
- */
72
- export interface NewsMediaImg {
73
- countImages: string; // API returns as string
74
- images: any[];
75
- }
76
-
77
- /**
78
- * Scope de l'actualité
79
- */
80
- export interface NewsScope {
81
- type: string;
82
- [k: string]: unknown;
83
- }
84
-
85
- /**
86
- * Structure JSON brute retournée par l'API
87
- */
88
- export interface NewsItemJson {
89
- _id: IdObject;
90
- id: string;
91
- type: "news";
92
- collection: "news";
93
- text: string;
94
- date: DateValue;
95
- created: DateValue;
96
- updated: DateValue;
97
- markdownActive: boolean;
98
- scope: NewsScope;
99
- comment: string | null;
100
- typeSig: "news";
101
- author: NewsAuthor;
102
- sharedBy: NewsSharedBy[];
103
- lastAuthorShare: NewsSharedBy;
104
- target: NewsTarget;
105
- mediaFile: NewsMediaFile;
106
- mediaImg: NewsMediaImg;
107
- mentions?: NewsMention[];
108
- [key: string]: unknown;
109
- }
110
-
111
- /**
112
- * Structure normalisée utilisée côté client
113
- * Les dates sont converties en objets Date
114
- * Les counts sont convertis en numbers
115
- * Les champs author, target, sharedBy peuvent être des instances d'entités
116
- */
117
- export interface NewsItemNormalized {
118
- _id: ObjectID;
119
- id: string;
120
- type: "news";
121
- collection: "news";
122
- text: string;
123
- date: Date;
124
- created: Date;
125
- updated: Date;
126
- markdownActive: boolean;
127
- scope: NewsScope;
128
- comment: string | null;
129
- typeSig: "news";
130
- author: NewsAuthor | User | Organization;
131
- sharedBy: Array<(Omit<NewsSharedBy, "updated"> & { updated: Date }) | User | Organization>;
132
- lastAuthorShare: (Omit<NewsSharedBy, "updated"> & { updated: Date }) | User | Organization;
133
- target: NewsTarget | User | Organization | Project;
134
- mediaFile: NewsMediaFile;
135
- mediaImg: NewsMediaImg;
136
- mentions?: NewsMention[];
137
- [key: string]: unknown;
138
- }
@@ -1,81 +0,0 @@
1
- import type { DateValue, IdObject } from "./common.js";
2
- import type EJSONType from "../../EJSONType.js";
3
-
4
- // L'_id peut arriver sous 3 formes selon le chemin d'appel :
5
- // - instance ObjectID (transform + _fromJSONValue actif — cas observé sur User.getNotifications)
6
- // - { $id } (forme normalisée non-revivée)
7
- // - string hex (24)
8
- type ObjectIDInstance = InstanceType<typeof EJSONType["ObjectID"]>;
9
- export type NotificationId = ObjectIDInstance | IdObject | string;
10
-
11
- /** Auteur APRÈS aplatissement par _transformData (la map oid->objet devient un objet). */
12
- export interface NotificationAuthor {
13
- id?: string;
14
- type?: string;
15
- name: string;
16
- profilThumbImageUrl?: string; // complété en URL absolue par la normalisation image
17
- [k: string]: unknown;
18
- }
19
-
20
- export interface NotificationTarget {
21
- type: string;
22
- id: string;
23
- parent?: { id: string; type: string };
24
- }
25
-
26
- /** État lu/vu, par destinataire. Un champ ABSENT (clé unset côté serveur) = état "faux". */
27
- export interface NotificationReadState {
28
- isUnread?: boolean;
29
- isUnseen?: boolean;
30
- }
31
-
32
- export interface NotificationNotify {
33
- objectType?: string;
34
- /** keyé par oid de destinataire -> état lu/vu de CE destinataire. */
35
- id: Record<string, NotificationReadState>;
36
- displayName?: string;
37
- icon?: string;
38
- url?: string;
39
- label?: string;
40
- labelArray?: Record<string, string[]>;
41
- labelAuthorObject?: string;
42
- repeat?: boolean;
43
- [k: string]: unknown;
44
- }
45
-
46
- /** Un élément du tableau `notif` (forme transformée). created/updated : Date instance OU {sec,usec}. */
47
- export interface NotificationItemData {
48
- id: string; // injecté depuis la clé de la map notif (= oid hex)
49
- _id: NotificationId;
50
- type: string;
51
- verb: string;
52
- author: NotificationAuthor;
53
- created: Date | DateValue;
54
- updated: Date | DateValue;
55
- target: NotificationTarget;
56
- notify: NotificationNotify;
57
- timestamp?: number; // ajouté serveur (= updated.sec)
58
- timeAgo?: string; // présent en brut, retiré au transform
59
- [k: string]: unknown;
60
- }
61
-
62
- /**
63
- * Réponse de GET_NOTIFICATIONS (mode liste, body indexMin) APRÈS transform :
64
- * `notif` est un tableau (la map oid->item est convertie). Vide => [].
65
- */
66
- export interface GetNotificationsResult {
67
- notif: NotificationItemData[];
68
- [k: string]: unknown;
69
- }
70
-
71
- /**
72
- * Réponse de GET_NOTIFICATIONS_COUNT (mode badge, body refreshTimestamp non-nul) :
73
- * `notif` = notifications mises à jour APRÈS le timestamp (souvent [] si timestamp = maintenant),
74
- * `countNotif` = nombre TOTAL de notifications NON VUES (isUnseen) — indépendant du timestamp.
75
- * countNotif n'est présent QUE si refreshTimestamp est fourni et non-nul (sinon mode liste).
76
- */
77
- export interface GetNotificationsCountResult {
78
- notif: NotificationItemData[];
79
- countNotif?: number;
80
- [k: string]: unknown;
81
- }
@@ -1,111 +0,0 @@
1
- import type { AnswerDocsByFormId, AnswersByFormId } from "./Answer.js";
2
- import type {
3
- GeoCoordinates,
4
- GeoPosition,
5
- IdObject,
6
- LinkMemberOfRef,
7
- LinkMemberRef,
8
- LinkProjectRef,
9
- LinkEventsRef,
10
- OpeningHoursEntry,
11
- ParentsMap,
12
- PostalAddress,
13
- DateValue,
14
- SocialNetwork
15
- } from "./common.js";
16
- import type EJSONType from "../../EJSONType.js";
17
-
18
- type ObjectIDCtor = typeof EJSONType["ObjectID"];
19
- type ObjectID = InstanceType<ObjectIDCtor>;
20
-
21
- export interface OrganizationLinksBlock {
22
- members?: Record<string, LinkMemberRef>;
23
- projects?: Record<string, LinkProjectRef>;
24
- memberOf?: Record<string, LinkMemberOfRef>;
25
- events?: Record<string, LinkEventsRef>;
26
- [k: string]: unknown;
27
- }
28
-
29
- /**
30
- * Types d'organisations supportés
31
- */
32
- export const ORGANIZATION_TYPES = [
33
- "NGO",
34
- "LocalBusiness",
35
- "Group",
36
- "GovernmentOrganization",
37
- "Cooperative",
38
- ] as const;
39
-
40
- export type OrganizationType = (typeof ORGANIZATION_TYPES)[number];
41
-
42
- export interface OrganizationItemJson {
43
- _id: IdObject;
44
- collection: "organizations";
45
- name: string;
46
- created?: DateValue;
47
- updated?: DateValue;
48
- modified?: DateValue;
49
- parent?: ParentsMap;
50
- description?: string;
51
- shortDescription?: string;
52
- slug?: string;
53
- type?: OrganizationType;
54
- address?: PostalAddress;
55
- geo?: GeoCoordinates;
56
- geoPosition?: GeoPosition;
57
- tags?: string[];
58
- links?: OrganizationLinksBlock;
59
- creator?: string;
60
- openingHours?: OpeningHoursEntry[];
61
- profilImageUrl?: string;
62
- profilMediumImageUrl?: string;
63
- profilThumbImageUrl?: string;
64
- profilMarkerImageUrl?: string;
65
- email?: string;
66
- url?: string;
67
- socialNetwork?: SocialNetwork;
68
- /**
69
- * Enrichissement par les Answers liées au résultat — renvoyé uniquement par
70
- * `/costum/navigator/gettl` (variant `navigator-tl` de `searchCostum`).
71
- * Forme JSON brute (avant linkage par `_transformServerData`).
72
- */
73
- answers?: AnswerDocsByFormId;
74
- [key: string]: unknown;
75
- }
76
-
77
- export interface OrganizationItemNormalized {
78
- id: string;
79
- _id: ObjectID;
80
- collection: "organizations";
81
- name: string;
82
- created?: Date;
83
- updated?: Date;
84
- modified?: Date;
85
- parent?: ParentsMap;
86
- description?: string;
87
- shortDescription?: string;
88
- slug?: string;
89
- type?: OrganizationType;
90
- address?: PostalAddress;
91
- geo?: GeoCoordinates;
92
- geoPosition?: GeoPosition;
93
- tags?: string[];
94
- links?: OrganizationLinksBlock;
95
- creator?: string;
96
- openingHours?: OpeningHoursEntry[];
97
- profilImageUrl?: string;
98
- profilMediumImageUrl?: string;
99
- profilThumbImageUrl?: string;
100
- profilMarkerImageUrl?: string;
101
- email?: string;
102
- url?: string;
103
- socialNetwork?: SocialNetwork;
104
- /**
105
- * Enrichissement par les Answers liées au résultat — renvoyé uniquement par
106
- * `/costum/navigator/gettl` (variant `navigator-tl` de `searchCostum`).
107
- * Forme normalisée (après linkage par `Organization._transformServerData`) : `Answer[]` par formId.
108
- */
109
- answers?: AnswersByFormId;
110
- [key: string]: unknown;
111
- }