ldap-rest 1.2.1 → 2.0.0

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 (358) hide show
  1. package/bin/sync-james.mjs +13 -2
  2. package/dist/abstract/ldapFlat.js +1 -1
  3. package/dist/abstract/plugin.js +1 -1
  4. package/dist/abstract/twakePlugin.js +1 -1
  5. package/dist/bin/index.js +1 -1
  6. package/dist/config/args.js +1 -1
  7. package/dist/config/options.js +1 -0
  8. package/dist/config/schema.js +1 -1
  9. package/dist/lib/auth/base.js +1 -1
  10. package/dist/lib/authz/base.js +1 -1
  11. package/dist/lib/entitySchema/validator.js +1 -1
  12. package/dist/lib/errors.js +1 -1
  13. package/dist/lib/expressFormatedResponses.js +1 -1
  14. package/dist/lib/health.js +1 -1
  15. package/dist/lib/hookBus.js +1 -0
  16. package/dist/lib/instanceProviders.js +1 -1
  17. package/dist/lib/ldap/callerView.js +1 -0
  18. package/dist/lib/ldap/pool.js +1 -0
  19. package/dist/lib/ldap/schema.js +1 -0
  20. package/dist/lib/ldap/searchCache.js +1 -0
  21. package/dist/lib/ldapActions.js +1 -1
  22. package/dist/lib/ldapSchema.js +1 -1
  23. package/dist/lib/parseConfig.js +1 -1
  24. package/dist/lib/route.js +1 -0
  25. package/dist/lib/schemaFile.js +1 -1
  26. package/dist/lib/services/index.js +1 -0
  27. package/dist/lib/storage/store.js +1 -1
  28. package/dist/lib/utils.js +1 -1
  29. package/dist/lib/version.js +1 -0
  30. package/dist/logger/winston.js +1 -1
  31. package/dist/plugins/auth/auth.options.js +1 -0
  32. package/dist/plugins/auth/authzDynamic.js +1 -1
  33. package/dist/plugins/auth/authzLinid1.js +1 -1
  34. package/dist/plugins/auth/authzPerBranch.js +1 -1
  35. package/dist/plugins/auth/authzPerRoute.js +1 -1
  36. package/dist/plugins/auth/authzScope.js +1 -1
  37. package/dist/plugins/auth/crowdsec.js +1 -1
  38. package/dist/plugins/auth/fake.js +1 -1
  39. package/dist/plugins/auth/hmac.js +1 -1
  40. package/dist/plugins/auth/llng.js +1 -1
  41. package/dist/plugins/auth/openidconnect.js +1 -1
  42. package/dist/plugins/auth/rateLimit.js +1 -1
  43. package/dist/plugins/auth/token.js +1 -1
  44. package/dist/plugins/auth/totp.js +1 -1
  45. package/dist/plugins/auth/trustedProxy.js +1 -1
  46. package/dist/plugins/bcl.js +1 -1
  47. package/dist/plugins/bcl.options.js +1 -0
  48. package/dist/plugins/configApi.js +1 -1
  49. package/dist/plugins/demo/helloworld.js +1 -1
  50. package/dist/plugins/ldap/accountLifecycle.js +1 -1
  51. package/dist/plugins/ldap/bulkImport.js +1 -1
  52. package/dist/plugins/ldap/departmentSync.js +1 -1
  53. package/dist/plugins/ldap/enterpriseRules.js +1 -1
  54. package/dist/plugins/ldap/externalUsersInGroups.js +1 -1
  55. package/dist/plugins/ldap/flatGeneric.js +1 -1
  56. package/dist/plugins/ldap/groups.js +1 -1
  57. package/dist/plugins/ldap/ldap.options.js +1 -0
  58. package/dist/plugins/ldap/onChange.js +1 -1
  59. package/dist/plugins/ldap/organizations.js +1 -1
  60. package/dist/plugins/ldap/passwordPolicy.js +1 -1
  61. package/dist/plugins/ldap/raw.js +1 -1
  62. package/dist/plugins/ldap/trash.js +1 -1
  63. package/dist/plugins/metrics.js +1 -1
  64. package/dist/plugins/metrics.options.js +1 -0
  65. package/dist/plugins/rabbitmq.js +1 -1
  66. package/dist/plugins/rabbitmq.options.js +1 -0
  67. package/dist/plugins/scim/baseResolver.js +1 -1
  68. package/dist/plugins/scim/bulk.js +1 -1
  69. package/dist/plugins/scim/discovery.js +1 -1
  70. package/dist/plugins/scim/errors.js +1 -1
  71. package/dist/plugins/scim/filter.js +1 -1
  72. package/dist/plugins/scim/groups.js +1 -1
  73. package/dist/plugins/scim/mapping.js +1 -1
  74. package/dist/plugins/scim/patch.js +1 -1
  75. package/dist/plugins/scim/scim.js +1 -1
  76. package/dist/plugins/scim/scim.options.js +1 -0
  77. package/dist/plugins/scim/users.js +1 -1
  78. package/dist/plugins/static.js +1 -1
  79. package/dist/plugins/static.options.js +1 -0
  80. package/dist/plugins/storage/file.js +1 -1
  81. package/dist/plugins/storage/ldap.js +1 -1
  82. package/dist/plugins/storage/postgres.js +1 -1
  83. package/dist/plugins/storage/valkey.js +1 -1
  84. package/dist/plugins/storage.js +1 -1
  85. package/dist/plugins/storage.options.js +1 -0
  86. package/dist/plugins/twake/appAccounts.options.js +1 -0
  87. package/dist/plugins/twake/appAccountsApi.js +1 -1
  88. package/dist/plugins/twake/appAccountsConsistency.js +1 -1
  89. package/dist/plugins/twake/calendar.js +1 -1
  90. package/dist/plugins/twake/calendar.options.js +1 -0
  91. package/dist/plugins/twake/calendarResources.js +1 -1
  92. package/dist/plugins/twake/cloudery.options.js +1 -0
  93. package/dist/plugins/twake/clouderyProvision.js +1 -1
  94. package/dist/plugins/twake/cozy.options.js +1 -0
  95. package/dist/plugins/twake/cozyProvision.js +1 -1
  96. package/dist/plugins/twake/drive.js +1 -1
  97. package/dist/plugins/twake/drive.options.js +1 -0
  98. package/dist/plugins/twake/groups.js +1 -1
  99. package/dist/plugins/twake/instances.js +1 -1
  100. package/dist/plugins/twake/james.js +1 -1
  101. package/dist/plugins/twake/james.options.js +1 -0
  102. package/dist/plugins/twake/lifecycleAttributes.js +1 -1
  103. package/dist/plugins/twake/lifecycleEvents.js +1 -1
  104. package/dist/plugins/twake/migrationProxy.js +1 -1
  105. package/dist/plugins/twake/migrationProxy.options.js +1 -0
  106. package/dist/plugins/twake/spaces.js +1 -1
  107. package/dist/plugins/twake/tombstone.js +1 -1
  108. package/dist/plugins/twake/twakeGroups.options.js +1 -0
  109. package/dist/plugins/twake/twakeInstances.options.js +1 -0
  110. package/dist/plugins/twake/twakeLifecycle.options.js +1 -0
  111. package/dist/plugins/twake/twakeSpaces.options.js +1 -0
  112. package/dist/plugins/twake/twakeTombstone.options.js +1 -0
  113. package/dist/plugins/weblogs.js +1 -1
  114. package/dist/src/abstract/ldapFlat.d.ts +41 -10
  115. package/dist/src/abstract/plugin.d.ts +31 -5
  116. package/dist/src/abstract/twakePlugin.d.ts +14 -4
  117. package/dist/src/bin/index.d.ts +35 -4
  118. package/dist/src/config/args.d.ts +2 -4
  119. package/dist/src/config/options.d.ts +104 -0
  120. package/dist/src/config/schema.d.ts +50 -1
  121. package/dist/src/hooks.d.ts +60 -22
  122. package/dist/src/lib/authz/base.d.ts +4 -51
  123. package/dist/src/lib/authz/composition.d.ts +2 -2
  124. package/dist/src/lib/entitySchema/validator.d.ts +63 -6
  125. package/dist/src/lib/errors.d.ts +57 -1
  126. package/dist/src/lib/expressFormatedResponses.d.ts +49 -7
  127. package/dist/src/lib/hookBus.d.ts +226 -0
  128. package/dist/src/lib/instanceProviders.d.ts +0 -8
  129. package/dist/src/lib/ldap/callerView.d.ts +45 -0
  130. package/dist/src/lib/ldap/pool.d.ts +108 -0
  131. package/dist/src/lib/ldap/schema.d.ts +157 -0
  132. package/dist/src/lib/ldap/searchCache.d.ts +112 -0
  133. package/dist/src/lib/ldapActions.d.ts +26 -256
  134. package/dist/src/lib/parseConfig.d.ts +31 -2
  135. package/dist/src/lib/route.d.ts +99 -0
  136. package/dist/src/lib/services/index.d.ts +56 -0
  137. package/dist/src/lib/utils.d.ts +100 -36
  138. package/dist/src/lib/version.d.ts +12 -0
  139. package/dist/src/plugins/auth/auth.options.d.ts +88 -0
  140. package/dist/src/plugins/auth/authzDynamic.d.ts +10 -1
  141. package/dist/src/plugins/auth/authzLinid1.d.ts +6 -0
  142. package/dist/src/plugins/auth/authzPerBranch.d.ts +9 -0
  143. package/dist/src/plugins/auth/authzPerRoute.d.ts +3 -0
  144. package/dist/src/plugins/auth/authzScope.d.ts +23 -14
  145. package/dist/src/plugins/auth/crowdsec.d.ts +5 -0
  146. package/dist/src/plugins/auth/fake.d.ts +3 -0
  147. package/dist/src/plugins/auth/hmac.d.ts +4 -0
  148. package/dist/src/plugins/auth/llng.d.ts +4 -0
  149. package/dist/src/plugins/auth/openidconnect.d.ts +7 -0
  150. package/dist/src/plugins/auth/rateLimit.d.ts +4 -0
  151. package/dist/src/plugins/auth/token.d.ts +3 -0
  152. package/dist/src/plugins/auth/totp.d.ts +5 -0
  153. package/dist/src/plugins/auth/trustedProxy.d.ts +4 -0
  154. package/dist/src/plugins/bcl.d.ts +3 -0
  155. package/dist/src/plugins/bcl.options.d.ts +8 -0
  156. package/dist/src/plugins/configApi.d.ts +24 -5
  157. package/dist/src/plugins/demo/helloworld.d.ts +8 -19
  158. package/dist/src/plugins/ldap/accountLifecycle.d.ts +17 -0
  159. package/dist/src/plugins/ldap/bulkImport.d.ts +6 -76
  160. package/dist/src/plugins/ldap/departmentSync.d.ts +1 -0
  161. package/dist/src/plugins/ldap/enterpriseRules.d.ts +8 -15
  162. package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +4 -0
  163. package/dist/src/plugins/ldap/flatGeneric.d.ts +4 -0
  164. package/dist/src/plugins/ldap/groups.d.ts +27 -11
  165. package/dist/src/plugins/ldap/ldap.options.d.ts +75 -0
  166. package/dist/src/plugins/ldap/onChange.d.ts +10 -2
  167. package/dist/src/plugins/ldap/organizations.d.ts +16 -0
  168. package/dist/src/plugins/ldap/passwordPolicy.d.ts +35 -3
  169. package/dist/src/plugins/ldap/raw.d.ts +50 -19
  170. package/dist/src/plugins/ldap/trash.d.ts +6 -0
  171. package/dist/src/plugins/metrics.d.ts +3 -0
  172. package/dist/src/plugins/metrics.options.d.ts +8 -0
  173. package/dist/src/plugins/rabbitmq.d.ts +3 -0
  174. package/dist/src/plugins/rabbitmq.options.d.ts +8 -0
  175. package/dist/src/plugins/scim/baseResolver.d.ts +2 -1
  176. package/dist/src/plugins/scim/bulk.d.ts +6 -7
  177. package/dist/src/plugins/scim/discovery.d.ts +3 -0
  178. package/dist/src/plugins/scim/errors.d.ts +2 -1
  179. package/dist/src/plugins/scim/groups.d.ts +6 -4
  180. package/dist/src/plugins/scim/mapping.d.ts +16 -3
  181. package/dist/src/plugins/scim/scim.d.ts +37 -3
  182. package/dist/src/plugins/scim/scim.options.d.ts +35 -0
  183. package/dist/src/plugins/scim/types.d.ts +2 -0
  184. package/dist/src/plugins/scim/users.d.ts +6 -7
  185. package/dist/src/plugins/static.d.ts +9 -0
  186. package/dist/src/plugins/static.options.d.ts +13 -0
  187. package/dist/src/plugins/storage.d.ts +12 -1
  188. package/dist/src/plugins/storage.options.d.ts +16 -0
  189. package/dist/src/plugins/twake/appAccounts.options.d.ts +13 -0
  190. package/dist/src/plugins/twake/appAccountsApi.d.ts +18 -0
  191. package/dist/src/plugins/twake/appAccountsConsistency.d.ts +8 -0
  192. package/dist/src/plugins/twake/calendar.d.ts +25 -2
  193. package/dist/src/plugins/twake/calendar.options.d.ts +19 -0
  194. package/dist/src/plugins/twake/cloudery.options.d.ts +26 -0
  195. package/dist/src/plugins/twake/clouderyProvision.d.ts +18 -0
  196. package/dist/src/plugins/twake/cozy.options.d.ts +23 -0
  197. package/dist/src/plugins/twake/cozyProvision.d.ts +14 -0
  198. package/dist/src/plugins/twake/drive.d.ts +7 -0
  199. package/dist/src/plugins/twake/drive.options.d.ts +15 -0
  200. package/dist/src/plugins/twake/groups.d.ts +29 -1
  201. package/dist/src/plugins/twake/instances.d.ts +74 -10
  202. package/dist/src/plugins/twake/james.d.ts +17 -0
  203. package/dist/src/plugins/twake/james.options.d.ts +21 -0
  204. package/dist/src/plugins/twake/lifecycleAttributes.d.ts +13 -2
  205. package/dist/src/plugins/twake/lifecycleEvents.d.ts +12 -0
  206. package/dist/src/plugins/twake/migrationProxy.d.ts +11 -11
  207. package/dist/src/plugins/twake/migrationProxy.options.d.ts +16 -0
  208. package/dist/src/plugins/twake/spaces.d.ts +30 -0
  209. package/dist/src/plugins/twake/tombstone.d.ts +25 -16
  210. package/dist/src/plugins/twake/twakeGroups.options.d.ts +20 -0
  211. package/dist/src/plugins/twake/twakeInstances.options.d.ts +43 -0
  212. package/dist/src/plugins/twake/twakeLifecycle.options.d.ts +21 -0
  213. package/dist/src/plugins/twake/twakeSpaces.options.d.ts +19 -0
  214. package/dist/src/plugins/twake/twakeTombstone.options.d.ts +17 -0
  215. package/docs/README.md +17 -2
  216. package/docs/client-development/api/rest-api.md +13 -3
  217. package/docs/client-development/schemas/README.md +96 -32
  218. package/docs/development/contracts.md +109 -0
  219. package/docs/plugin-development/README.md +53 -95
  220. package/docs/plugin-development/dependencies.md +24 -8
  221. package/docs/plugin-development/hooks.md +143 -23
  222. package/docs/plugin-development/openapi.md +14 -1
  223. package/docs/plugin-development/options.md +136 -0
  224. package/docs/plugin-development/routes.md +152 -0
  225. package/docs/plugin-development/services.md +95 -0
  226. package/docs/plugin-development/testing.md +3 -3
  227. package/docs/usage/configuration.md +18 -11
  228. package/docs/usage/operations.md +28 -4
  229. package/docs/usage/plugins/integrations/instances.md +11 -3
  230. package/docs/usage/plugins/integrations/lifecycle-events.md +4 -1
  231. package/docs/usage/plugins/integrations/scim.md +20 -18
  232. package/docs/usage/plugins/integrations/tombstone.md +10 -6
  233. package/docs/usage/plugins/ldap/enterprise-rules.md +10 -1
  234. package/docs/usage/plugins/ldap/flat-generic.md +11 -0
  235. package/docs/usage/plugins/ldap/groups.md +4 -1
  236. package/docs/usage/plugins/ldap/password-policy.md +7 -0
  237. package/docs/usage/plugins/ldap/raw.md +17 -1
  238. package/docs/usage/upgrading.md +253 -0
  239. package/package.json +372 -286
  240. package/static/browser/ldap-browser/LdapBrowser.js +8 -6
  241. package/static/browser/ldap-browser/LdapBrowser.js.map +1 -1
  242. package/static/browser/ldap-browser/api/RawApiClient.js +2 -0
  243. package/static/browser/ldap-browser/api/RawApiClient.js.map +1 -1
  244. package/static/browser/ldap-browser/components/EntryTree.js +9 -5
  245. package/static/browser/ldap-browser/components/EntryTree.js.map +1 -1
  246. package/static/browser/ldap-browser/components/EntryView.js +2 -0
  247. package/static/browser/ldap-browser/components/EntryView.js.map +1 -1
  248. package/static/browser/ldap-browser/schema.js +3 -2
  249. package/static/browser/ldap-browser/schema.js.map +1 -1
  250. package/static/browser/ldap-browser.esm.js +27 -18
  251. package/static/browser/ldap-browser.esm.js.map +1 -1
  252. package/static/browser/ldap-browser.js +27 -18
  253. package/static/browser/ldap-browser.js.map +1 -1
  254. package/static/browser/ldap-browser.min.js +1 -1
  255. package/static/browser/ldap-browser.min.js.map +1 -1
  256. package/static/browser/ldap-group-editor/LdapGroupEditor.js +8 -6
  257. package/static/browser/ldap-group-editor/LdapGroupEditor.js.map +1 -1
  258. package/static/browser/ldap-group-editor/api/GroupApiClient.js +1 -0
  259. package/static/browser/ldap-group-editor/api/GroupApiClient.js.map +1 -1
  260. package/static/browser/ldap-group-editor/components/CreateGroupModal.js +5 -1
  261. package/static/browser/ldap-group-editor/components/CreateGroupModal.js.map +1 -1
  262. package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js +6 -3
  263. package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js.map +1 -1
  264. package/static/browser/ldap-group-editor/components/GroupTree.js +6 -3
  265. package/static/browser/ldap-group-editor/components/GroupTree.js.map +1 -1
  266. package/static/browser/ldap-group-editor/components/MoveGroupModal.js +6 -3
  267. package/static/browser/ldap-group-editor/components/MoveGroupModal.js.map +1 -1
  268. package/static/browser/ldap-group-editor.esm.js +32 -16
  269. package/static/browser/ldap-group-editor.esm.js.map +1 -1
  270. package/static/browser/ldap-group-editor.js +32 -16
  271. package/static/browser/ldap-group-editor.js.map +1 -1
  272. package/static/browser/ldap-group-editor.min.js +1 -1
  273. package/static/browser/ldap-group-editor.min.js.map +1 -1
  274. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js +3 -0
  275. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js.map +1 -1
  276. package/static/browser/ldap-resource-editor/cache/CacheManager.js +3 -1
  277. package/static/browser/ldap-resource-editor/cache/CacheManager.js.map +1 -1
  278. package/static/browser/ldap-tree-viewer/LdapTreeViewer.js +6 -1
  279. package/static/browser/ldap-tree-viewer/LdapTreeViewer.js.map +1 -1
  280. package/static/browser/ldap-tree-viewer/api/LdapApiClient.js +2 -0
  281. package/static/browser/ldap-tree-viewer/api/LdapApiClient.js.map +1 -1
  282. package/static/browser/ldap-tree-viewer/components/TreeNode.js +4 -0
  283. package/static/browser/ldap-tree-viewer/components/TreeNode.js.map +1 -1
  284. package/static/browser/ldap-tree-viewer/components/TreeRoot.js +3 -0
  285. package/static/browser/ldap-tree-viewer/components/TreeRoot.js.map +1 -1
  286. package/static/browser/ldap-tree-viewer/store/Store.js +3 -1
  287. package/static/browser/ldap-tree-viewer/store/Store.js.map +1 -1
  288. package/static/browser/ldap-tree-viewer.esm.js +18 -2
  289. package/static/browser/ldap-tree-viewer.esm.js.map +1 -1
  290. package/static/browser/ldap-tree-viewer.js +18 -2
  291. package/static/browser/ldap-tree-viewer.js.map +1 -1
  292. package/static/browser/ldap-tree-viewer.min.js +1 -1
  293. package/static/browser/ldap-tree-viewer.min.js.map +1 -1
  294. package/static/browser/ldap-unit-editor/LdapUnitEditor.js +7 -5
  295. package/static/browser/ldap-unit-editor/LdapUnitEditor.js.map +1 -1
  296. package/static/browser/ldap-unit-editor/api/UnitApiClient.js +1 -0
  297. package/static/browser/ldap-unit-editor/api/UnitApiClient.js.map +1 -1
  298. package/static/browser/ldap-unit-editor/components/MoveUnitModal.js +7 -4
  299. package/static/browser/ldap-unit-editor/components/MoveUnitModal.js.map +1 -1
  300. package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js +7 -4
  301. package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js.map +1 -1
  302. package/static/browser/ldap-unit-editor/components/UnitTree.js +6 -3
  303. package/static/browser/ldap-unit-editor/components/UnitTree.js.map +1 -1
  304. package/static/browser/ldap-unit-editor.esm.js +28 -16
  305. package/static/browser/ldap-unit-editor.esm.js.map +1 -1
  306. package/static/browser/ldap-unit-editor.js +28 -16
  307. package/static/browser/ldap-unit-editor.js.map +1 -1
  308. package/static/browser/ldap-unit-editor.min.js +1 -1
  309. package/static/browser/ldap-unit-editor.min.js.map +1 -1
  310. package/static/browser/ldap-user-editor/LdapUserEditor.js +9 -7
  311. package/static/browser/ldap-user-editor/LdapUserEditor.js.map +1 -1
  312. package/static/browser/ldap-user-editor/api/UserApiClient.js +2 -0
  313. package/static/browser/ldap-user-editor/api/UserApiClient.js.map +1 -1
  314. package/static/browser/ldap-user-editor/cache/CacheManager.js +3 -1
  315. package/static/browser/ldap-user-editor/cache/CacheManager.js.map +1 -1
  316. package/static/browser/ldap-user-editor/components/MoveUserModal.js +7 -4
  317. package/static/browser/ldap-user-editor/components/MoveUserModal.js.map +1 -1
  318. package/static/browser/ldap-user-editor/components/PointerField.js +6 -1
  319. package/static/browser/ldap-user-editor/components/PointerField.js.map +1 -1
  320. package/static/browser/ldap-user-editor/components/UserEditor.js +10 -5
  321. package/static/browser/ldap-user-editor/components/UserEditor.js.map +1 -1
  322. package/static/browser/ldap-user-editor/components/UserList.js +8 -4
  323. package/static/browser/ldap-user-editor/components/UserList.js.map +1 -1
  324. package/static/browser/ldap-user-editor/components/UserTree.js +7 -3
  325. package/static/browser/ldap-user-editor/components/UserTree.js.map +1 -1
  326. package/static/browser/ldap-user-editor.esm.js +55 -30
  327. package/static/browser/ldap-user-editor.esm.js.map +1 -1
  328. package/static/browser/ldap-user-editor.js +55 -30
  329. package/static/browser/ldap-user-editor.js.map +1 -1
  330. package/static/browser/ldap-user-editor.min.js +1 -1
  331. package/static/browser/ldap-user-editor.min.js.map +1 -1
  332. package/static/browser/shared/components/DisposableComponent.js +3 -5
  333. package/static/browser/shared/components/DisposableComponent.js.map +1 -1
  334. package/static/browser/shared/components/Modal.js +2 -1
  335. package/static/browser/shared/components/Modal.js.map +1 -1
  336. package/static/browser/shared/components/StatusMessage.js +3 -2
  337. package/static/browser/shared/components/StatusMessage.js.map +1 -1
  338. package/static/browser/shared/utils/form.js.map +1 -1
  339. package/static/browser/shared/utils/hmac.js +1 -0
  340. package/static/browser/shared/utils/hmac.js.map +1 -1
  341. package/static/browser/shared/utils/totp.js +1 -0
  342. package/static/browser/shared/utils/totp.js.map +1 -1
  343. package/static/browser/shared.esm.js +9 -8
  344. package/static/browser/shared.esm.js.map +1 -1
  345. package/static/browser/shared.js +9 -8
  346. package/static/browser/shared.js.map +1 -1
  347. package/static/browser/shared.min.js +1 -1
  348. package/static/browser/shared.min.js.map +1 -1
  349. package/static/schemas/ad/groups.json +1 -1
  350. package/static/schemas/ad/users.json +3 -3
  351. package/static/schemas/example/organizations.json +2 -2
  352. package/static/schemas/example/users.json +2 -2
  353. package/static/schemas/obm/users.json +2 -2
  354. package/static/schemas/standard/groups.json +1 -1
  355. package/static/schemas/standard/users.json +2 -2
  356. package/static/schemas/twake/groups.json +4 -4
  357. package/static/schemas/twake/teamMailboxes.json +3 -3
  358. package/static/schemas/twake/users.json +7 -7
@@ -4,9 +4,10 @@
4
4
  */
5
5
  import type { Entry, SearchOptions, SearchResult } from 'ldapts';
6
6
  import type { Request, Response } from 'express';
7
- import type { ModifyRequest, AttributesList, AttributeValue } from './lib/ldapActions';
7
+ import type { ModifyRequest, AttributesList, AttributeValue, LdapList } from './lib/ldapActions';
8
8
  import type { ChangesToNotify } from './plugins/ldap/onChange';
9
9
  import type { ChangeContext } from './lib/changeContext';
10
+ import type { BulkResponse, ScimGroup, ScimUser } from './plugins/scim/types';
10
11
  import * as utils from './lib/utils';
11
12
  export type MaybePromise<T> = Promise<T> | T;
12
13
  export type ChainedHook<T> = (arg: T) => MaybePromise<T>;
@@ -29,7 +30,6 @@ export interface OidcSessionClaims {
29
30
  }
30
31
  export type OidcLogoutToken = OidcSessionClaims;
31
32
  export type VoidHook<T extends unknown[]> = (...args: T) => MaybePromise<void>;
32
- export type OtherHook = Function;
33
33
  export { utils };
34
34
  /**
35
35
  * All available hooks
@@ -56,11 +56,11 @@ export interface Hooks {
56
56
  */
57
57
  ldapsearchfilter?: ChainedHook<[SearchResult, Request?, SearchOptions?]>;
58
58
  ldapaddrequest?: ChainedHook<[string, AttributesList, Request?]>;
59
- ldapadddone?: (args: [string, AttributesList], context?: ChangeContext) => MaybePromise<void>;
59
+ ldapadddone?: (dn: string, entry: AttributesList, context?: ChangeContext) => MaybePromise<void>;
60
60
  /** See docs/plugin-development/hooks.md#ldapaddafter */
61
- ldapaddafter?: (args: [string, AttributesList], context?: ChangeContext) => MaybePromise<void>;
61
+ ldapaddafter?: (dn: string, entry: AttributesList, context?: ChangeContext) => MaybePromise<void>;
62
62
  ldapmodifyrequest?: ChainedHook<[string, ModifyRequest, number, Request?]>;
63
- ldapmodifydone?: (args: [string, ModifyRequest, number], context?: ChangeContext) => MaybePromise<void>;
63
+ ldapmodifydone?: (dn: string, changes: ModifyRequest, op: number, context?: ChangeContext) => MaybePromise<void>;
64
64
  /**
65
65
  * Once a modify is over, whatever became of it, after its `ldapmodifydone`
66
66
  * subscribers have returned; with the operation number
@@ -75,7 +75,7 @@ export interface Hooks {
75
75
  */
76
76
  ldapdeleteend?: (op: number) => MaybePromise<void>;
77
77
  ldaprenamerequest?: ChainedHook<[string, string, Request?]>;
78
- ldaprenamedone?: (args: [string, string], context?: ChangeContext) => MaybePromise<void>;
78
+ ldaprenamedone?: (dn: string, newDn: string, context?: ChangeContext) => MaybePromise<void>;
79
79
  /**
80
80
  * Once a rename is over, whatever became of it, after its `ldaprenamedone`
81
81
  * subscribers have returned; with the operation number its request and
@@ -122,14 +122,20 @@ export interface Hooks {
122
122
  /** LdapGroups plugin */
123
123
  ldapgroupvalidatemembers?: ChainedHook<[string, string[]]>;
124
124
  ldapgroupadd?: ChainedHook<[string, AttributesList]>;
125
- ldapgroupadddone?: (args: [string, AttributesList]) => MaybePromise<void>;
125
+ ldapgroupadddone?: (dn: string, entry: AttributesList) => MaybePromise<void>;
126
126
  ldapgroupmodify?: ChainedHook<[string, ModifyRequest, number]>;
127
- ldapgroupmodifydone?: (args: [string, ModifyRequest, number]) => MaybePromise<void>;
127
+ ldapgroupmodifydone?: (dn: string, changes: ModifyRequest, op: number) => MaybePromise<void>;
128
+ ldapgrouprename?: ChainedHook<[string, string]>;
129
+ ldapgrouprenamedone?: (dn: string, newDn: string) => MaybePromise<void>;
130
+ /** Before `ldapgroupadd`, to judge the group about to be created */
131
+ ldapgroupvalidatenew?: ChainedHook<[string, AttributesList]>;
132
+ /** Before `ldapgroupmodify`, to judge the changes about to be written */
133
+ ldapgroupvalidatechanges?: ChainedHook<[string, ModifyRequest]>;
128
134
  ldapgroupdelete?: ChainedHook<string>;
129
135
  ldapgroupdeletedone?: (dn: string) => MaybePromise<void>;
130
136
  ldapgroupaddmember?: ChainedHook<[string, string[]]>;
131
- ldapgroupdeletemember?: ChainedHook<[string, string[]]>;
132
- _ldapgrouplist?: ChainedHook<AsyncGenerator<SearchResult>>;
137
+ ldapgroupdeletemember?: ChainedHook<[string, string]>;
138
+ _ldapgrouplist?: ChainedHook<LdapList>;
133
139
  /**
134
140
  * "onLdapChange"
135
141
  *
@@ -150,22 +156,54 @@ export interface Hooks {
150
156
  onLdapDriveQuotaChange?: (dn: string, oldDriveQuota: number | null, newDriveQuota: number | null) => MaybePromise<void>;
151
157
  /** externalUsersInGroup */
152
158
  externaluserentry?: ChainedHook<[string, AttributesList]>;
153
- externaluseradded?: (dn: string, mail: string) => MaybePromise<void>;
159
+ /** The external member was created, with its DN and the entry written */
160
+ externaluseradded?: (dn: string, entry: AttributesList) => MaybePromise<void>;
154
161
  /**
155
- * Generic flat resource move hooks
156
- * Pattern: {hookPrefix}move
157
- * Examples: ldapusermove, ldappositionmove, etc.
158
- *
159
- * move: before moving - can modify target or cancel
160
- * Note: After move, onLdapChange is triggered automatically by modifyEntry()
162
+ * Generic flat resource hooks, one set per `--ldap-flat-schema` entity,
163
+ * `ldapusermove` for one renamed user: `{hookPrefix}` followed by the
164
+ * suffix of the shared hook of the same kind, see {@link FlatHookPrefix}.
165
+ * An entity's `move` hook takes `[dn, targetOrgDn, request?]`, and a move
166
+ * is followed by `onLdapChange`, as a modify is.
161
167
  */
162
- [K: string]: ChainedHook<unknown> | VoidHook<unknown[]> | OtherHook | undefined;
163
168
  /** Common authentication hooks */
164
169
  beforeAuth?: ChainedHook<[Request, Response]>;
165
170
  afterAuth?: ChainedHook<[Request, Response]>;
166
171
  /** Organization hooks */
167
- getOrganisationTop?: ChainedHook<[
168
- Request | undefined,
169
- AttributesList | null
170
- ]>;
172
+ getOrganisationTop?: ChainedHook<[Request | undefined, AttributesList]>;
173
+ /**
174
+ * SCIM plugin hooks
175
+ *
176
+ * The `create` and `update` hooks are chained and can mutate the resource
177
+ * about to be written; the `done` ones are notified once it is written.
178
+ * `scimgroupcreate` gets the group's base beside the request, which is
179
+ * always there: a group is created through the API.
180
+ */
181
+ scimusercreate?: ChainedHook<[ScimUser, Request?]>;
182
+ scimusercreatedone?: VoidHook<[ScimUser]>;
183
+ scimuserupdate?: ChainedHook<[string, ScimUser, Request?]>;
184
+ scimuserupdatedone?: VoidHook<[string, ScimUser]>;
185
+ scimuserdelete?: ChainedHook<[string, Request?]>;
186
+ scimuserdeletedone?: VoidHook<[string]>;
187
+ /** `[group, request, base]` */
188
+ scimgroupcreate?: ChainedHook<[ScimGroup, Request, string]>;
189
+ scimgroupcreatedone?: VoidHook<[ScimGroup]>;
190
+ scimgroupupdate?: ChainedHook<[string, ScimGroup, Request?]>;
191
+ scimgroupupdatedone?: VoidHook<[string, ScimGroup]>;
192
+ scimgroupdelete?: ChainedHook<[string, Request?]>;
193
+ scimgroupdeletedone?: VoidHook<[string]>;
194
+ scimbulkdone?: VoidHook<[BulkResponse]>;
195
+ /**
196
+ * A delete asked of an entry that is already a tombstone. Fired
197
+ * synchronously with the request that asked it: whoever replays deletions
198
+ * records it from there. `[dn, entry, context]`.
199
+ */
200
+ twakedeletionreplay?: (dn: string, entry: AttributesList, context: ChangeContext) => MaybePromise<void>;
171
201
  }
202
+ /**
203
+ * The prefix of a flat entity's hooks, as `abstract/ldapFlat.ts` builds it:
204
+ * `ldap${entity.name}`. They are `{prefix}add`, `{prefix}adddone` and so on,
205
+ * one convention each, as the shared hook of the same suffix declares it,
206
+ * plus `{prefix}move` before an entry is moved. A plugin watching one
207
+ * declares them beside its other hooks.
208
+ */
209
+ export type FlatHookPrefix = `ldap${string}`;
@@ -10,8 +10,9 @@ import type { SearchOptions } from 'ldapts';
10
10
  import DmPlugin, { type Role } from '../../abstract/plugin';
11
11
  import type { DM } from '../../bin';
12
12
  import type { BranchPermissions } from '../../config/args';
13
+ import type { Hooks } from '../../hooks';
13
14
  import { type DmRequest } from '../auth/base';
14
- import type { AttributesList, ModifyRequest, SearchResult } from '../ldapActions';
15
+ import type { ModifyRequest } from '../ldapActions';
15
16
  /**
16
17
  * The rule of the most specific configured branch holding `target`.
17
18
  *
@@ -311,7 +312,7 @@ export default abstract class AuthzBase extends DmPlugin {
311
312
  *
312
313
  * @param req the request being authorized, which carries an identity
313
314
  * @returns the resolved user, or null when the policy is to allow it
314
- * @throws ForbiddenError when the policy is to deny it
315
+ * @throws AuthzRefusedError when the policy is to deny it
315
316
  */
316
317
  /** Said once: a rule keyed on a value the authenticator did not publish. */
317
318
  private fallbackWarned;
@@ -382,53 +383,5 @@ export default abstract class AuthzBase extends DmPlugin {
382
383
  /**
383
384
  * Common hooks for all authorization plugins
384
385
  */
385
- hooks: {
386
- /**
387
- * A rename moves the entry an identity resolves to, so what was
388
- * resolved is dropped.
389
- *
390
- * `authzLinid1` keys its permissions on the administrator's DN: renamed
391
- * or moved, they resolve to a DN no organization names any more, and
392
- * every operation of theirs is refused until the TTL runs out. The
393
- * whole map goes rather than one key, since what is cached is
394
- * identity → DN and the hook carries DNs: a handful of lookups is
395
- * cheaper than working out which identity moved.
396
- */
397
- ldaprenamedone: () => void;
398
- /**
399
- * A delete removes the entry an identity resolves to, exactly as a
400
- * rename moves it, so what was resolved is dropped the same way.
401
- *
402
- * An administrator deleted through the API is, for `authzLinid1`, still
403
- * resolved to the former DN where the organization still names them:
404
- * their session keeps its rights until the TTL runs out. Like the rename
405
- * hook, the whole map goes rather than one key — the hook carries the
406
- * deleted DN, and the cache keys identities, so a handful of lookups is
407
- * cheaper than working out which identity the DN held.
408
- */
409
- ldapdeletedone: () => void;
410
- ldapmodifyrequest: ([dn, changes, opNumber, req]: [string, ModifyRequest, number, DmRequest?]) => Promise<[string, ModifyRequest, number, DmRequest?]>;
411
- ldapaddrequest: ([dn, entry, req]: [string, AttributesList, DmRequest?]) => Promise<[string, AttributesList, DmRequest?]>;
412
- ldapsearchrequest: ([base, opts, req]: [string, SearchOptions, DmRequest?]) => Promise<[string, SearchOptions, DmRequest?]>;
413
- /**
414
- * Drop what this caller may not read from a search it was granted.
415
- *
416
- * Judged by branch, the search was granted on its base: each entry is
417
- * kept only where the caller may read it, a rule narrower than the base
418
- * refusing part of what it holds. Judged by attachment, the accounts
419
- * attached outside the branches this caller manages are dropped.
420
- *
421
- * Runs after the cache and carries the request, so what one caller may
422
- * not see never reaches another. An entry with no organization link —
423
- * an organization, a group, a nomenclature value — is left alone: those
424
- * are the reference data every administrator reads.
425
- *
426
- * So is an entry attached to the transit branch: it is waiting for an
427
- * administrator to claim it.
428
- */
429
- ldapsearchfilter: ([result, req, opts]: [SearchResult, DmRequest?, SearchOptions?]) => Promise<[SearchResult, DmRequest?, SearchOptions?]>;
430
- getOrganisationTop: ([req, defaultTop]: [DmRequest | undefined, AttributesList | null]) => Promise<[DmRequest | undefined, AttributesList | null]>;
431
- ldaprenamerequest: ([oldDn, newDn, req]: [string, string, DmRequest?]) => Promise<[string, string, DmRequest?]>;
432
- ldapdeleterequest: ([dn, req]: [string | string[], DmRequest?]) => Promise<[string | string[], DmRequest?]>;
433
- };
386
+ hooks: Hooks;
434
387
  }
@@ -5,8 +5,8 @@
5
5
  * How authorization plugins loaded together compose, and the configurations
6
6
  * where that composition is nobody's decision.
7
7
  *
8
- * Every plugin judging LDAP operations registers the same hooks, and
9
- * `launchHooksChained` runs them all: two of them compose as an AND, the
8
+ * Every plugin judging LDAP operations registers the same hooks, and the
9
+ * chain runs them all: two of them compose as an AND, the
10
10
  * first refusal winning. That is a sound rule when it is meant. It is a
11
11
  * refusal nobody can explain when it is not — `authzPerBranch` beside
12
12
  * `authzDynamic` judges a machine token by a branch configuration written
@@ -22,19 +22,76 @@ export declare class EntityValidator {
22
22
  private readonly deps;
23
23
  constructor(schema: Schema | undefined, deps: EntityValidatorDeps);
24
24
  /**
25
- * Check a new entry, then convert it in place for the directory.
25
+ * Check a new entry, then convert it for the directory. Every attribute
26
+ * the schema declares is named as the schema does, a form the defaults,
27
+ * the required check and the conversion all read.
26
28
  *
27
29
  * @param entry entry as the client sent it, `objectClass` included
30
+ * @returns the entry to write: the one given, or a copy under the schema's
31
+ * spellings
28
32
  */
29
- validateNew(entry: AttributesList): Promise<void>;
33
+ validateNew(entry: AttributesList): Promise<AttributesList>;
30
34
  /**
31
- * Check the parts of a change, then convert them in place. No value under
32
- * a name is the empty list for the directory layer, which clears the
33
- * attribute in a `replace` and refuses it in an `add`.
35
+ * Check the parts of a change, then convert them. Under a name the schema
36
+ * declares, no value becomes the empty list, which clears the attribute
37
+ * in a `replace` and is refused in an `add`; under a name it does not
38
+ * declare, a `null` is dropped from an `add` and becomes that empty list
39
+ * in a `replace`.
34
40
  *
35
41
  * @param changes change as the client sent it
42
+ * @returns the same change, under the schema's spellings
36
43
  */
37
- validateChanges(changes: ModifyRequest): Promise<void>;
44
+ validateChanges(changes: ModifyRequest): Promise<ModifyRequest>;
45
+ /**
46
+ * Name every key the schema declares as the schema does, and refuse two
47
+ * keys naming one attribute. The conversion, the required check and the
48
+ * defaults look a declared attribute up by its own name: a field they
49
+ * would leave out is one the client sent under another case or with a
50
+ * `;binary` option.
51
+ *
52
+ * @returns the same attributes, renamed: the map itself when nothing
53
+ * changes, a copy renamed otherwise
54
+ * @throws BadRequestError when two keys name the same attribute
55
+ */
56
+ private renameDeclared;
57
+ /**
58
+ * {@link renameDeclared} on a list of names, such as a `delete`.
59
+ *
60
+ * Two names of one attribute are refused as the routes refuse them: as
61
+ * the schema declares it, or as this server knows the attribute by its
62
+ * name, which makes `l;binary` and `L` one attribute.
63
+ */
64
+ private renameDeclaredNames;
65
+ /**
66
+ * The attribute a name holds, case and option aside: the option is a
67
+ * transfer syntax, and `l;binary` is the `l` a plain `L` names.
68
+ */
69
+ private attributeIdentity;
70
+ /**
71
+ * The schema's spelling of a declared attribute, with the `;binary`
72
+ * option, the only one a write takes, written as the directory writes it.
73
+ */
74
+ private schemaSpelling;
75
+ /**
76
+ * Drop, in place, the keys a creation or an `add` carries with `null` or
77
+ * `undefined` under a name the schema does not declare. A declared
78
+ * attribute is left to the schema, which turns no value into the empty
79
+ * list, refused for a `required` one; an undeclared one has no such step,
80
+ * and without a schema none exists. The write would otherwise carry
81
+ * `[null]`, which ldapts cannot send.
82
+ */
83
+ private dropUndeclaredEmpty;
84
+ /**
85
+ * Check every value of a creation or of a part of a change, then write the
86
+ * shape each one is stored in, in place: no value becomes the empty list,
87
+ * which clears the attribute in a `replace`. A value the schema does not
88
+ * declare is left as sent on a change, and on a creation as the directory
89
+ * layer takes it.
90
+ *
91
+ * @param values entry of a creation, or `add` / `replace` of a change
92
+ * @param part the part of a change, undefined for a creation
93
+ */
94
+ private checkValues;
38
95
  /**
39
96
  * Check one value against its attribute's rules: its shape, then the
40
97
  * entries a pointer names, then the pattern.
@@ -59,6 +59,62 @@ export declare const errorBody: (err: unknown, message: string) => {
59
59
  export declare class ForbiddenError extends HttpError {
60
60
  constructor(message?: string);
61
61
  }
62
+ /**
63
+ * An authorization plugin's refusal.
64
+ *
65
+ * Its message is for the operator, not for the client: it names the model
66
+ * and the branch it judged, which the caller may not know of. Its class is
67
+ * what says an authorization plugin refused, so the 403 is recognised
68
+ * through the `new Error(\`…\`, { cause })` wrappers along the way — see
69
+ * {@link isAuthzRefusal} — and the client is told {@link AUTHZ_REFUSED}.
70
+ */
71
+ export declare class AuthzRefusedError extends ForbiddenError {
72
+ /**
73
+ * Read instead of the class and the name: a plugin loaded from `dist` holds
74
+ * another copy of this module, where `instanceof` answers false, and a
75
+ * subclass may replace `name`.
76
+ */
77
+ readonly authzRefusal: true;
78
+ constructor(message: string);
79
+ }
80
+ /**
81
+ * Every error in a chain of `cause`s, the outermost first.
82
+ *
83
+ * A plugin wrapping what the directory or an authorization hook threw as
84
+ * `new Error(\`…\`, { cause: err })` keeps the reason and what it carries:
85
+ * its class, its status, the database's refusal. The serializers read the
86
+ * whole chain rather than the wrapper alone.
87
+ *
88
+ * @param err what was thrown, which need not be an error
89
+ * @returns the errors of the chain, the outermost first
90
+ */
91
+ export declare const errorChain: (err: unknown) => Error[];
92
+ /**
93
+ * Whether an error is, or wraps through `cause`, an authorization plugin's
94
+ * refusal.
95
+ *
96
+ * Read by the `authzRefusal` marker rather than by class: a plugin loaded
97
+ * from `dist` while its caller runs from `src` throws a `AuthzRefusedError`
98
+ * whose `instanceof` answers false, and a subclass that replaces `name`
99
+ * would escape a name test — the refusal would then be answered as the
100
+ * wrapper's own error.
101
+ *
102
+ * @param err what was thrown
103
+ * @returns true for a refusal, or for an error wrapping one
104
+ */
105
+ export declare const isAuthzRefusal: (err: unknown) => boolean;
106
+ /**
107
+ * The status a thrown thing is answered with.
108
+ *
109
+ * The first error from the outside that names one decides: a wrapper names
110
+ * none, so the error it wraps is read; a layer that translates an inner error
111
+ * keeps its own status. `statusCode` is the convention of this module, while
112
+ * Express's router sets `status` alone on the errors it throws.
113
+ *
114
+ * @param err what was thrown
115
+ * @returns its status code, 500 when it names none
116
+ */
117
+ export declare const statusCodeOf: (err: unknown) => number;
62
118
  /**
63
119
  * An identity that names more than one directory entry.
64
120
  *
@@ -69,7 +125,7 @@ export declare class ForbiddenError extends HttpError {
69
125
  * rather than a `null`: a `null` resolution is what
70
126
  * `--authz-unresolved-user allow` lets through unchecked.
71
127
  */
72
- export declare class AmbiguousIdentityError extends ForbiddenError {
128
+ export declare class AmbiguousIdentityError extends AuthzRefusedError {
73
129
  identity: string;
74
130
  count: number;
75
131
  constructor(identity: string, count: number);
@@ -1,9 +1,6 @@
1
- /**
2
- * Standard express responses and express utilities
3
- * @author Xavier Guimard <xguimard@linagora.com>
4
- */
5
1
  import type { Request, Response } from 'express';
6
2
  import type winston from 'winston';
3
+ import { type Refusal } from './errors';
7
4
  /**
8
5
  * Install the logger, or remove it: a test restores the state it found,
9
6
  * which before any `DM` is none.
@@ -21,9 +18,47 @@ export declare const getLogger: () => winston.Logger | undefined;
21
18
  */
22
19
  export declare const setDebug: (debug: boolean) => void;
23
20
  /**
24
- * The body of a 5xx answer, for the error middleware of `DM` and
25
- * `serverError` alike. The failure is for the logs: the message names it
26
- * only under `--debug`.
21
+ * The sentence a client is told of a client error: an authorization
22
+ * plugin's refusal says nothing of the branch it judged.
23
+ *
24
+ * Any other client error keeps the sentence of the outermost error, the one
25
+ * the route threw when it gave up: it says what the caller's request was
26
+ * about, which the `HttpError` several layers down does not.
27
+ *
28
+ * @param err what was thrown
29
+ * @returns the sentence to answer
30
+ */
31
+ export declare const clientMessageOf: (err: unknown) => string;
32
+ /**
33
+ * The message of a thrown thing, read the way the log reads it.
34
+ *
35
+ * @param err what was thrown
36
+ * @returns its message, or the value as a string
37
+ */
38
+ export declare const messageOf: (err: unknown) => string;
39
+ /**
40
+ * What an error is answered with, for the error middleware of `DM` and
41
+ * `serverError` alike: one status and one body, wherever the handler called
42
+ * a helper or threw.
43
+ *
44
+ * An authorization plugin's refusal loses its status when a plugin wraps it
45
+ * as a plain `Error`; it is still a 403, whatever the wrapper says. The
46
+ * failure of a 5xx is for the logs, and is named in the body only under
47
+ * `--debug`.
48
+ *
49
+ * @param err what failed
50
+ * @param debug whether to name a failure in the answer
51
+ * @returns the status and body to answer
52
+ */
53
+ export declare const errorResponse: (err: unknown, debug?: boolean) => {
54
+ status: number;
55
+ body: {
56
+ error: string;
57
+ } & Partial<Refusal>;
58
+ };
59
+ /**
60
+ * The body of a 5xx answer, for every status answered when the failure is
61
+ * the server's: the message names the failure only under `--debug`.
27
62
  *
28
63
  * @param err what failed
29
64
  * @param debug whether to name the failure; `serverError`'s setting by default
@@ -34,6 +69,13 @@ export declare const serverErrorBody: (err: unknown, debug?: boolean) => {
34
69
  };
35
70
  export declare const tryMethod: (res: Response, method: Function, ...args: unknown[]) => Promise<void>;
36
71
  export declare const tryMethodData: (res: Response, method: Function, ...args: unknown[]) => Promise<void>;
72
+ /**
73
+ * The answer of a route that changed something and returned nothing: the
74
+ * shape every write route declares as its 200.
75
+ */
76
+ export declare const WriteResponse: import("@sinclair/typebox").TObject<{
77
+ success: import("@sinclair/typebox").TBoolean;
78
+ }>;
37
79
  export declare const ok: (res: Response, data?: object) => void;
38
80
  export declare const created: (res: Response, data?: object) => void;
39
81
  export declare const noContent: (res: Response) => void;