@karibsen/eponyme 0.1.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 (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +609 -0
  3. package/dist/eponyme.d.mts +15 -0
  4. package/dist/eponyme.mjs +38 -0
  5. package/dist/module.d.mts +26 -0
  6. package/dist/module.json +9 -0
  7. package/dist/module.mjs +154 -0
  8. package/dist/runtime/assets/dashboard.css +1 -0
  9. package/dist/runtime/components/editor/EponymeCollectionPage.d.vue.ts +9 -0
  10. package/dist/runtime/components/editor/EponymeCollectionPage.vue +238 -0
  11. package/dist/runtime/components/editor/EponymeCollectionPage.vue.d.ts +9 -0
  12. package/dist/runtime/components/editor/EponymeCopy.d.vue.ts +7 -0
  13. package/dist/runtime/components/editor/EponymeCopy.vue +28 -0
  14. package/dist/runtime/components/editor/EponymeCopy.vue.d.ts +7 -0
  15. package/dist/runtime/components/editor/EponymeFolderNav.d.vue.ts +7 -0
  16. package/dist/runtime/components/editor/EponymeFolderNav.vue +146 -0
  17. package/dist/runtime/components/editor/EponymeFolderNav.vue.d.ts +7 -0
  18. package/dist/runtime/components/editor/EponymeFolderPage.d.vue.ts +7 -0
  19. package/dist/runtime/components/editor/EponymeFolderPage.vue +62 -0
  20. package/dist/runtime/components/editor/EponymeFolderPage.vue.d.ts +7 -0
  21. package/dist/runtime/components/editor/EponymeForm.d.vue.ts +9 -0
  22. package/dist/runtime/components/editor/EponymeForm.vue +309 -0
  23. package/dist/runtime/components/editor/EponymeForm.vue.d.ts +9 -0
  24. package/dist/runtime/components/editor/EponymeFormPage.d.vue.ts +8 -0
  25. package/dist/runtime/components/editor/EponymeFormPage.vue +288 -0
  26. package/dist/runtime/components/editor/EponymeFormPage.vue.d.ts +8 -0
  27. package/dist/runtime/components/editor/EponymeHistoryDialog.d.vue.ts +14 -0
  28. package/dist/runtime/components/editor/EponymeHistoryDialog.vue +97 -0
  29. package/dist/runtime/components/editor/EponymeHistoryDialog.vue.d.ts +14 -0
  30. package/dist/runtime/components/editor/EponymeNavigationLink.d.vue.ts +14 -0
  31. package/dist/runtime/components/editor/EponymeNavigationLink.vue +80 -0
  32. package/dist/runtime/components/editor/EponymeNavigationLink.vue.d.ts +14 -0
  33. package/dist/runtime/components/editor/EponymePageNavigation.d.vue.ts +8 -0
  34. package/dist/runtime/components/editor/EponymePageNavigation.vue +58 -0
  35. package/dist/runtime/components/editor/EponymePageNavigation.vue.d.ts +8 -0
  36. package/dist/runtime/components/editor/EponymePreviewPanel.d.vue.ts +16 -0
  37. package/dist/runtime/components/editor/EponymePreviewPanel.vue +100 -0
  38. package/dist/runtime/components/editor/EponymePreviewPanel.vue.d.ts +16 -0
  39. package/dist/runtime/components/editor/EponymeSidebar.d.vue.ts +6 -0
  40. package/dist/runtime/components/editor/EponymeSidebar.vue +244 -0
  41. package/dist/runtime/components/editor/EponymeSidebar.vue.d.ts +6 -0
  42. package/dist/runtime/components/editor/EponymeSidebarTree.d.vue.ts +18 -0
  43. package/dist/runtime/components/editor/EponymeSidebarTree.vue +84 -0
  44. package/dist/runtime/components/editor/EponymeSidebarTree.vue.d.ts +18 -0
  45. package/dist/runtime/components/fields/ArrayField.d.vue.ts +19 -0
  46. package/dist/runtime/components/fields/ArrayField.vue +198 -0
  47. package/dist/runtime/components/fields/ArrayField.vue.d.ts +19 -0
  48. package/dist/runtime/components/fields/BooleanField.d.vue.ts +16 -0
  49. package/dist/runtime/components/fields/BooleanField.vue +36 -0
  50. package/dist/runtime/components/fields/BooleanField.vue.d.ts +16 -0
  51. package/dist/runtime/components/fields/CheckboxGroupField.d.vue.ts +20 -0
  52. package/dist/runtime/components/fields/CheckboxGroupField.vue +52 -0
  53. package/dist/runtime/components/fields/CheckboxGroupField.vue.d.ts +20 -0
  54. package/dist/runtime/components/fields/ColorField.d.vue.ts +19 -0
  55. package/dist/runtime/components/fields/ColorField.vue +39 -0
  56. package/dist/runtime/components/fields/ColorField.vue.d.ts +19 -0
  57. package/dist/runtime/components/fields/DateField.d.vue.ts +18 -0
  58. package/dist/runtime/components/fields/DateField.vue +39 -0
  59. package/dist/runtime/components/fields/DateField.vue.d.ts +18 -0
  60. package/dist/runtime/components/fields/FieldRenderer.d.vue.ts +24 -0
  61. package/dist/runtime/components/fields/FieldRenderer.vue +135 -0
  62. package/dist/runtime/components/fields/FieldRenderer.vue.d.ts +24 -0
  63. package/dist/runtime/components/fields/NumberField.d.vue.ts +20 -0
  64. package/dist/runtime/components/fields/NumberField.vue +58 -0
  65. package/dist/runtime/components/fields/NumberField.vue.d.ts +20 -0
  66. package/dist/runtime/components/fields/RadioField.d.vue.ts +20 -0
  67. package/dist/runtime/components/fields/RadioField.vue +44 -0
  68. package/dist/runtime/components/fields/RadioField.vue.d.ts +20 -0
  69. package/dist/runtime/components/fields/RichTextField.d.vue.ts +20 -0
  70. package/dist/runtime/components/fields/RichTextField.vue +176 -0
  71. package/dist/runtime/components/fields/RichTextField.vue.d.ts +20 -0
  72. package/dist/runtime/components/fields/SectionField.d.vue.ts +20 -0
  73. package/dist/runtime/components/fields/SectionField.vue +127 -0
  74. package/dist/runtime/components/fields/SectionField.vue.d.ts +20 -0
  75. package/dist/runtime/components/fields/SelectField.d.vue.ts +21 -0
  76. package/dist/runtime/components/fields/SelectField.vue +42 -0
  77. package/dist/runtime/components/fields/SelectField.vue.d.ts +21 -0
  78. package/dist/runtime/components/fields/SlugField.d.vue.ts +20 -0
  79. package/dist/runtime/components/fields/SlugField.vue +35 -0
  80. package/dist/runtime/components/fields/SlugField.vue.d.ts +20 -0
  81. package/dist/runtime/components/fields/TabsField.d.vue.ts +19 -0
  82. package/dist/runtime/components/fields/TabsField.vue +109 -0
  83. package/dist/runtime/components/fields/TabsField.vue.d.ts +19 -0
  84. package/dist/runtime/components/fields/TextField.d.vue.ts +22 -0
  85. package/dist/runtime/components/fields/TextField.vue +56 -0
  86. package/dist/runtime/components/fields/TextField.vue.d.ts +22 -0
  87. package/dist/runtime/components/fields/TextareaField.d.vue.ts +20 -0
  88. package/dist/runtime/components/fields/TextareaField.vue +47 -0
  89. package/dist/runtime/components/fields/TextareaField.vue.d.ts +20 -0
  90. package/dist/runtime/components/fields/UrlField.d.vue.ts +17 -0
  91. package/dist/runtime/components/fields/UrlField.vue +35 -0
  92. package/dist/runtime/components/fields/UrlField.vue.d.ts +17 -0
  93. package/dist/runtime/components/ui/EPAccordion.d.vue.ts +26 -0
  94. package/dist/runtime/components/ui/EPAccordion.vue +64 -0
  95. package/dist/runtime/components/ui/EPAccordion.vue.d.ts +26 -0
  96. package/dist/runtime/components/ui/EPAvatar.d.vue.ts +9 -0
  97. package/dist/runtime/components/ui/EPAvatar.vue +25 -0
  98. package/dist/runtime/components/ui/EPAvatar.vue.d.ts +9 -0
  99. package/dist/runtime/components/ui/EPBadge.d.vue.ts +16 -0
  100. package/dist/runtime/components/ui/EPBadge.vue +17 -0
  101. package/dist/runtime/components/ui/EPBadge.vue.d.ts +16 -0
  102. package/dist/runtime/components/ui/EPButton.d.vue.ts +22 -0
  103. package/dist/runtime/components/ui/EPButton.vue +55 -0
  104. package/dist/runtime/components/ui/EPButton.vue.d.ts +22 -0
  105. package/dist/runtime/components/ui/EPCheckbox.d.vue.ts +11 -0
  106. package/dist/runtime/components/ui/EPCheckbox.vue +21 -0
  107. package/dist/runtime/components/ui/EPCheckbox.vue.d.ts +11 -0
  108. package/dist/runtime/components/ui/EPColorPicker.d.vue.ts +19 -0
  109. package/dist/runtime/components/ui/EPColorPicker.vue +63 -0
  110. package/dist/runtime/components/ui/EPColorPicker.vue.d.ts +19 -0
  111. package/dist/runtime/components/ui/EPDialog.d.vue.ts +24 -0
  112. package/dist/runtime/components/ui/EPDialog.vue +54 -0
  113. package/dist/runtime/components/ui/EPDialog.vue.d.ts +24 -0
  114. package/dist/runtime/components/ui/EPDropdownMenu.d.vue.ts +25 -0
  115. package/dist/runtime/components/ui/EPDropdownMenu.vue +40 -0
  116. package/dist/runtime/components/ui/EPDropdownMenu.vue.d.ts +25 -0
  117. package/dist/runtime/components/ui/EPFormField.d.vue.ts +24 -0
  118. package/dist/runtime/components/ui/EPFormField.vue +62 -0
  119. package/dist/runtime/components/ui/EPFormField.vue.d.ts +24 -0
  120. package/dist/runtime/components/ui/EPInputText.d.vue.ts +17 -0
  121. package/dist/runtime/components/ui/EPInputText.vue +33 -0
  122. package/dist/runtime/components/ui/EPInputText.vue.d.ts +17 -0
  123. package/dist/runtime/components/ui/EPLinkEditor.d.vue.ts +16 -0
  124. package/dist/runtime/components/ui/EPLinkEditor.vue +169 -0
  125. package/dist/runtime/components/ui/EPLinkEditor.vue.d.ts +16 -0
  126. package/dist/runtime/components/ui/EPRadioButton.d.vue.ts +16 -0
  127. package/dist/runtime/components/ui/EPRadioButton.vue +34 -0
  128. package/dist/runtime/components/ui/EPRadioButton.vue.d.ts +16 -0
  129. package/dist/runtime/components/ui/EPSelect.d.vue.ts +21 -0
  130. package/dist/runtime/components/ui/EPSelect.vue +73 -0
  131. package/dist/runtime/components/ui/EPSelect.vue.d.ts +21 -0
  132. package/dist/runtime/components/ui/EPSlider.d.vue.ts +16 -0
  133. package/dist/runtime/components/ui/EPSlider.vue +51 -0
  134. package/dist/runtime/components/ui/EPSlider.vue.d.ts +16 -0
  135. package/dist/runtime/components/ui/EPSwitch.d.vue.ts +11 -0
  136. package/dist/runtime/components/ui/EPSwitch.vue +23 -0
  137. package/dist/runtime/components/ui/EPSwitch.vue.d.ts +11 -0
  138. package/dist/runtime/components/ui/EPTextarea.d.vue.ts +12 -0
  139. package/dist/runtime/components/ui/EPTextarea.vue +18 -0
  140. package/dist/runtime/components/ui/EPTextarea.vue.d.ts +12 -0
  141. package/dist/runtime/components/ui/EPToast.d.vue.ts +13 -0
  142. package/dist/runtime/components/ui/EPToast.vue +60 -0
  143. package/dist/runtime/components/ui/EPToast.vue.d.ts +13 -0
  144. package/dist/runtime/components/ui/EPTooltip.d.vue.ts +17 -0
  145. package/dist/runtime/components/ui/EPTooltip.vue +34 -0
  146. package/dist/runtime/components/ui/EPTooltip.vue.d.ts +17 -0
  147. package/dist/runtime/components/ui/form-field-context.d.ts +12 -0
  148. package/dist/runtime/components/ui/form-field-context.js +1 -0
  149. package/dist/runtime/composables/useEponyme.d.ts +24 -0
  150. package/dist/runtime/composables/useEponyme.js +63 -0
  151. package/dist/runtime/composables/useEponymeAuth.d.ts +16 -0
  152. package/dist/runtime/composables/useEponymeAuth.js +81 -0
  153. package/dist/runtime/composables/useEponymeCollection.d.ts +27 -0
  154. package/dist/runtime/composables/useEponymeCollection.js +44 -0
  155. package/dist/runtime/composables/useEponymeColorPresets.d.ts +5 -0
  156. package/dist/runtime/composables/useEponymeColorPresets.js +16 -0
  157. package/dist/runtime/composables/useEponymeConfig.d.ts +1 -0
  158. package/dist/runtime/composables/useEponymeConfig.js +4 -0
  159. package/dist/runtime/composables/useEponymeForm.d.ts +35 -0
  160. package/dist/runtime/composables/useEponymeForm.js +75 -0
  161. package/dist/runtime/composables/useEponymeHistory.d.ts +26 -0
  162. package/dist/runtime/composables/useEponymeHistory.js +24 -0
  163. package/dist/runtime/composables/useEponymeValidation.d.ts +21 -0
  164. package/dist/runtime/composables/useEponymeValidation.js +34 -0
  165. package/dist/runtime/fields/array.d.ts +2 -0
  166. package/dist/runtime/fields/array.js +3 -0
  167. package/dist/runtime/fields/boolean.d.ts +2 -0
  168. package/dist/runtime/fields/boolean.js +3 -0
  169. package/dist/runtime/fields/checkbox-group.d.ts +2 -0
  170. package/dist/runtime/fields/checkbox-group.js +3 -0
  171. package/dist/runtime/fields/color.d.ts +2 -0
  172. package/dist/runtime/fields/color.js +3 -0
  173. package/dist/runtime/fields/date.d.ts +3 -0
  174. package/dist/runtime/fields/date.js +6 -0
  175. package/dist/runtime/fields/email.d.ts +2 -0
  176. package/dist/runtime/fields/email.js +3 -0
  177. package/dist/runtime/fields/image.d.ts +2 -0
  178. package/dist/runtime/fields/image.js +3 -0
  179. package/dist/runtime/fields/index.d.ts +37 -0
  180. package/dist/runtime/fields/index.js +19 -0
  181. package/dist/runtime/fields/number.d.ts +2 -0
  182. package/dist/runtime/fields/number.js +3 -0
  183. package/dist/runtime/fields/radio.d.ts +2 -0
  184. package/dist/runtime/fields/radio.js +3 -0
  185. package/dist/runtime/fields/rich-text.d.ts +2 -0
  186. package/dist/runtime/fields/rich-text.js +3 -0
  187. package/dist/runtime/fields/section.d.ts +2 -0
  188. package/dist/runtime/fields/section.js +3 -0
  189. package/dist/runtime/fields/select.d.ts +2 -0
  190. package/dist/runtime/fields/select.js +3 -0
  191. package/dist/runtime/fields/slug.d.ts +2 -0
  192. package/dist/runtime/fields/slug.js +3 -0
  193. package/dist/runtime/fields/string.d.ts +2 -0
  194. package/dist/runtime/fields/string.js +3 -0
  195. package/dist/runtime/fields/tab.d.ts +2 -0
  196. package/dist/runtime/fields/tab.js +3 -0
  197. package/dist/runtime/fields/textarea.d.ts +2 -0
  198. package/dist/runtime/fields/textarea.js +3 -0
  199. package/dist/runtime/fields/url.d.ts +2 -0
  200. package/dist/runtime/fields/url.js +3 -0
  201. package/dist/runtime/middleware/eponyme-auth.d.ts +2 -0
  202. package/dist/runtime/middleware/eponyme-auth.js +13 -0
  203. package/dist/runtime/middleware/eponyme-owner.d.ts +2 -0
  204. package/dist/runtime/middleware/eponyme-owner.js +7 -0
  205. package/dist/runtime/pages/EponymeChangePasswordPage.d.vue.ts +3 -0
  206. package/dist/runtime/pages/EponymeChangePasswordPage.vue +118 -0
  207. package/dist/runtime/pages/EponymeChangePasswordPage.vue.d.ts +3 -0
  208. package/dist/runtime/pages/EponymeDetailPage.d.vue.ts +3 -0
  209. package/dist/runtime/pages/EponymeDetailPage.vue +83 -0
  210. package/dist/runtime/pages/EponymeDetailPage.vue.d.ts +3 -0
  211. package/dist/runtime/pages/EponymeIndexPage.d.vue.ts +3 -0
  212. package/dist/runtime/pages/EponymeIndexPage.vue +51 -0
  213. package/dist/runtime/pages/EponymeIndexPage.vue.d.ts +3 -0
  214. package/dist/runtime/pages/EponymeLoginPage.d.vue.ts +3 -0
  215. package/dist/runtime/pages/EponymeLoginPage.vue +102 -0
  216. package/dist/runtime/pages/EponymeLoginPage.vue.d.ts +3 -0
  217. package/dist/runtime/pages/EponymeUsersPage.d.vue.ts +3 -0
  218. package/dist/runtime/pages/EponymeUsersPage.vue +261 -0
  219. package/dist/runtime/pages/EponymeUsersPage.vue.d.ts +3 -0
  220. package/dist/runtime/server/api/eponyme/[name].get.d.ts +4 -0
  221. package/dist/runtime/server/api/eponyme/[name].get.js +20 -0
  222. package/dist/runtime/server/api/eponyme/[name].patch.d.ts +11 -0
  223. package/dist/runtime/server/api/eponyme/[name].patch.js +20 -0
  224. package/dist/runtime/server/api/eponyme-auth/change-password.post.d.ts +4 -0
  225. package/dist/runtime/server/api/eponyme-auth/change-password.post.js +21 -0
  226. package/dist/runtime/server/api/eponyme-auth/login.post.d.ts +4 -0
  227. package/dist/runtime/server/api/eponyme-auth/login.post.js +12 -0
  228. package/dist/runtime/server/api/eponyme-auth/logout.post.d.ts +4 -0
  229. package/dist/runtime/server/api/eponyme-auth/logout.post.js +13 -0
  230. package/dist/runtime/server/api/eponyme-auth/session.get.d.ts +4 -0
  231. package/dist/runtime/server/api/eponyme-auth/session.get.js +5 -0
  232. package/dist/runtime/server/api/eponyme-collections/[path].delete.d.ts +4 -0
  233. package/dist/runtime/server/api/eponyme-collections/[path].delete.js +11 -0
  234. package/dist/runtime/server/api/eponyme-collections/[path].get.d.ts +4 -0
  235. package/dist/runtime/server/api/eponyme-collections/[path].get.js +11 -0
  236. package/dist/runtime/server/api/eponyme-collections/[path].post.d.ts +7 -0
  237. package/dist/runtime/server/api/eponyme-collections/[path].post.js +16 -0
  238. package/dist/runtime/server/api/eponyme-forms/[path].delete.d.ts +6 -0
  239. package/dist/runtime/server/api/eponyme-forms/[path].delete.js +19 -0
  240. package/dist/runtime/server/api/eponyme-forms/[path].get.d.ts +4 -0
  241. package/dist/runtime/server/api/eponyme-forms/[path].get.js +22 -0
  242. package/dist/runtime/server/api/eponyme-forms/[path].post.d.ts +19 -0
  243. package/dist/runtime/server/api/eponyme-forms/[path].post.js +36 -0
  244. package/dist/runtime/server/api/eponyme-history/[path].get.d.ts +4 -0
  245. package/dist/runtime/server/api/eponyme-history/[path].get.js +11 -0
  246. package/dist/runtime/server/api/eponyme-history/[path].patch.d.ts +2 -0
  247. package/dist/runtime/server/api/eponyme-history/[path].patch.js +18 -0
  248. package/dist/runtime/server/api/eponyme-sitemap.get.d.ts +4 -0
  249. package/dist/runtime/server/api/eponyme-sitemap.get.js +5 -0
  250. package/dist/runtime/server/api/eponyme-statuses.get.d.ts +4 -0
  251. package/dist/runtime/server/api/eponyme-statuses.get.js +7 -0
  252. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.d.ts +5 -0
  253. package/dist/runtime/server/api/eponyme-users/[id]/reset-password.post.js +12 -0
  254. package/dist/runtime/server/api/eponyme-users/[id].patch.d.ts +4 -0
  255. package/dist/runtime/server/api/eponyme-users/[id].patch.js +14 -0
  256. package/dist/runtime/server/api/eponyme-users/index.get.d.ts +4 -0
  257. package/dist/runtime/server/api/eponyme-users/index.get.js +7 -0
  258. package/dist/runtime/server/api/eponyme-users/index.post.d.ts +5 -0
  259. package/dist/runtime/server/api/eponyme-users/index.post.js +13 -0
  260. package/dist/runtime/server/plugins/eponyme-sync.d.ts +2 -0
  261. package/dist/runtime/server/plugins/eponyme-sync.js +14 -0
  262. package/dist/runtime/server/services/eponyme-auth-service.d.ts +2 -0
  263. package/dist/runtime/server/services/eponyme-auth-service.js +15 -0
  264. package/dist/runtime/server/services/eponyme-auth-store.d.ts +119 -0
  265. package/dist/runtime/server/services/eponyme-auth-store.js +227 -0
  266. package/dist/runtime/server/services/eponyme-form-service.d.ts +3 -0
  267. package/dist/runtime/server/services/eponyme-form-service.js +8 -0
  268. package/dist/runtime/server/services/eponyme-form-store.d.ts +100 -0
  269. package/dist/runtime/server/services/eponyme-form-store.js +109 -0
  270. package/dist/runtime/server/services/eponyme-service.d.ts +3 -0
  271. package/dist/runtime/server/services/eponyme-service.js +8 -0
  272. package/dist/runtime/server/services/eponyme-store.d.ts +202 -0
  273. package/dist/runtime/server/services/eponyme-store.js +338 -0
  274. package/dist/runtime/server/utils/auth.d.ts +11 -0
  275. package/dist/runtime/server/utils/auth.js +41 -0
  276. package/dist/runtime/server/utils/eponyme-form.d.ts +14 -0
  277. package/dist/runtime/server/utils/eponyme-form.js +6 -0
  278. package/dist/runtime/server/utils/eponyme-sitemap.d.ts +7 -0
  279. package/dist/runtime/server/utils/eponyme-sitemap.js +7 -0
  280. package/dist/runtime/server/utils/form-route.d.ts +14 -0
  281. package/dist/runtime/server/utils/form-route.js +14 -0
  282. package/dist/runtime/server/utils/password.d.ts +4 -0
  283. package/dist/runtime/server/utils/password.js +30 -0
  284. package/dist/runtime/types/auth.d.ts +20 -0
  285. package/dist/runtime/types/auth.js +7 -0
  286. package/dist/runtime/types/eponyme-config.d.ts +11 -0
  287. package/dist/runtime/types/eponyme-navigation.d.ts +6 -0
  288. package/dist/runtime/types/eponyme-navigation.js +0 -0
  289. package/dist/runtime/types/eponyme.d.ts +87 -0
  290. package/dist/runtime/types/eponyme.js +0 -0
  291. package/dist/runtime/types/field.d.ts +203 -0
  292. package/dist/runtime/types/field.js +0 -0
  293. package/dist/runtime/types/index.d.ts +3 -0
  294. package/dist/runtime/types/index.js +3 -0
  295. package/dist/runtime/types/nuxt.d.ts +11 -0
  296. package/dist/runtime/utils/as-record.d.ts +1 -0
  297. package/dist/runtime/utils/as-record.js +3 -0
  298. package/dist/runtime/utils/build-eponyme-schema.d.ts +22 -0
  299. package/dist/runtime/utils/build-eponyme-schema.js +42 -0
  300. package/dist/runtime/utils/changed-paths.d.ts +6 -0
  301. package/dist/runtime/utils/changed-paths.js +25 -0
  302. package/dist/runtime/utils/create-default-eponyme-data.d.ts +5 -0
  303. package/dist/runtime/utils/create-default-eponyme-data.js +12 -0
  304. package/dist/runtime/utils/field-path.d.ts +14 -0
  305. package/dist/runtime/utils/field-path.js +23 -0
  306. package/dist/runtime/utils/get-eponyme-schemas.d.ts +7 -0
  307. package/dist/runtime/utils/get-eponyme-schemas.js +33 -0
  308. package/dist/runtime/utils/get-field-default-value.d.ts +4 -0
  309. package/dist/runtime/utils/get-field-default-value.js +56 -0
  310. package/dist/runtime/utils/humanize-label.d.ts +6 -0
  311. package/dist/runtime/utils/humanize-label.js +3 -0
  312. package/dist/runtime/utils/initials.d.ts +1 -0
  313. package/dist/runtime/utils/initials.js +3 -0
  314. package/dist/runtime/utils/is-field-visible.d.ts +2 -0
  315. package/dist/runtime/utils/is-field-visible.js +14 -0
  316. package/dist/runtime/utils/normalize-hex-color.d.ts +8 -0
  317. package/dist/runtime/utils/normalize-hex-color.js +11 -0
  318. package/dist/runtime/utils/normalize-slug.d.ts +1 -0
  319. package/dist/runtime/utils/normalize-slug.js +4 -0
  320. package/dist/runtime/utils/preview.d.ts +30 -0
  321. package/dist/runtime/utils/preview.js +30 -0
  322. package/dist/runtime/utils/validate-eponyme-data.d.ts +10 -0
  323. package/dist/runtime/utils/validate-eponyme-data.js +204 -0
  324. package/dist/types.d.mts +11 -0
  325. package/package.json +96 -0
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ user: import("../../../types/index.js").EponymeAuthUser | null;
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { getEponymeEventUser } from "../../utils/auth.js";
3
+ export default defineEventHandler(async (event) => ({
4
+ user: await getEponymeEventUser(event) ?? null
5
+ }));
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ deleted: boolean;
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { createError, defineEventHandler, getRequestURL } from "h3";
2
+ import { useEponymeService } from "../../services/eponyme-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ await requireEponymeUser(event, { roles: ["editor", "owner"] });
7
+ const name = decodeURIComponent(getRequestURL(event).pathname.replace(/^\/api\/eponyme-collections\//, ""));
8
+ if (!name || !await useEponymeService().deleteCollectionEntry(name))
9
+ throw createError({ statusCode: 404, statusMessage: "Eponyme collection entry not found." });
10
+ return { deleted: true };
11
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ entries: import("../../services/eponyme-store.js").EponymeCollectionEntry<Record<string, unknown>>[];
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { createError, defineEventHandler, getQuery, getRequestURL } from "h3";
2
+ import { useEponymeService } from "../../services/eponyme-service.js";
3
+ import { requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ const name = decodeURIComponent(getRequestURL(event).pathname.replace(/^\/api\/eponyme-collections\//, ""));
6
+ const version = getQuery(event).version === "draft" ? "draft" : "published";
7
+ if (version === "draft") await requireEponymeUser(event);
8
+ const entries = name ? await useEponymeService().listCollection(name, version) : void 0;
9
+ if (!entries) throw createError({ statusCode: 404, statusMessage: "Eponyme collection not found." });
10
+ return { entries };
11
+ });
@@ -0,0 +1,7 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<(import("../../services/eponyme-store.js").EponymeResult & {
2
+ slug: string;
3
+ errors?: never;
4
+ }) | {
5
+ errors: import("../../../utils/validate-eponyme-data.js").ValidationErrors;
6
+ }>>;
7
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { createError, defineEventHandler, getRequestURL, readBody, setResponseStatus } from "h3";
2
+ import { useEponymeService } from "../../services/eponyme-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ const user = await requireEponymeUser(event, { roles: ["editor", "owner"] });
7
+ const name = decodeURIComponent(getRequestURL(event).pathname.replace(/^\/api\/eponyme-collections\//, ""));
8
+ const result = name ? await useEponymeService().createCollectionEntry(name, await readBody(event), user.id) : void 0;
9
+ if (!result) throw createError({ statusCode: 404, statusMessage: "Eponyme collection not found." });
10
+ if (result.errors) {
11
+ setResponseStatus(event, 422);
12
+ return { errors: result.errors };
13
+ }
14
+ setResponseStatus(event, 201);
15
+ return result;
16
+ });
@@ -0,0 +1,6 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ deleted: number;
3
+ } | {
4
+ deleted: boolean;
5
+ }>>;
6
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { useEponymeFormService } from "../../services/eponyme-form-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ import { readEponymeFormRoute } from "../../utils/form-route.js";
5
+ export default defineEventHandler(async (event) => {
6
+ assertEponymeMutationOrigin(event);
7
+ await requireEponymeUser(event, { roles: ["editor", "owner"] });
8
+ const route = readEponymeFormRoute(event);
9
+ if (!route?.submissions) throw createError({ statusCode: 404, statusMessage: "Eponyme submission not found." });
10
+ const service = useEponymeFormService();
11
+ if (!route.submissionId) {
12
+ const deleted = await service.deleteAllSubmissions(route.name);
13
+ if (deleted === void 0) throw createError({ statusCode: 404, statusMessage: "Eponyme form not found." });
14
+ return { deleted };
15
+ }
16
+ if (!await service.deleteSubmission(route.name, route.submissionId))
17
+ throw createError({ statusCode: 404, statusMessage: "Eponyme submission not found." });
18
+ return { deleted: true };
19
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<import("../../services/eponyme-form-store.js").EponymeFormSubmissionPage | {
2
+ submission: import("../../services/eponyme-form-store.js").EponymeFormSubmission;
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { createError, defineEventHandler, getQuery } from "h3";
2
+ import { useEponymeFormService } from "../../services/eponyme-form-service.js";
3
+ import { requireEponymeUser } from "../../utils/auth.js";
4
+ import { readEponymeFormRoute } from "../../utils/form-route.js";
5
+ export default defineEventHandler(async (event) => {
6
+ await requireEponymeUser(event);
7
+ const route = readEponymeFormRoute(event);
8
+ if (!route?.submissions) throw createError({ statusCode: 404, statusMessage: "Eponyme form not found." });
9
+ const service = useEponymeFormService();
10
+ if (route.submissionId) {
11
+ const submission = await service.getSubmission(route.name, route.submissionId);
12
+ if (!submission) throw createError({ statusCode: 404, statusMessage: "Eponyme submission not found." });
13
+ return { submission };
14
+ }
15
+ const query = getQuery(event);
16
+ const page = await service.listSubmissions(route.name, {
17
+ page: Number(query.page ?? 1),
18
+ perPage: query.perPage === void 0 ? void 0 : Number(query.perPage)
19
+ });
20
+ if (!page) throw createError({ statusCode: 404, statusMessage: "Eponyme form not found." });
21
+ return page;
22
+ });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The only unauthenticated write route in the module. Order matters: reject an
3
+ * oversized body before parsing it, and answer a normal success to a triggered
4
+ * honeypot so a bot learns nothing from the response.
5
+ */
6
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
7
+ submitted: boolean;
8
+ errors?: undefined;
9
+ id?: undefined;
10
+ } | {
11
+ errors: import("../../../utils/validate-eponyme-data.js").ValidationErrors;
12
+ submitted?: undefined;
13
+ id?: undefined;
14
+ } | {
15
+ submitted: boolean;
16
+ id: string;
17
+ errors?: undefined;
18
+ }>>;
19
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { createError, defineEventHandler, getRequestHeader, readRawBody, setResponseHeader, setResponseStatus } from "h3";
2
+ import { useEponymeFormService } from "../../services/eponyme-form-service.js";
3
+ import { readEponymeFormRoute } from "../../utils/form-route.js";
4
+ export default defineEventHandler(async (event) => {
5
+ const route = readEponymeFormRoute(event);
6
+ const service = useEponymeFormService();
7
+ const definition = route && !route.submissions ? service.getForm(route.name) : void 0;
8
+ if (!route || !definition || definition.submission.mode !== "managed")
9
+ throw createError({ statusCode: 404, statusMessage: "Eponyme form not found." });
10
+ setResponseHeader(event, "Cache-Control", "no-store");
11
+ const declaredLength = Number(getRequestHeader(event, "content-length"));
12
+ if (Number.isFinite(declaredLength) && declaredLength > definition.maxBodyBytes)
13
+ throw createError({ statusCode: 413, statusMessage: "Submission is too large." });
14
+ const raw = await readRawBody(event, "utf8");
15
+ if (raw && Buffer.byteLength(raw, "utf8") > definition.maxBodyBytes)
16
+ throw createError({ statusCode: 413, statusMessage: "Submission is too large." });
17
+ let payload;
18
+ try {
19
+ payload = raw ? JSON.parse(raw) : void 0;
20
+ } catch {
21
+ setResponseStatus(event, 422);
22
+ return { errors: { _form: ["Body must be valid JSON."] } };
23
+ }
24
+ if (service.isHoneypotTriggered(route.name, payload)) {
25
+ setResponseStatus(event, 201);
26
+ return { submitted: true };
27
+ }
28
+ const result = await service.submit(route.name, payload);
29
+ if (!result) throw createError({ statusCode: 404, statusMessage: "Eponyme form not found." });
30
+ if ("errors" in result) {
31
+ setResponseStatus(event, 422);
32
+ return { errors: result.errors };
33
+ }
34
+ setResponseStatus(event, 201);
35
+ return { submitted: true, id: result.submission.id };
36
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ history: import("../../services/eponyme-store.js").EponymeHistoryEntry[];
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { createError, defineEventHandler, getQuery, getRequestURL } from "h3";
2
+ import { useEponymeService } from "../../services/eponyme-service.js";
3
+ import { requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ await requireEponymeUser(event);
6
+ const name = decodeURIComponent(getRequestURL(event).pathname.replace(/^\/api\/eponyme-history\//, ""));
7
+ const requestedLimit = Number(getQuery(event).limit ?? 50);
8
+ const history = name ? await useEponymeService().history(name, Number.isFinite(requestedLimit) ? requestedLimit : 50) : void 0;
9
+ if (!history) throw createError({ statusCode: 404, statusMessage: "Eponyme entry not found." });
10
+ return { history };
11
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<import("../../services/eponyme-store.js").EponymeResult | import("../../services/eponyme-store.js").EponymeConflict>>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { createError, defineEventHandler, getRequestURL } from "h3";
2
+ import { useEponymeService } from "../../services/eponyme-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ const user = await requireEponymeUser(event, { roles: ["editor", "owner"] });
7
+ const path = decodeURIComponent(getRequestURL(event).pathname.replace(/^\/api\/eponyme-history\//, ""));
8
+ const match = path.match(/^(.+)\/(\d+)$/);
9
+ if (!match) throw createError({ statusCode: 400, statusMessage: "A valid version id is required." });
10
+ const [, name, rawVersionId] = match;
11
+ const versionId = Number(rawVersionId);
12
+ if (!Number.isSafeInteger(versionId)) throw createError({ statusCode: 404, statusMessage: "Eponyme version not found." });
13
+ const result = await useEponymeService().restore(name, versionId, user.id);
14
+ if (!result) throw createError({ statusCode: 404, statusMessage: "Eponyme version not found." });
15
+ if ("conflict" in result && result.conflict)
16
+ throw createError({ statusCode: 409, message: "This entry was changed by someone else. Reload the page to get the latest version." });
17
+ return result;
18
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ entries: import("../services/eponyme-store.js").EponymeSitemapEntry[];
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { getEponymeSitemapEntries } from "../utils/eponyme-sitemap.js";
3
+ export default defineEventHandler(async () => {
4
+ return { entries: await getEponymeSitemapEntries() };
5
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ statuses: Record<string, import("../services/eponyme-store.js").EponymeStatus>;
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { useEponymeService } from "../services/eponyme-service.js";
3
+ import { requireEponymeUser } from "../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ await requireEponymeUser(event);
6
+ return { statuses: await useEponymeService().statuses() };
7
+ });
@@ -0,0 +1,5 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ user: import("../../../../types/index.js").EponymeAuthUser;
3
+ temporaryPassword: string;
4
+ }>>;
5
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
2
+ import { useEponymeAuthService } from "../../../services/eponyme-auth-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ await requireEponymeUser(event, { roles: ["owner"] });
7
+ const id = getRouterParam(event, "id", { decode: true });
8
+ const result = id ? await useEponymeAuthService().resetPassword(id) : void 0;
9
+ if (!result?.result)
10
+ throw createError({ statusCode: 404, message: result?.error ?? "User not found." });
11
+ return result.result;
12
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ user: import("../../../types/index.js").EponymeAuthUser;
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
2
+ import { useEponymeAuthService } from "../../services/eponyme-auth-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ await requireEponymeUser(event, { roles: ["owner"] });
7
+ const id = getRouterParam(event, "id", { decode: true });
8
+ if (!id) throw createError({ statusCode: 404, message: "User not found." });
9
+ const body = await readBody(event);
10
+ const result = await useEponymeAuthService().updateUser(id, body ?? {});
11
+ if (!result.user)
12
+ throw createError({ statusCode: result.notFound ? 404 : 422, message: result.error });
13
+ return { user: result.user };
14
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ users: import("../../../types/index.js").EponymeAuthUser[];
3
+ }>>;
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { useEponymeAuthService } from "../../services/eponyme-auth-service.js";
3
+ import { requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ await requireEponymeUser(event, { roles: ["owner"] });
6
+ return { users: await useEponymeAuthService().listUsers() };
7
+ });
@@ -0,0 +1,5 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ user: import("../../../types/index.js").EponymeAuthUser;
3
+ temporaryPassword: string;
4
+ }>>;
5
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { createError, defineEventHandler, readBody, setResponseStatus } from "h3";
2
+ import { useEponymeAuthService } from "../../services/eponyme-auth-service.js";
3
+ import { assertEponymeMutationOrigin, requireEponymeUser } from "../../utils/auth.js";
4
+ export default defineEventHandler(async (event) => {
5
+ assertEponymeMutationOrigin(event);
6
+ await requireEponymeUser(event, { roles: ["owner"] });
7
+ const body = await readBody(event);
8
+ const created = await useEponymeAuthService().createUser(body?.username, body?.role);
9
+ if (!created.result)
10
+ throw createError({ statusCode: 422, statusMessage: created.error ?? "Unable to create user." });
11
+ setResponseStatus(event, 201);
12
+ return created.result;
13
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("nitropack/types").NitroAppPlugin;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { defineNitroPlugin } from "nitropack/runtime";
2
+ import { useEponymeAuthService } from "../services/eponyme-auth-service.js";
3
+ import { useEponymeService } from "../services/eponyme-service.js";
4
+ export default defineNitroPlugin(async () => {
5
+ try {
6
+ await useEponymeAuthService().bootstrapOwner();
7
+ } catch (error) {
8
+ throw new Error(
9
+ "[Eponyme] Authentication bootstrap failed. Apply the EponymeUser and EponymeUserSession Prisma migration before starting the application.",
10
+ { cause: error }
11
+ );
12
+ }
13
+ await useEponymeService().syncAll();
14
+ });
@@ -0,0 +1,2 @@
1
+ import { EponymeAuthService } from './eponyme-auth-store.js';
2
+ export declare function useEponymeAuthService(): EponymeAuthService;
@@ -0,0 +1,15 @@
1
+ import prisma from "#eponyme/prisma";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
3
+ import { EponymeAuthService } from "./eponyme-auth-store.js";
4
+ let authService;
5
+ export function useEponymeAuthService() {
6
+ if (!authService) {
7
+ const config = useRuntimeConfig();
8
+ const authConfig = config.eponymeAuth;
9
+ authService = new EponymeAuthService(
10
+ prisma,
11
+ authConfig?.sessionDurationDays ?? 7
12
+ );
13
+ }
14
+ return authService;
15
+ }
@@ -0,0 +1,119 @@
1
+ import type { EponymeAuthUser } from '../../types/index.js';
2
+ type DateValue = Date | string;
3
+ export interface PrismaEponymeUserRow {
4
+ id: string;
5
+ username: string;
6
+ usernameNormalized: string;
7
+ passwordHash: string;
8
+ role: string;
9
+ active: boolean;
10
+ mustChangePassword: boolean;
11
+ failedLoginAttempts: number;
12
+ lockedUntil: DateValue | null;
13
+ createdAt: DateValue;
14
+ updatedAt: DateValue;
15
+ }
16
+ export interface PrismaEponymeSessionRow {
17
+ id: string;
18
+ tokenHash: string;
19
+ userId: string;
20
+ expiresAt: DateValue;
21
+ createdAt: DateValue;
22
+ user?: PrismaEponymeUserRow;
23
+ }
24
+ export interface PrismaEponymeAuthClient {
25
+ eponymeUser: {
26
+ count(args?: {
27
+ where?: Record<string, unknown>;
28
+ }): Promise<number>;
29
+ create(args: {
30
+ data: Record<string, unknown>;
31
+ }): Promise<PrismaEponymeUserRow>;
32
+ findUnique(args: {
33
+ where: Record<string, unknown>;
34
+ }): Promise<PrismaEponymeUserRow | null>;
35
+ findMany(args: {
36
+ orderBy: Record<string, 'asc' | 'desc'>;
37
+ }): Promise<PrismaEponymeUserRow[]>;
38
+ update(args: {
39
+ where: Record<string, unknown>;
40
+ data: Record<string, unknown>;
41
+ }): Promise<PrismaEponymeUserRow>;
42
+ };
43
+ eponymeUserSession: {
44
+ create(args: {
45
+ data: Record<string, unknown>;
46
+ }): Promise<PrismaEponymeSessionRow>;
47
+ findUnique(args: {
48
+ where: Record<string, unknown>;
49
+ include: {
50
+ user: true;
51
+ };
52
+ }): Promise<PrismaEponymeSessionRow | null>;
53
+ delete(args: {
54
+ where: Record<string, unknown>;
55
+ }): Promise<PrismaEponymeSessionRow>;
56
+ deleteMany(args: {
57
+ where: Record<string, unknown>;
58
+ }): Promise<{
59
+ count: number;
60
+ }>;
61
+ };
62
+ /** Optional so tests can pass a plain fake client; real Prisma clients always provide it. */
63
+ $transaction?: <T>(fn: (tx: PrismaEponymeAuthClient) => Promise<T>, options?: {
64
+ isolationLevel?: 'Serializable';
65
+ }) => Promise<T>;
66
+ }
67
+ export interface CreatedSession {
68
+ token: string;
69
+ expiresAt: Date;
70
+ user: EponymeAuthUser;
71
+ }
72
+ export type LoginResult = {
73
+ ok: true;
74
+ session: CreatedSession;
75
+ } | {
76
+ ok: false;
77
+ reason: 'invalid' | 'locked';
78
+ };
79
+ export declare class EponymeAuthService {
80
+ private readonly client;
81
+ private readonly sessionDurationDays;
82
+ constructor(client: PrismaEponymeAuthClient, sessionDurationDays?: number);
83
+ bootstrapOwner(log?: (message: string) => void): Promise<boolean>;
84
+ login(username: unknown, password: unknown): Promise<LoginResult>;
85
+ getSession(token: string | undefined): Promise<CreatedSession | undefined>;
86
+ logout(token: string | undefined): Promise<void>;
87
+ changePassword(userId: string, currentPassword: unknown, newPassword: unknown): Promise<{
88
+ session?: CreatedSession;
89
+ error?: string;
90
+ }>;
91
+ listUsers(): Promise<EponymeAuthUser[]>;
92
+ createUser(username: unknown, role: unknown): Promise<{
93
+ result?: {
94
+ user: EponymeAuthUser;
95
+ temporaryPassword: string;
96
+ };
97
+ error?: string;
98
+ }>;
99
+ updateUser(id: string, changes: {
100
+ role?: unknown;
101
+ active?: unknown;
102
+ }): Promise<{
103
+ user?: EponymeAuthUser;
104
+ error?: string;
105
+ notFound?: boolean;
106
+ }>;
107
+ resetPassword(id: string): Promise<{
108
+ result?: {
109
+ user: EponymeAuthUser;
110
+ temporaryPassword: string;
111
+ };
112
+ error?: string;
113
+ }>;
114
+ private createSession;
115
+ private recordFailedLogin;
116
+ }
117
+ export declare function normalizeUsername(username: string): string;
118
+ export declare function validateUsername(username: unknown): string | undefined;
119
+ export {};