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
@@ -39,7 +39,11 @@ export declare function dnKey(dn: string): string;
39
39
  export declare function parentOf(dn: string): string;
40
40
  /**
41
41
  * The entries one level under a DN pattern holding `{org}`, the organization
42
- * captured as one RDN value: `(?:\\.|[^,])+` keeps an escaped comma inside it.
42
+ * captured as one RDN value: an escaped comma stays inside it.
43
+ *
44
+ * A backslash and the character it escapes are read as one, and a comma ends
45
+ * the value, so each character of the value is followed one way whatever
46
+ * the DN holds.
43
47
  */
44
48
  export declare function branchPattern(base: string): RegExp;
45
49
  /**
@@ -49,7 +53,31 @@ export declare function branchPattern(base: string): RegExp;
49
53
  export declare function movedInto(pattern: RegExp, dn: string, newDn: string): string | undefined;
50
54
  /** The organization of an entry one level under a branch pattern. */
51
55
  export declare function organizationIn(pattern: RegExp, dn: string): string | undefined;
56
+ export declare const TwakeOrganizationParams: import("@sinclair/typebox").TObject<{
57
+ id: import("@sinclair/typebox").TString;
58
+ }>;
59
+ export declare const OrganizationGroupParams: import("@sinclair/typebox").TObject<{
60
+ id: import("@sinclair/typebox").TString;
61
+ groupId: import("@sinclair/typebox").TString;
62
+ }>;
63
+ export declare const OrganizationGroupMemberParams: import("@sinclair/typebox").TObject<{
64
+ id: import("@sinclair/typebox").TString;
65
+ groupId: import("@sinclair/typebox").TString;
66
+ userId: import("@sinclair/typebox").TString;
67
+ }>;
52
68
  export default class TwakeGroups extends LdapGroups {
69
+ static optionDefinitions: {
70
+ twake_group_base: import("../../config/options").StringOption;
71
+ twake_group_user_base: import("../../config/options").StringOption;
72
+ twake_group_organization_dn: import("../../config/options").StringOption;
73
+ twake_group_organization_status_attribute: import("../../config/options").StringOption;
74
+ twake_group_organization_deleted_value: import("../../config/options").StringOption;
75
+ twake_group_display_name_attribute: import("../../config/options").StringOption;
76
+ twake_group_color_attribute: import("../../config/options").StringOption;
77
+ twake_group_created_at_attribute: import("../../config/options").StringOption;
78
+ twake_group_max_page_limit: import("../../config/options").NumberOption;
79
+ twake_group_member_fields: import("../../config/options").JsonOption<{}>;
80
+ };
53
81
  name: string;
54
82
  protected readonly groupBase: string;
55
83
  protected readonly userBase: string;
@@ -1,13 +1,3 @@
1
- /**
2
- * @module plugins/twake/instances
3
- *
4
- * Gives every account this server creates its workplace instance, once its
5
- * entry is written, from the Cloudery or from the cozy-stack admin API. The
6
- * address is written once the instance exists, then `user.created` is
7
- * published and the entry marked. The event is sent at least once.
8
- *
9
- * See `docs/usage/plugins/integrations/instances.md`.
10
- */
11
1
  import type { Express, Request } from 'express';
12
2
  import DmPlugin, { type Role } from '../../abstract/plugin';
13
3
  import type { DM } from '../../bin';
@@ -22,13 +12,58 @@ export interface WorkplaceCreated {
22
12
  /** An account's instance request, and the id `user.created` names it by. */
23
13
  interface Account extends InstanceRequest {
24
14
  twakeId: string;
15
+ /** The organization id came from the DN, not from the provider settings */
16
+ fromDn?: boolean;
25
17
  }
18
+ export declare const EnsureInstanceBody: import("@sinclair/typebox").TObject<{
19
+ dn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
+ mail: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
21
+ }>;
22
+ export declare const EnsureInstanceResponse: import("@sinclair/typebox").TObject<{
23
+ state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"pending">]>;
24
+ }>;
26
25
  export default class TwakeInstances extends DmPlugin {
26
+ static optionDefinitions: {
27
+ twake_instance_dn: import("../../config/options").ArrayOption;
28
+ twake_instance_skip_attribute: import("../../config/options").StringOption;
29
+ twake_instance_skip_value: import("../../config/options").StringOption;
30
+ twake_instance_provider: import("../../config/options").StringOption;
31
+ twake_instance_id: import("../../config/options").StringOption;
32
+ twake_instance_fqdn_attribute: import("../../config/options").StringOption;
33
+ twake_instance_sent_attribute: import("../../config/options").StringOption;
34
+ twake_instance_locale: import("../../config/options").StringOption;
35
+ twake_instance_timeout: import("../../config/options").NumberOption;
36
+ twake_instance_cloudery_url: import("../../config/options").StringOption;
37
+ twake_instance_cloudery_token: import("../../config/options").StringOption;
38
+ twake_instance_cloudery_offer: import("../../config/options").StringOption;
39
+ twake_instance_cloudery_domain: import("../../config/options").StringOption;
40
+ twake_instance_cloudery_organization_offer: import("../../config/options").StringOption;
41
+ twake_instance_cozy_url: import("../../config/options").StringOption;
42
+ twake_instance_cozy_user: import("../../config/options").StringOption;
43
+ twake_instance_cozy_passphrase: import("../../config/options").StringOption;
44
+ twake_instance_cozy_domain: import("../../config/options").StringOption;
45
+ twake_instance_cozy_context: import("../../config/options").StringOption;
46
+ twake_instance_cozy_apps: import("../../config/options").StringOption;
47
+ twake_instance_cozy_org_id: import("../../config/options").StringOption;
48
+ twake_instance_cozy_org_domain: import("../../config/options").StringOption;
49
+ twake_instance_auth_exchange: import("../../config/options").StringOption;
50
+ twake_instance_b2b_exchange: import("../../config/options").StringOption;
51
+ twake_instance_user_created_key: import("../../config/options").StringOption;
52
+ twake_instance_organization_created_key: import("../../config/options").StringOption;
53
+ twake_instance_workplace_created_key: import("../../config/options").StringOption;
54
+ twake_instance_queue: import("../../config/options").StringOption;
55
+ twake_instance_organization_base: import("../../config/options").StringOption;
56
+ twake_instance_organization_id_attribute: import("../../config/options").StringOption;
57
+ twake_instance_organization_domain_attribute: import("../../config/options").StringOption;
58
+ twake_instance_organization_name_attribute: import("../../config/options").StringOption;
59
+ twake_instance_organization_fqdn_attribute: import("../../config/options").StringOption;
60
+ };
27
61
  name: string;
28
62
  roles: Role[];
29
63
  dependencies: {
30
64
  rabbitmq: string;
31
65
  };
66
+ private readonly settings;
32
67
  protected readonly patterns: RegExp[];
33
68
  protected readonly provider: InstanceProvider;
34
69
  protected readonly fqdnAttribute: string;
@@ -95,12 +130,41 @@ export default class TwakeInstances extends DmPlugin {
95
130
  private get organizationFqdn();
96
131
  private organizationMail;
97
132
  private isOrganization;
133
+ /**
134
+ * The id the organization's own entry spells, for an id captured from a
135
+ * client's DN: the caller may write the branch in another case, and the
136
+ * Cloudery branch and the slug should not follow it. The captured value
137
+ * stands when there is no entry or no organization base.
138
+ */
139
+ private storedOrganizationId;
140
+ /** `account()`, with a captured organization id read from its entry. */
141
+ private storedAccount;
98
142
  private findOrganization;
99
143
  private read;
100
144
  protected announce(exchange: string, key: string, message: Record<string, unknown>): Promise<void>;
101
145
  /** What to ask for this account, when it gets an instance at all. */
102
146
  protected account(dn: string, entry: AttributesList): Account | undefined;
147
+ /**
148
+ * The expression that takes this DN for an account's, and where it sits.
149
+ *
150
+ * Each expression reads the canonical DN first: a client may spell the
151
+ * branch differently, and a space or an escape inside a captured value
152
+ * would otherwise be captured as written. The canonical form keeps the
153
+ * caller's case, which an organization id is sent as. An expression written
154
+ * with the directory's own spelling — `\2C`, a doubled space — does not
155
+ * match that form, so the DN as sent is tried next.
156
+ */
103
157
  private match;
158
+ /**
159
+ * The DN with a comma inside a value written `\2C`, as the directory writes
160
+ * it: an expression's `[^,]` cannot then read that comma as an RDN
161
+ * separator and name the branch of an entry beside it.
162
+ */
163
+ private separators;
164
+ /** The uid of an account's DN, under any name or alias of the type. */
165
+ private uid;
166
+ /** One queue per entry, whatever spelling its DN came in. */
167
+ private key;
104
168
  private id;
105
169
  protected value(entry: AttributesList, attribute: string): unknown;
106
170
  protected findByMail(email: string, req?: Request): Promise<AttributesList | undefined>;
@@ -16,7 +16,23 @@ type Identity = {
16
16
  };
17
17
  /** Signatures an identity carries over, see {@link Identity} */
18
18
  export type Signatures = Pick<Identity, 'htmlSignature' | 'textSignature'>;
19
+ export declare const QuotaParams: import("@sinclair/typebox").TObject<{
20
+ user: import("@sinclair/typebox").TString;
21
+ }>;
19
22
  export default class James extends TwakePlugin {
23
+ static optionDefinitions: {
24
+ james_webadmin_url: import("../../config/options").StringOption;
25
+ james_webadmin_token: import("../../config/options").StringOption;
26
+ james_signature_template: import("../../config/options").StringOption;
27
+ james_concurrency: import("../../config/options").NumberOption;
28
+ james_init_delay: import("../../config/options").NumberOption;
29
+ james_retry_attempts: import("../../config/options").NumberOption;
30
+ james_retry_delay: import("../../config/options").NumberOption;
31
+ james_mailing_list_branch: import("../../config/options").ArrayOption;
32
+ james_mailbox_type_attribute: import("../../config/options").StringOption;
33
+ james_sync_forwards: import("../../config/options").BooleanOption;
34
+ james_team_mailbox_any_domain: import("../../config/options").BooleanOption;
35
+ };
20
36
  name: string;
21
37
  roles: Role[];
22
38
  dependencies: {
@@ -30,6 +46,7 @@ export default class James extends TwakePlugin {
30
46
  private forwardAttr;
31
47
  private initDelay;
32
48
  constructor(server: DM);
49
+ private get settings();
33
50
  /**
34
51
  * Register API routes
35
52
  */
@@ -0,0 +1,21 @@
1
+ /**
2
+ * James plugin options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const jamesOptions: {
7
+ james_webadmin_url: import("../../config/options").StringOption;
8
+ james_webadmin_token: import("../../config/options").StringOption;
9
+ james_signature_template: import("../../config/options").StringOption;
10
+ james_concurrency: import("../../config/options").NumberOption;
11
+ james_init_delay: import("../../config/options").NumberOption;
12
+ james_retry_attempts: import("../../config/options").NumberOption;
13
+ james_retry_delay: import("../../config/options").NumberOption;
14
+ james_mailing_list_branch: import("../../config/options").ArrayOption;
15
+ james_mailbox_type_attribute: import("../../config/options").StringOption;
16
+ james_sync_forwards: import("../../config/options").BooleanOption;
17
+ james_team_mailbox_any_domain: import("../../config/options").BooleanOption;
18
+ };
19
+ export type JamesOptions = OptionsOf<typeof jamesOptions>;
20
+ /** The checked values for a caller that holds a Config instead of the plugin */
21
+ export declare function jamesOptionsOf(config: Config): JamesOptions;
@@ -25,5 +25,16 @@ export declare function first(value: AttributeValue | null | undefined): string
25
25
  export declare const isTombstone: (entry: AttributesList, attrs: LifecycleAttributes) => boolean;
26
26
  export declare const isLocked: (entry: AttributesList, attrs: LifecycleAttributes) => boolean;
27
27
  export declare function formatDeletedAt(date: Date, format: DeletedAtFormat): string;
28
- /** A deletion date as the directory holds it, or undefined if unreadable. */
29
- export declare function parseDeletedAt(value: string, format: DeletedAtFormat): Date | undefined;
28
+ /**
29
+ * A deletion date as the directory holds it, or undefined if unreadable.
30
+ *
31
+ * Read by the same reader as every other directory time: the format only says
32
+ * how this deployment writes the date, not how it is read.
33
+ *
34
+ * A value of another shape is refused here rather than handed to that
35
+ * reader, whose fallback to `new Date()` reads `1` or `Jan 1` as a date: the
36
+ * erase guard takes an unreadable date for a refusal. The same fallback rolls
37
+ * `2025-02-31` over to March, where the shared reader refuses that day
38
+ * spelled as a GeneralizedTime.
39
+ */
40
+ export declare function parseDeletedAt(value: string): Date | undefined;
@@ -23,6 +23,18 @@ interface Rule {
23
23
  }
24
24
  export declare function parseRules(source: string): Rule[];
25
25
  export default class TwakeLifecycleEvents extends DmPlugin {
26
+ static optionDefinitions: {
27
+ twake_lifecycle_role_attribute: import("../../config/options").StringOption;
28
+ twake_lifecycle_lock_attribute: import("../../config/options").StringOption;
29
+ twake_lifecycle_lock_value: import("../../config/options").StringOption;
30
+ twake_lifecycle_deleted_attribute: import("../../config/options").StringOption;
31
+ twake_lifecycle_deleted_value: import("../../config/options").StringOption;
32
+ twake_lifecycle_deleted_at_attribute: import("../../config/options").StringOption;
33
+ twake_lifecycle_deleted_at_format: import("../../config/options").StringOption;
34
+ twake_lifecycle_reason_attribute: import("../../config/options").StringOption;
35
+ twake_lifecycle_rules: import("../../config/options").StringOption;
36
+ twake_lifecycle_member_attribute: import("../../config/options").StringOption;
37
+ };
26
38
  name: string;
27
39
  roles: Role[];
28
40
  dependencies: {
@@ -1,14 +1,3 @@
1
- /**
2
- * @module plugins/twake/migrationProxy
3
- *
4
- * Keeps the migrated-users list of the Twake Mail migration proxy in step
5
- * with the accounts of the directory: an account created during the
6
- * migration has no mailbox on the old system, so the proxy has to route it
7
- * to the new one from its first login, and the addresses of a migrated
8
- * account have to follow it.
9
- *
10
- * See `docs/usage/plugins/integrations/mail-migration.md`.
11
- */
12
1
  import type { Express } from 'express';
13
2
  import TwakePlugin from '../../abstract/twakePlugin';
14
3
  import { type Role } from '../../abstract/plugin';
@@ -27,7 +16,18 @@ import type { HealthStatus } from '../../lib/health';
27
16
  * type: boolean
28
17
  * description: Whether the proxy routes the user to the new backend
29
18
  */
19
+ export declare const MailMigrationParams: import("@sinclair/typebox").TObject<{
20
+ user: import("@sinclair/typebox").TString;
21
+ }>;
30
22
  export default class MigrationProxy extends TwakePlugin {
23
+ static optionDefinitions: {
24
+ migration_proxy_url: import("../../config/options").StringOption;
25
+ migration_proxy_token: import("../../config/options").StringOption;
26
+ migration_proxy_branch: import("../../config/options").ArrayOption;
27
+ migration_proxy_concurrency: import("../../config/options").NumberOption;
28
+ migration_proxy_retry_attempts: import("../../config/options").NumberOption;
29
+ migration_proxy_retry_delay: import("../../config/options").NumberOption;
30
+ };
31
31
  name: string;
32
32
  roles: Role[];
33
33
  dependencies: {
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Twake Mail migration proxy options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const migrationProxyOptions: {
7
+ migration_proxy_url: import("../../config/options").StringOption;
8
+ migration_proxy_token: import("../../config/options").StringOption;
9
+ migration_proxy_branch: import("../../config/options").ArrayOption;
10
+ migration_proxy_concurrency: import("../../config/options").NumberOption;
11
+ migration_proxy_retry_attempts: import("../../config/options").NumberOption;
12
+ migration_proxy_retry_delay: import("../../config/options").NumberOption;
13
+ };
14
+ export type MigrationProxyOptions = OptionsOf<typeof migrationProxyOptions>;
15
+ /** The checked values for a caller that holds a Config instead of the plugin */
16
+ export declare function migrationProxyOptionsOf(config: Config): MigrationProxyOptions;
@@ -18,7 +18,35 @@ export type Space = {
18
18
  role: SpaceRole;
19
19
  }[];
20
20
  };
21
+ export declare const SpaceOrganizationParams: import("@sinclair/typebox").TObject<{
22
+ id: import("@sinclair/typebox").TString;
23
+ }>;
24
+ export declare const SpaceParams: import("@sinclair/typebox").TObject<{
25
+ id: import("@sinclair/typebox").TString;
26
+ spaceId: import("@sinclair/typebox").TString;
27
+ }>;
28
+ export declare const SpaceMemberParams: import("@sinclair/typebox").TObject<{
29
+ id: import("@sinclair/typebox").TString;
30
+ spaceId: import("@sinclair/typebox").TString;
31
+ userId: import("@sinclair/typebox").TString;
32
+ }>;
33
+ export declare const SpaceGroupParams: import("@sinclair/typebox").TObject<{
34
+ id: import("@sinclair/typebox").TString;
35
+ spaceId: import("@sinclair/typebox").TString;
36
+ groupId: import("@sinclair/typebox").TString;
37
+ }>;
21
38
  export default class TwakeSpaces extends DmPlugin {
39
+ static optionDefinitions: {
40
+ twake_space_base: import("../../config/options").StringOption;
41
+ twake_space_class: import("../../config/options").ArrayOption;
42
+ twake_space_display_name_attribute: import("../../config/options").StringOption;
43
+ twake_space_admin_attribute: import("../../config/options").StringOption;
44
+ twake_space_editor_attribute: import("../../config/options").StringOption;
45
+ twake_space_viewer_attribute: import("../../config/options").StringOption;
46
+ twake_space_user_role_attribute: import("../../config/options").StringOption;
47
+ twake_space_exchange: import("../../config/options").StringOption;
48
+ twake_space_sync_queue: import("../../config/options").StringOption;
49
+ };
22
50
  name: string;
23
51
  roles: Role[];
24
52
  dependencies: Record<string, string>;
@@ -32,6 +60,8 @@ export default class TwakeSpaces extends DmPlugin {
32
60
  private readonly exchange;
33
61
  private readonly domainAttribute;
34
62
  private readonly orgPattern?;
63
+ private readonly groupSettings;
64
+ private readonly instanceSettings;
35
65
  private readonly domains;
36
66
  /**
37
67
  * Changes are followed one at a time, each from the directory as it is
@@ -1,22 +1,24 @@
1
- /**
2
- * @module plugins/twake/tombstone
3
- *
4
- * Turns the delete of an account into a tombstone: the entry stays, flagged
5
- * as deleted, dated, locked, with the reason and without the attributes the
6
- * deployment wants gone. The address it holds cannot be taken again until the
7
- * tombstone is erased.
8
- *
9
- * SCIM treats a tombstone as gone. Erasing removes the entry and its group
10
- * memberships, once the deletion is old enough or when forced, and announces
11
- * nothing: the deletion already did.
12
- *
13
- * See `docs/usage/plugins/integrations/tombstone.md`.
14
- */
15
1
  import type { Express, Request } from 'express';
16
2
  import DmPlugin, { type Role } from '../../abstract/plugin';
17
3
  import type { DM } from '../../bin';
18
4
  import type { Hooks } from '../../hooks';
5
+ export declare const EraseTombstoneBody: import("@sinclair/typebox").TObject<{
6
+ dn: import("@sinclair/typebox").TString;
7
+ force: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
8
+ }>;
9
+ export declare const EraseTombstoneResponse: import("@sinclair/typebox").TObject<{
10
+ success: import("@sinclair/typebox").TBoolean;
11
+ }>;
19
12
  export default class TwakeTombstone extends DmPlugin {
13
+ static optionDefinitions: {
14
+ twake_tombstone_dn: import("../../config/options").ArrayOption;
15
+ twake_tombstone_default_reason: import("../../config/options").StringOption;
16
+ twake_tombstone_reason_header: import("../../config/options").StringOption;
17
+ twake_tombstone_reasons: import("../../config/options").ArrayOption;
18
+ twake_tombstone_clear_attributes: import("../../config/options").ArrayOption;
19
+ twake_tombstone_erase_min_age: import("../../config/options").NumberOption;
20
+ twake_tombstone_group_bases: import("../../config/options").ArrayOption;
21
+ };
20
22
  name: string;
21
23
  roles: Role[];
22
24
  private readonly attrs;
@@ -46,8 +48,8 @@ export default class TwakeTombstone extends DmPlugin {
46
48
  */
47
49
  tombstone(dn: string, reason: string, req?: Request): Promise<void>;
48
50
  /**
49
- * Remove a tombstone and its group memberships. Refused while the deletion
50
- * is younger than the configured age, unless forced.
51
+ * Remove a tombstone and its group memberships. Refused when its deletion
52
+ * date is unreadable or younger than the configured age, unless forced.
51
53
  */
52
54
  erase(dn: string, { force, req }?: {
53
55
  force?: boolean;
@@ -75,6 +77,13 @@ export default class TwakeTombstone extends DmPlugin {
75
77
  * group the erase left holding only the placeholder loses it again.
76
78
  */
77
79
  private restore;
80
+ /**
81
+ * Whether this DN names an entry the expressions keep. A client may spell
82
+ * the DN differently from the expression; the directory stores the entry
83
+ * at its canonical DN, so the expressions read that too. The DN as sent is
84
+ * still tried: an expression written with the directory's own spelling
85
+ * (`\2C`, a doubled space) matches only that form.
86
+ */
78
87
  private matches;
79
88
  private isScim;
80
89
  private checkReason;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Twake groups options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const twakeGroupsOptions: {
7
+ twake_group_base: import("../../config/options").StringOption;
8
+ twake_group_user_base: import("../../config/options").StringOption;
9
+ twake_group_organization_dn: import("../../config/options").StringOption;
10
+ twake_group_organization_status_attribute: import("../../config/options").StringOption;
11
+ twake_group_organization_deleted_value: import("../../config/options").StringOption;
12
+ twake_group_display_name_attribute: import("../../config/options").StringOption;
13
+ twake_group_color_attribute: import("../../config/options").StringOption;
14
+ twake_group_created_at_attribute: import("../../config/options").StringOption;
15
+ twake_group_max_page_limit: import("../../config/options").NumberOption;
16
+ twake_group_member_fields: import("../../config/options").JsonOption<{}>;
17
+ };
18
+ export type TwakeGroupsOptions = OptionsOf<typeof twakeGroupsOptions>;
19
+ /** The checked values for a caller that holds a Config instead of the plugin */
20
+ export declare function twakeGroupsOptionsOf(config: Config): TwakeGroupsOptions;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Twake instances options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const twakeInstancesOptions: {
7
+ twake_instance_dn: import("../../config/options").ArrayOption;
8
+ twake_instance_skip_attribute: import("../../config/options").StringOption;
9
+ twake_instance_skip_value: import("../../config/options").StringOption;
10
+ twake_instance_provider: import("../../config/options").StringOption;
11
+ twake_instance_id: import("../../config/options").StringOption;
12
+ twake_instance_fqdn_attribute: import("../../config/options").StringOption;
13
+ twake_instance_sent_attribute: import("../../config/options").StringOption;
14
+ twake_instance_locale: import("../../config/options").StringOption;
15
+ twake_instance_timeout: import("../../config/options").NumberOption;
16
+ twake_instance_cloudery_url: import("../../config/options").StringOption;
17
+ twake_instance_cloudery_token: import("../../config/options").StringOption;
18
+ twake_instance_cloudery_offer: import("../../config/options").StringOption;
19
+ twake_instance_cloudery_domain: import("../../config/options").StringOption;
20
+ twake_instance_cloudery_organization_offer: import("../../config/options").StringOption;
21
+ twake_instance_cozy_url: import("../../config/options").StringOption;
22
+ twake_instance_cozy_user: import("../../config/options").StringOption;
23
+ twake_instance_cozy_passphrase: import("../../config/options").StringOption;
24
+ twake_instance_cozy_domain: import("../../config/options").StringOption;
25
+ twake_instance_cozy_context: import("../../config/options").StringOption;
26
+ twake_instance_cozy_apps: import("../../config/options").StringOption;
27
+ twake_instance_cozy_org_id: import("../../config/options").StringOption;
28
+ twake_instance_cozy_org_domain: import("../../config/options").StringOption;
29
+ twake_instance_auth_exchange: import("../../config/options").StringOption;
30
+ twake_instance_b2b_exchange: import("../../config/options").StringOption;
31
+ twake_instance_user_created_key: import("../../config/options").StringOption;
32
+ twake_instance_organization_created_key: import("../../config/options").StringOption;
33
+ twake_instance_workplace_created_key: import("../../config/options").StringOption;
34
+ twake_instance_queue: import("../../config/options").StringOption;
35
+ twake_instance_organization_base: import("../../config/options").StringOption;
36
+ twake_instance_organization_id_attribute: import("../../config/options").StringOption;
37
+ twake_instance_organization_domain_attribute: import("../../config/options").StringOption;
38
+ twake_instance_organization_name_attribute: import("../../config/options").StringOption;
39
+ twake_instance_organization_fqdn_attribute: import("../../config/options").StringOption;
40
+ };
41
+ export type TwakeInstancesOptions = OptionsOf<typeof twakeInstancesOptions>;
42
+ /** The checked values for a caller that holds a Config instead of the plugin */
43
+ export declare function twakeInstancesOptionsOf(config: Config): TwakeInstancesOptions;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Account lifecycle options, shared by the Twake lifecycle plugins. See
3
+ * `docs/plugin-development/options.md`.
4
+ */
5
+ import type { Config } from '../../config/args';
6
+ import { type OptionsOf } from '../../config/options';
7
+ export declare const twakeLifecycleOptions: {
8
+ twake_lifecycle_role_attribute: import("../../config/options").StringOption;
9
+ twake_lifecycle_lock_attribute: import("../../config/options").StringOption;
10
+ twake_lifecycle_lock_value: import("../../config/options").StringOption;
11
+ twake_lifecycle_deleted_attribute: import("../../config/options").StringOption;
12
+ twake_lifecycle_deleted_value: import("../../config/options").StringOption;
13
+ twake_lifecycle_deleted_at_attribute: import("../../config/options").StringOption;
14
+ twake_lifecycle_deleted_at_format: import("../../config/options").StringOption;
15
+ twake_lifecycle_reason_attribute: import("../../config/options").StringOption;
16
+ twake_lifecycle_rules: import("../../config/options").StringOption;
17
+ twake_lifecycle_member_attribute: import("../../config/options").StringOption;
18
+ };
19
+ export type TwakeLifecycleOptions = OptionsOf<typeof twakeLifecycleOptions>;
20
+ /** The checked values for a caller that holds a Config instead of the plugin */
21
+ export declare function twakeLifecycleOptionsOf(config: Config): TwakeLifecycleOptions;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Twake spaces options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const twakeSpacesOptions: {
7
+ twake_space_base: import("../../config/options").StringOption;
8
+ twake_space_class: import("../../config/options").ArrayOption;
9
+ twake_space_display_name_attribute: import("../../config/options").StringOption;
10
+ twake_space_admin_attribute: import("../../config/options").StringOption;
11
+ twake_space_editor_attribute: import("../../config/options").StringOption;
12
+ twake_space_viewer_attribute: import("../../config/options").StringOption;
13
+ twake_space_user_role_attribute: import("../../config/options").StringOption;
14
+ twake_space_exchange: import("../../config/options").StringOption;
15
+ twake_space_sync_queue: import("../../config/options").StringOption;
16
+ };
17
+ export type TwakeSpacesOptions = OptionsOf<typeof twakeSpacesOptions>;
18
+ /** The checked values for a caller that holds a Config instead of the plugin */
19
+ export declare function twakeSpacesOptionsOf(config: Config): TwakeSpacesOptions;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Twake tombstone options, see `docs/plugin-development/options.md`.
3
+ */
4
+ import type { Config } from '../../config/args';
5
+ import { type OptionsOf } from '../../config/options';
6
+ export declare const twakeTombstoneOptions: {
7
+ twake_tombstone_dn: import("../../config/options").ArrayOption;
8
+ twake_tombstone_default_reason: import("../../config/options").StringOption;
9
+ twake_tombstone_reason_header: import("../../config/options").StringOption;
10
+ twake_tombstone_reasons: import("../../config/options").ArrayOption;
11
+ twake_tombstone_clear_attributes: import("../../config/options").ArrayOption;
12
+ twake_tombstone_erase_min_age: import("../../config/options").NumberOption;
13
+ twake_tombstone_group_bases: import("../../config/options").ArrayOption;
14
+ };
15
+ export type TwakeTombstoneOptions = OptionsOf<typeof twakeTombstoneOptions>;
16
+ /** The checked values for a caller that holds a Config instead of the plugin */
17
+ export declare function twakeTombstoneOptionsOf(config: Config): TwakeTombstoneOptions;
package/docs/README.md CHANGED
@@ -20,6 +20,8 @@ Create and extend LDAP-Rest with custom plugins.
20
20
 
21
21
  - **[Development Guide](plugin-development/README.md)** - Architecture and plugin creation
22
22
  - **[Hooks](plugin-development/hooks.md)** - LDAP hooks system
23
+ - **[Services](plugin-development/services.md)** - Typed interfaces between plugins
24
+ - **[Routes](plugin-development/routes.md)** - Declaring routes and their input schemas
23
25
  - **[Testing](plugin-development/testing.md)** - Testing with embedded LDAP
24
26
  - **[Dependencies](plugin-development/dependencies.md)** - Plugin dependencies matrix
25
27
 
@@ -32,6 +34,13 @@ Integrate LDAP-Rest into your web applications.
32
34
  - **[JSON Schemas](client-development/schemas/README.md)** - Schema structure and validation
33
35
  - **[Examples](client-development/examples/README.md)** - React, Vue.js, Vanilla JS integration
34
36
 
37
+ ### [Development](development/contracts.md)
38
+
39
+ Work on ldap-rest itself.
40
+
41
+ - **[Published contracts](development/contracts.md)** - What breaks a
42
+ contract, the snapshots that detect it and the deprecation window.
43
+
35
44
  ## API stability
36
45
 
37
46
  From 1.0.0, ldap-rest follows semantic versioning. These are its public
@@ -43,8 +52,9 @@ API, which a minor or a patch release does not break:
43
52
  [REST API](client-development/api/rest-api.md) and the plugin pages,
44
53
  their statuses and their error `code`s.
45
54
  - **Plugin API**: what `ldap-rest/plugin` exports — `DmPlugin` and its
46
- roles (`auth`, `authz`, …), `asyncHandler`, the DN and filter escaping
47
- helpers and the error classes —, the `DM` type of `ldap-rest` and the
55
+ roles (`auth`, `authz`, …), `serviceToken`, `ServiceToken` and
56
+ `ServiceProvider`, `asyncHandler`, the DN and filter escaping helpers and
57
+ the error classes —, the `DM` type of `ldap-rest` and the
48
58
  `Hooks` of `ldap-rest/hooks`, whose arguments are those typed in
49
59
  `src/hooks.ts` ([hooks](plugin-development/hooks.md)), and the directory
50
60
  operations of [the development guide](plugin-development/README.md):
@@ -57,6 +67,11 @@ API, which a minor or a patch release does not break:
57
67
  Everything else — other exports, internal helpers, log messages — may
58
68
  change in any release.
59
69
 
70
+ The options and the REST API are checked mechanically: committed snapshots
71
+ are compared with the base branch of each pull request, and a non-additive
72
+ change needs the `breaking` label. The plugin types are still reviewed by
73
+ hand. See [Published contracts](development/contracts.md).
74
+
60
75
  ## Presentations
61
76
 
62
77
  Interactive presentations (using [presenterm](https://github.com/mfontanini/presenterm)):
@@ -156,6 +156,7 @@ curl -H "Accept: application/json" \
156
156
  {
157
157
  "apiPrefix": "/api",
158
158
  "ldapBase": "dc=example,dc=com",
159
+ "version": "1.2.1",
159
160
  "features": {
160
161
  "flatResources": [
161
162
  {
@@ -242,6 +243,10 @@ curl -H "Accept: application/json" \
242
243
 
243
244
  - `apiPrefix`: API URL prefix (default: `/api`)
244
245
  - `ldapBase`: LDAP base DN
246
+ - `version`: the server's version, as its `package.json` declares it. A client
247
+ compares it with the range it supports and tells an administrator when the
248
+ server is older. Optional: an installation that moved that file leaves it
249
+ out, and a client must then work without it
245
250
  - `features.ldapFlatGeneric.flatResources`: Array of flat LDAP resources (users, positions, etc.)
246
251
  - `features.ldapGroups`: Group management configuration (if enabled)
247
252
  - `features.ldapOrganizations`: Organization tree configuration (if enabled)
@@ -1078,7 +1083,7 @@ curl -X POST \
1078
1083
  ```
1079
1084
 
1080
1085
  A member that does not exist answers 400 naming it, and none of the members
1081
- is added (unless `--group-allow-unexistent-members` is set). Group creation
1086
+ is added (unless `--groups-allow-unexistent-members` is set). Group creation
1082
1087
  checks its `member` list the same way:
1083
1088
 
1084
1089
  ```json
@@ -1335,8 +1340,9 @@ no `limit` was given —
1335
1340
 
1336
1341
  #### 500 Internal Server Error
1337
1342
 
1338
- The failure is in the server's logs, not in the response; the message names
1339
- it only when the server runs with `--debug`:
1343
+ Every 5xx answers this body, whether the route threw or reported the failure
1344
+ through the server's own helper. The failure is in the server's logs, not in
1345
+ the response; the message names it only when the server runs with `--debug`:
1340
1346
 
1341
1347
  ```json
1342
1348
  {
@@ -1359,6 +1365,10 @@ const encoded = encodeURIComponent(dn);
1359
1365
  // Result: uid%3Djohn.doe%2Cou%3Dusers%2Cdc%3Dexample%2Cdc%3Dcom
1360
1366
  ```
1361
1367
 
1368
+ A path parameter is percent-decoded once, as RFC 3986 spells it: an
1369
+ identifier holding `%` is sent as `%25`, so `100%` is addressed as
1370
+ `/api/v1/ldap/users/100%25`.
1371
+
1362
1372
  ### LDAP Attributes are Arrays
1363
1373
 
1364
1374
  LDAP attributes are always returned as arrays, even for single-valued attributes: