@vitnode/core 1.2.0-canary.10

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 (569) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/emails/my-email.d.ts +2 -0
  3. package/dist/emails/my-email.d.ts.map +1 -0
  4. package/dist/scripts/get-config.d.ts +3 -0
  5. package/dist/scripts/get-config.d.ts.map +1 -0
  6. package/dist/scripts/plugin.d.ts +4 -0
  7. package/dist/scripts/plugin.d.ts.map +1 -0
  8. package/dist/scripts/prepare-database.d.ts +7 -0
  9. package/dist/scripts/prepare-database.d.ts.map +1 -0
  10. package/dist/scripts/prepare-plugins-files.d.ts +2 -0
  11. package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
  12. package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
  13. package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
  14. package/dist/scripts/scripts.d.ts +3 -0
  15. package/dist/scripts/scripts.d.ts.map +1 -0
  16. package/dist/scripts/scripts.js +21 -0
  17. package/dist/scripts/shared/file-utils.d.ts +14 -0
  18. package/dist/scripts/shared/file-utils.d.ts.map +1 -0
  19. package/dist/src/api/config.d.ts +24 -0
  20. package/dist/src/api/config.d.ts.map +1 -0
  21. package/dist/src/api/config.js +50 -0
  22. package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
  23. package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
  24. package/dist/src/api/lib/check-plugin-id.js +15 -0
  25. package/dist/src/api/lib/get-user-ip.d.ts +3 -0
  26. package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
  27. package/dist/src/api/lib/get-user-ip.js +8 -0
  28. package/dist/src/api/lib/module.d.ts +23 -0
  29. package/dist/src/api/lib/module.d.ts.map +1 -0
  30. package/dist/src/api/lib/module.js +21 -0
  31. package/dist/src/api/lib/plugin.d.ts +11 -0
  32. package/dist/src/api/lib/plugin.d.ts.map +1 -0
  33. package/dist/src/api/lib/plugin.js +14 -0
  34. package/dist/src/api/lib/route.d.ts +26 -0
  35. package/dist/src/api/lib/route.d.ts.map +1 -0
  36. package/dist/src/api/lib/route.js +23 -0
  37. package/dist/src/api/lib/with-pagination.d.ts +72 -0
  38. package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
  39. package/dist/src/api/lib/with-pagination.js +70 -0
  40. package/dist/src/api/middlewares/global/global.d.ts +66 -0
  41. package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
  42. package/dist/src/api/middlewares/global/global.js +47 -0
  43. package/dist/src/api/models/device.d.ts +10 -0
  44. package/dist/src/api/models/device.d.ts.map +1 -0
  45. package/dist/src/api/models/device.js +54 -0
  46. package/dist/src/api/models/email.d.ts +22 -0
  47. package/dist/src/api/models/email.d.ts.map +1 -0
  48. package/dist/src/api/models/email.js +30 -0
  49. package/dist/src/api/models/password.d.ts +5 -0
  50. package/dist/src/api/models/password.d.ts.map +1 -0
  51. package/dist/src/api/models/password.js +21 -0
  52. package/dist/src/api/models/session-admin.d.ts +24 -0
  53. package/dist/src/api/models/session-admin.d.ts.map +1 -0
  54. package/dist/src/api/models/session-admin.js +73 -0
  55. package/dist/src/api/models/session.d.ts +23 -0
  56. package/dist/src/api/models/session.d.ts.map +1 -0
  57. package/dist/src/api/models/session.js +60 -0
  58. package/dist/src/api/models/sso.d.ts +38 -0
  59. package/dist/src/api/models/sso.d.ts.map +1 -0
  60. package/dist/src/api/models/sso.js +120 -0
  61. package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
  62. package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
  63. package/dist/src/api/models/user/get-user-by-id.js +18 -0
  64. package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
  65. package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
  66. package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
  67. package/dist/src/api/models/user/sign-up.d.ts +21 -0
  68. package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
  69. package/dist/src/api/models/user/sign-up.js +75 -0
  70. package/dist/src/api/models/user.d.ts +45 -0
  71. package/dist/src/api/models/user.d.ts.map +1 -0
  72. package/dist/src/api/models/user.js +8 -0
  73. package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
  74. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
  75. package/dist/src/api/modules/admin/admin.module.js +14 -0
  76. package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
  77. package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
  78. package/dist/src/api/modules/admin/routes/session.route.js +51 -0
  79. package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
  80. package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
  81. package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
  82. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
  83. package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
  84. package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
  85. package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
  86. package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
  87. package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
  88. package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
  89. package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
  90. package/dist/src/api/modules/middleware/middleware.module.js +10 -0
  91. package/dist/src/api/modules/middleware/route.d.ts +53 -0
  92. package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
  93. package/dist/src/api/modules/middleware/route.js +39 -0
  94. package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
  95. package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
  96. package/dist/src/api/modules/users/avatar-color.js +43 -0
  97. package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
  98. package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
  99. package/dist/src/api/modules/users/routes/session.route.js +46 -0
  100. package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
  101. package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
  102. package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
  103. package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
  104. package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
  105. package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
  106. package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
  107. package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
  108. package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
  109. package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
  110. package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
  111. package/dist/src/api/modules/users/routes/test.route.js +32 -0
  112. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
  113. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
  114. package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
  115. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
  116. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
  117. package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
  118. package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
  119. package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
  120. package/dist/src/api/modules/users/sso/sso.module.js +12 -0
  121. package/dist/src/api/modules/users/users.module.d.ts +439 -0
  122. package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
  123. package/dist/src/api/modules/users/users.module.js +22 -0
  124. package/dist/src/api/plugin.d.ts +2 -0
  125. package/dist/src/api/plugin.d.ts.map +1 -0
  126. package/dist/src/api/plugin.js +13 -0
  127. package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
  128. package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
  129. package/dist/src/api/plugins/email/nodemailer.js +30 -0
  130. package/dist/src/api/plugins/email/resend.d.ts +6 -0
  131. package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
  132. package/dist/src/api/plugins/email/resend.js +21 -0
  133. package/dist/src/api/plugins/sso/discord.d.ts +6 -0
  134. package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
  135. package/dist/src/api/plugins/sso/discord.js +77 -0
  136. package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
  137. package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
  138. package/dist/src/api/plugins/sso/facebook.js +76 -0
  139. package/dist/src/api/plugins/sso/google.d.ts +6 -0
  140. package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
  141. package/dist/src/api/plugins/sso/google.js +87 -0
  142. package/dist/src/app/login/page.d.ts +6 -0
  143. package/dist/src/app/login/page.d.ts.map +1 -0
  144. package/dist/src/app/login/page.js +15 -0
  145. package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
  146. package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
  147. package/dist/src/app/login/sso/[providerId]/page.js +10 -0
  148. package/dist/src/app/register/page.d.ts +6 -0
  149. package/dist/src/app/register/page.d.ts.map +1 -0
  150. package/dist/src/app/register/page.js +15 -0
  151. package/dist/src/app_admin/core/page.d.ts +2 -0
  152. package/dist/src/app_admin/core/page.d.ts.map +1 -0
  153. package/dist/src/app_admin/core/page.js +5 -0
  154. package/dist/src/app_admin/core/test/page.d.ts +2 -0
  155. package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
  156. package/dist/src/app_admin/core/test/page.js +5 -0
  157. package/dist/src/app_admin/core/users/page.d.ts +6 -0
  158. package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
  159. package/dist/src/app_admin/core/users/page.js +35 -0
  160. package/dist/src/components/avatar.d.ts +10 -0
  161. package/dist/src/components/avatar.d.ts.map +1 -0
  162. package/dist/src/components/avatar.js +14 -0
  163. package/dist/src/components/date-format.d.ts +5 -0
  164. package/dist/src/components/date-format.d.ts.map +1 -0
  165. package/dist/src/components/date-format.js +38 -0
  166. package/dist/src/components/form/auto-form.d.ts +12 -0
  167. package/dist/src/components/form/auto-form.d.ts.map +1 -0
  168. package/dist/src/components/form/auto-form.js +57 -0
  169. package/dist/src/components/form/common/desc.d.ts +2 -0
  170. package/dist/src/components/form/common/desc.d.ts.map +1 -0
  171. package/dist/src/components/form/common/desc.js +9 -0
  172. package/dist/src/components/form/common/label.d.ts +3 -0
  173. package/dist/src/components/form/common/label.d.ts.map +1 -0
  174. package/dist/src/components/form/common/label.js +8 -0
  175. package/dist/src/components/form/fields/checkbox.d.ts +8 -0
  176. package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
  177. package/dist/src/components/form/fields/checkbox.js +35 -0
  178. package/dist/src/components/form/fields/combobox.d.ts +14 -0
  179. package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
  180. package/dist/src/components/form/fields/combobox.js +88 -0
  181. package/dist/src/components/form/fields/input.d.ts +9 -0
  182. package/dist/src/components/form/fields/input.d.ts.map +1 -0
  183. package/dist/src/components/form/fields/input.js +34 -0
  184. package/dist/src/components/form/fields/item.d.ts +14 -0
  185. package/dist/src/components/form/fields/item.d.ts.map +1 -0
  186. package/dist/src/components/form/fields/item.js +22 -0
  187. package/dist/src/components/form/fields/radio-group.d.ts +13 -0
  188. package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
  189. package/dist/src/components/form/fields/radio-group.js +51 -0
  190. package/dist/src/components/form/fields/select.d.ts +14 -0
  191. package/dist/src/components/form/fields/select.d.ts.map +1 -0
  192. package/dist/src/components/form/fields/select.js +59 -0
  193. package/dist/src/components/form/fields/switch.d.ts +8 -0
  194. package/dist/src/components/form/fields/switch.d.ts.map +1 -0
  195. package/dist/src/components/form/fields/switch.js +35 -0
  196. package/dist/src/components/form/fields/textarea.d.ts +9 -0
  197. package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
  198. package/dist/src/components/form/fields/textarea.js +34 -0
  199. package/dist/src/components/i18n-provider.d.ts +7 -0
  200. package/dist/src/components/i18n-provider.d.ts.map +1 -0
  201. package/dist/src/components/i18n-provider.js +43 -0
  202. package/dist/src/components/logo-vitnode.d.ts +4 -0
  203. package/dist/src/components/logo-vitnode.d.ts.map +1 -0
  204. package/dist/src/components/logo-vitnode.js +113 -0
  205. package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
  206. package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
  207. package/dist/src/components/switchers/theme-switcher.js +25 -0
  208. package/dist/src/components/table/content.d.ts +3 -0
  209. package/dist/src/components/table/content.d.ts.map +1 -0
  210. package/dist/src/components/table/content.js +84 -0
  211. package/dist/src/components/table/data-table.d.ts +37 -0
  212. package/dist/src/components/table/data-table.d.ts.map +1 -0
  213. package/dist/src/components/table/data-table.js +69 -0
  214. package/dist/src/components/table/order-table-head.d.ts +7 -0
  215. package/dist/src/components/table/order-table-head.d.ts.map +1 -0
  216. package/dist/src/components/table/order-table-head.js +39 -0
  217. package/dist/src/components/table/pagination.d.ts +11 -0
  218. package/dist/src/components/table/pagination.d.ts.map +1 -0
  219. package/dist/src/components/table/pagination.js +122 -0
  220. package/dist/src/components/ui/accordion.d.ts +8 -0
  221. package/dist/src/components/ui/accordion.d.ts.map +1 -0
  222. package/dist/src/components/ui/accordion.js +47 -0
  223. package/dist/src/components/ui/alert-dialog.d.ts +15 -0
  224. package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
  225. package/dist/src/components/ui/alert-dialog.js +86 -0
  226. package/dist/src/components/ui/alert.d.ts +10 -0
  227. package/dist/src/components/ui/alert.d.ts.map +1 -0
  228. package/dist/src/components/ui/alert.js +40 -0
  229. package/dist/src/components/ui/badge.d.ts +10 -0
  230. package/dist/src/components/ui/badge.d.ts.map +1 -0
  231. package/dist/src/components/ui/badge.js +29 -0
  232. package/dist/src/components/ui/button.d.ts +13 -0
  233. package/dist/src/components/ui/button.d.ts.map +1 -0
  234. package/dist/src/components/ui/button.js +66 -0
  235. package/dist/src/components/ui/card.d.ts +10 -0
  236. package/dist/src/components/ui/card.d.ts.map +1 -0
  237. package/dist/src/components/ui/card.js +53 -0
  238. package/dist/src/components/ui/checkbox.d.ts +5 -0
  239. package/dist/src/components/ui/checkbox.d.ts.map +1 -0
  240. package/dist/src/components/ui/checkbox.js +21 -0
  241. package/dist/src/components/ui/collapsible.d.ts +6 -0
  242. package/dist/src/components/ui/collapsible.d.ts.map +1 -0
  243. package/dist/src/components/ui/collapsible.js +22 -0
  244. package/dist/src/components/ui/command.d.ts +19 -0
  245. package/dist/src/components/ui/command.d.ts.map +1 -0
  246. package/dist/src/components/ui/command.js +99 -0
  247. package/dist/src/components/ui/context-menu.d.ts +26 -0
  248. package/dist/src/components/ui/context-menu.d.ts.map +1 -0
  249. package/dist/src/components/ui/context-menu.js +141 -0
  250. package/dist/src/components/ui/dialog.d.ts +23 -0
  251. package/dist/src/components/ui/dialog.d.ts.map +1 -0
  252. package/dist/src/components/ui/dialog.js +181 -0
  253. package/dist/src/components/ui/drawer.d.ts +14 -0
  254. package/dist/src/components/ui/drawer.d.ts.map +1 -0
  255. package/dist/src/components/ui/drawer.js +84 -0
  256. package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
  257. package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
  258. package/dist/src/components/ui/dropdown-menu.js +142 -0
  259. package/dist/src/components/ui/form.d.ts +33 -0
  260. package/dist/src/components/ui/form.d.ts.map +1 -0
  261. package/dist/src/components/ui/form.js +142 -0
  262. package/dist/src/components/ui/header-content.d.ts +17 -0
  263. package/dist/src/components/ui/header-content.d.ts.map +1 -0
  264. package/dist/src/components/ui/header-content.js +30 -0
  265. package/dist/src/components/ui/hover-card.d.ts +7 -0
  266. package/dist/src/components/ui/hover-card.d.ts.map +1 -0
  267. package/dist/src/components/ui/hover-card.js +30 -0
  268. package/dist/src/components/ui/input-otp.d.ts +12 -0
  269. package/dist/src/components/ui/input-otp.d.ts.map +1 -0
  270. package/dist/src/components/ui/input-otp.js +49 -0
  271. package/dist/src/components/ui/input.d.ts +4 -0
  272. package/dist/src/components/ui/input.d.ts.map +1 -0
  273. package/dist/src/components/ui/input.js +12 -0
  274. package/dist/src/components/ui/label.d.ts +5 -0
  275. package/dist/src/components/ui/label.d.ts.map +1 -0
  276. package/dist/src/components/ui/label.js +13 -0
  277. package/dist/src/components/ui/loader.d.ts +5 -0
  278. package/dist/src/components/ui/loader.d.ts.map +1 -0
  279. package/dist/src/components/ui/loader.js +16 -0
  280. package/dist/src/components/ui/menubar.d.ts +27 -0
  281. package/dist/src/components/ui/menubar.d.ts.map +1 -0
  282. package/dist/src/components/ui/menubar.js +152 -0
  283. package/dist/src/components/ui/navigation-menu.d.ts +15 -0
  284. package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
  285. package/dist/src/components/ui/navigation-menu.js +83 -0
  286. package/dist/src/components/ui/popover.d.ts +8 -0
  287. package/dist/src/components/ui/popover.d.ts.map +1 -0
  288. package/dist/src/components/ui/popover.js +35 -0
  289. package/dist/src/components/ui/progress.d.ts +5 -0
  290. package/dist/src/components/ui/progress.d.ts.map +1 -0
  291. package/dist/src/components/ui/progress.js +20 -0
  292. package/dist/src/components/ui/radio-group.d.ts +6 -0
  293. package/dist/src/components/ui/radio-group.d.ts.map +1 -0
  294. package/dist/src/components/ui/radio-group.js +28 -0
  295. package/dist/src/components/ui/select.d.ts +16 -0
  296. package/dist/src/components/ui/select.d.ts.map +1 -0
  297. package/dist/src/components/ui/select.js +114 -0
  298. package/dist/src/components/ui/separator.d.ts +5 -0
  299. package/dist/src/components/ui/separator.d.ts.map +1 -0
  300. package/dist/src/components/ui/separator.js +15 -0
  301. package/dist/src/components/ui/sheet.d.ts +14 -0
  302. package/dist/src/components/ui/sheet.d.ts.map +1 -0
  303. package/dist/src/components/ui/sheet.js +93 -0
  304. package/dist/src/components/ui/sidebar.d.ts +70 -0
  305. package/dist/src/components/ui/sidebar.d.ts.map +1 -0
  306. package/dist/src/components/ui/sidebar.js +437 -0
  307. package/dist/src/components/ui/skeleton.d.ts +3 -0
  308. package/dist/src/components/ui/skeleton.d.ts.map +1 -0
  309. package/dist/src/components/ui/skeleton.js +10 -0
  310. package/dist/src/components/ui/slider.d.ts +5 -0
  311. package/dist/src/components/ui/slider.d.ts.map +1 -0
  312. package/dist/src/components/ui/slider.js +42 -0
  313. package/dist/src/components/ui/sonner.d.ts +4 -0
  314. package/dist/src/components/ui/sonner.d.ts.map +1 -0
  315. package/dist/src/components/ui/sonner.js +26 -0
  316. package/dist/src/components/ui/switch.d.ts +5 -0
  317. package/dist/src/components/ui/switch.d.ts.map +1 -0
  318. package/dist/src/components/ui/switch.js +17 -0
  319. package/dist/src/components/ui/table.d.ts +11 -0
  320. package/dist/src/components/ui/table.d.ts.map +1 -0
  321. package/dist/src/components/ui/table.js +64 -0
  322. package/dist/src/components/ui/tabs.d.ts +8 -0
  323. package/dist/src/components/ui/tabs.d.ts.map +1 -0
  324. package/dist/src/components/ui/tabs.js +34 -0
  325. package/dist/src/components/ui/textarea.d.ts +4 -0
  326. package/dist/src/components/ui/textarea.d.ts.map +1 -0
  327. package/dist/src/components/ui/textarea.js +11 -0
  328. package/dist/src/components/ui/toggle-group.d.ts +8 -0
  329. package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
  330. package/dist/src/components/ui/toggle-group.js +41 -0
  331. package/dist/src/components/ui/toggle.d.ts +10 -0
  332. package/dist/src/components/ui/toggle.d.ts.map +1 -0
  333. package/dist/src/components/ui/toggle.js +35 -0
  334. package/dist/src/components/ui/tooltip.d.ts +8 -0
  335. package/dist/src/components/ui/tooltip.d.ts.map +1 -0
  336. package/dist/src/components/ui/tooltip.js +43 -0
  337. package/dist/src/components/ui/unsaved-changes-dialog.d.ts +1 -0
  338. package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +1 -0
  339. package/dist/src/config.d.ts +5 -0
  340. package/dist/src/config.d.ts.map +1 -0
  341. package/dist/src/config.js +4 -0
  342. package/dist/src/database/admins.d.ts +246 -0
  343. package/dist/src/database/admins.d.ts.map +1 -0
  344. package/dist/src/database/admins.js +74 -0
  345. package/dist/src/database/languages.d.ts +321 -0
  346. package/dist/src/database/languages.d.ts.map +1 -0
  347. package/dist/src/database/languages.js +52 -0
  348. package/dist/src/database/moderators.d.ts +114 -0
  349. package/dist/src/database/moderators.d.ts.map +1 -0
  350. package/dist/src/database/moderators.js +37 -0
  351. package/dist/src/database/roles.d.ts +146 -0
  352. package/dist/src/database/roles.d.ts.map +1 -0
  353. package/dist/src/database/roles.js +13 -0
  354. package/dist/src/database/sessions.d.ts +196 -0
  355. package/dist/src/database/sessions.d.ts.map +1 -0
  356. package/dist/src/database/sessions.js +57 -0
  357. package/dist/src/database/users.d.ts +562 -0
  358. package/dist/src/database/users.d.ts.map +1 -0
  359. package/dist/src/database/users.js +142 -0
  360. package/dist/src/drizzle.config.d.ts +6 -0
  361. package/dist/src/drizzle.config.d.ts.map +1 -0
  362. package/dist/src/drizzle.config.js +37 -0
  363. package/dist/src/hooks/use-before-unload-with-dialog.d.ts +1 -0
  364. package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +1 -0
  365. package/dist/src/hooks/use-before-unload.d.ts +2 -0
  366. package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
  367. package/dist/src/hooks/use-before-unload.js +30 -0
  368. package/dist/src/hooks/use-mobile.d.ts +2 -0
  369. package/dist/src/hooks/use-mobile.d.ts.map +1 -0
  370. package/dist/src/hooks/use-mobile.js +15 -0
  371. package/dist/src/hooks/use-unsaved-changes.d.ts +1 -0
  372. package/dist/src/hooks/use-unsaved-changes.d.ts.map +1 -0
  373. package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
  374. package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
  375. package/dist/src/lib/api/get-middleware-api.js +13 -0
  376. package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
  377. package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
  378. package/dist/src/lib/api/get-session-admin-api.js +19 -0
  379. package/dist/src/lib/api/get-session-api.d.ts +17 -0
  380. package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
  381. package/dist/src/lib/api/get-session-api.js +14 -0
  382. package/dist/src/lib/colors.d.ts +23 -0
  383. package/dist/src/lib/colors.d.ts.map +1 -0
  384. package/dist/src/lib/colors.js +131 -0
  385. package/dist/src/lib/colors.test.d.ts +2 -0
  386. package/dist/src/lib/colors.test.d.ts.map +1 -0
  387. package/dist/src/lib/colors.test.js +173 -0
  388. package/dist/src/lib/config.d.ts +6 -0
  389. package/dist/src/lib/config.d.ts.map +1 -0
  390. package/dist/src/lib/config.js +15 -0
  391. package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
  392. package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
  393. package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
  394. package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
  395. package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
  396. package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
  397. package/dist/src/lib/fetcher/fetcher.d.ts +9 -0
  398. package/dist/src/lib/fetcher/fetcher.d.ts.map +1 -0
  399. package/dist/src/lib/fetcher/helpers.d.ts +3 -0
  400. package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
  401. package/dist/src/lib/fetcher/helpers.js +33 -0
  402. package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
  403. package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
  404. package/dist/src/lib/fetcher/helpers.test.js +37 -0
  405. package/dist/src/lib/fetcher/index.d.ts +34 -0
  406. package/dist/src/lib/fetcher/index.d.ts.map +1 -0
  407. package/dist/src/lib/fetcher/types.d.ts +120 -0
  408. package/dist/src/lib/fetcher/types.d.ts.map +1 -0
  409. package/dist/src/lib/fetcher/types.js +1 -0
  410. package/dist/src/lib/fetcher.d.ts +9 -0
  411. package/dist/src/lib/fetcher.d.ts.map +1 -0
  412. package/dist/src/lib/fetcher.js +47 -0
  413. package/dist/src/lib/helpers/auto-form.d.ts +10 -0
  414. package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
  415. package/dist/src/lib/helpers/auto-form.js +82 -0
  416. package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
  417. package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
  418. package/dist/src/lib/helpers/auto-form.test.js +126 -0
  419. package/dist/src/lib/navigation.d.ts +339 -0
  420. package/dist/src/lib/navigation.d.ts.map +1 -0
  421. package/dist/src/lib/navigation.js +11 -0
  422. package/dist/src/lib/plugin.d.ts +15 -0
  423. package/dist/src/lib/plugin.d.ts.map +1 -0
  424. package/dist/src/lib/plugin.js +3 -0
  425. package/dist/src/lib/special-characters.d.ts +3 -0
  426. package/dist/src/lib/special-characters.d.ts.map +1 -0
  427. package/dist/src/lib/special-characters.js +4 -0
  428. package/dist/src/lib/special-characters.test.d.ts +2 -0
  429. package/dist/src/lib/special-characters.test.d.ts.map +1 -0
  430. package/dist/src/lib/special-characters.test.js +56 -0
  431. package/dist/src/lib/utils.d.ts +3 -0
  432. package/dist/src/lib/utils.d.ts.map +1 -0
  433. package/dist/src/lib/utils.js +5 -0
  434. package/dist/src/tests/setup.d.ts +2 -0
  435. package/dist/src/tests/setup.d.ts.map +1 -0
  436. package/dist/src/tests/setup.js +6 -0
  437. package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
  438. package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
  439. package/dist/src/views/admin/layouts/admin-layout.js +70 -0
  440. package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
  441. package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
  442. package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
  443. package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
  444. package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
  445. package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
  446. package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
  447. package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
  448. package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
  449. package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
  450. package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
  451. package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
  452. package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
  453. package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
  454. package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
  455. package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
  456. package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
  457. package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
  458. package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
  459. package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
  460. package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
  461. package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
  462. package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
  463. package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
  464. package/dist/src/views/admin/views/core/test.d.ts +2 -0
  465. package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
  466. package/dist/src/views/admin/views/core/test.js +146 -0
  467. package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
  468. package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
  469. package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
  470. package/dist/src/views/auth/components/password-input.d.ts +4 -0
  471. package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
  472. package/dist/src/views/auth/components/password-input.js +89 -0
  473. package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
  474. package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
  475. package/dist/src/views/auth/sign-in/form/form.js +59 -0
  476. package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
  477. package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
  478. package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
  479. package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
  480. package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
  481. package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
  482. package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
  483. package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
  484. package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
  485. package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
  486. package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
  487. package/dist/src/views/auth/sign-up/form/form.js +88 -0
  488. package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
  489. package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
  490. package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
  491. package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
  492. package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
  493. package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
  494. package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
  495. package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
  496. package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
  497. package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
  498. package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
  499. package/dist/src/views/auth/sso/buttons/client.js +22 -0
  500. package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
  501. package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
  502. package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
  503. package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
  504. package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
  505. package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
  506. package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
  507. package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
  508. package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
  509. package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
  510. package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
  511. package/dist/src/views/auth/sso/callback/client/client.js +39 -0
  512. package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
  513. package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
  514. package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
  515. package/dist/src/views/error/back-button.d.ts +5 -0
  516. package/dist/src/views/error/back-button.d.ts.map +1 -0
  517. package/dist/src/views/error/back-button.js +14 -0
  518. package/dist/src/views/error/error-view.d.ts +5 -0
  519. package/dist/src/views/error/error-view.d.ts.map +1 -0
  520. package/dist/src/views/error/error-view.js +56 -0
  521. package/dist/src/views/error/global-error-view.d.ts +6 -0
  522. package/dist/src/views/error/global-error-view.d.ts.map +1 -0
  523. package/dist/src/views/error/global-error-view.js +57 -0
  524. package/dist/src/views/layouts/provider.d.ts +11 -0
  525. package/dist/src/views/layouts/provider.d.ts.map +1 -0
  526. package/dist/src/views/layouts/provider.js +43 -0
  527. package/dist/src/views/layouts/root-layout.d.ts +16 -0
  528. package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
  529. package/dist/src/views/layouts/root-layout.js +38 -0
  530. package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
  531. package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
  532. package/dist/src/views/layouts/theme/header/header.js +32 -0
  533. package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
  534. package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
  535. package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
  536. package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
  537. package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
  538. package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
  539. package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
  540. package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
  541. package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
  542. package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
  543. package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
  544. package/dist/src/views/layouts/theme/header/user/user.js +34 -0
  545. package/dist/src/views/layouts/theme/layout.d.ts +5 -0
  546. package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
  547. package/dist/src/views/layouts/theme/layout.js +15 -0
  548. package/dist/src/vitnode.config.d.ts +50 -0
  549. package/dist/src/vitnode.config.d.ts.map +1 -0
  550. package/dist/src/vitnode.config.js +39 -0
  551. package/dist/tsconfig.tsbuildinfo +1 -0
  552. package/dist/tsup.config.d.ts +3 -0
  553. package/dist/tsup.config.d.ts.map +1 -0
  554. package/dist/vitest.config.d.ts +3 -0
  555. package/dist/vitest.config.d.ts.map +1 -0
  556. package/package.json +94 -0
  557. package/src/app/login/page.tsx +21 -0
  558. package/src/app/login/sso/[providerId]/page.tsx +19 -0
  559. package/src/app/register/page.tsx +21 -0
  560. package/src/app_admin/core/page.tsx +5 -0
  561. package/src/app_admin/core/test/page.tsx +5 -0
  562. package/src/app_admin/core/users/page.tsx +35 -0
  563. package/src/database/admins.ts +87 -0
  564. package/src/database/languages.ts +54 -0
  565. package/src/database/moderators.ts +42 -0
  566. package/src/database/roles.ts +15 -0
  567. package/src/database/sessions.ts +59 -0
  568. package/src/database/users.ts +142 -0
  569. package/src/locales/en.json +156 -0
@@ -0,0 +1,294 @@
1
+ export declare const adminModule: import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "admin", [{
2
+ handler: (c: import("hono").Context<import("../../middlewares/global/global").EnvVitNode, "/session", {}>) => Response & import("hono").TypedResponse<{
3
+ user: {
4
+ avatarColor: string;
5
+ birthday: string | null;
6
+ createdAt: string;
7
+ email: string;
8
+ emailVerified: boolean;
9
+ id: number;
10
+ name: string;
11
+ nameCode: string;
12
+ newsletter: boolean;
13
+ roleId: number;
14
+ };
15
+ vitnode_version: string;
16
+ }, 200 | 403, "json">;
17
+ pluginId: "@vitnode/core";
18
+ route: {
19
+ method: "get";
20
+ description: string;
21
+ pluginConfig: {
22
+ id: string;
23
+ name: string;
24
+ };
25
+ path: "/session";
26
+ responses: {
27
+ 200: {
28
+ content: {
29
+ 'application/json': {
30
+ schema: import("zod").ZodObject<{
31
+ user: import("zod").ZodObject<{
32
+ id: import("zod").ZodNumber;
33
+ email: import("zod").ZodString;
34
+ name: import("zod").ZodString;
35
+ nameCode: import("zod").ZodString;
36
+ createdAt: import("zod").ZodDate;
37
+ newsletter: import("zod").ZodBoolean;
38
+ avatarColor: import("zod").ZodString;
39
+ emailVerified: import("zod").ZodBoolean;
40
+ roleId: import("zod").ZodNumber;
41
+ birthday: import("zod").ZodNullable<import("zod").ZodDate>;
42
+ }, "strip", import("zod").ZodTypeAny, {
43
+ id: number;
44
+ name: string;
45
+ nameCode: string;
46
+ email: string;
47
+ createdAt: Date;
48
+ newsletter: boolean;
49
+ avatarColor: string;
50
+ emailVerified: boolean;
51
+ roleId: number;
52
+ birthday: Date | null;
53
+ }, {
54
+ id: number;
55
+ name: string;
56
+ nameCode: string;
57
+ email: string;
58
+ createdAt: Date;
59
+ newsletter: boolean;
60
+ avatarColor: string;
61
+ emailVerified: boolean;
62
+ roleId: number;
63
+ birthday: Date | null;
64
+ }>;
65
+ vitnode_version: import("zod").ZodString;
66
+ }, "strip", import("zod").ZodTypeAny, {
67
+ user: {
68
+ id: number;
69
+ name: string;
70
+ nameCode: string;
71
+ email: string;
72
+ createdAt: Date;
73
+ newsletter: boolean;
74
+ avatarColor: string;
75
+ emailVerified: boolean;
76
+ roleId: number;
77
+ birthday: Date | null;
78
+ };
79
+ vitnode_version: string;
80
+ }, {
81
+ user: {
82
+ id: number;
83
+ name: string;
84
+ nameCode: string;
85
+ email: string;
86
+ createdAt: Date;
87
+ newsletter: boolean;
88
+ avatarColor: string;
89
+ emailVerified: boolean;
90
+ roleId: number;
91
+ birthday: Date | null;
92
+ };
93
+ vitnode_version: string;
94
+ }>;
95
+ };
96
+ };
97
+ description: string;
98
+ };
99
+ 403: {
100
+ description: string;
101
+ };
102
+ };
103
+ } & {
104
+ getRoutingPath: () => "/session";
105
+ };
106
+ }], import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "users", [{
107
+ handler: (c: import("hono").Context<import("../../middlewares/global/global").EnvVitNode, "/list", {
108
+ in: {
109
+ query: {
110
+ orderBy?: "name" | "createdAt" | undefined;
111
+ cursor?: string | undefined;
112
+ order?: "asc" | "desc" | undefined;
113
+ first?: string | undefined;
114
+ last?: string | undefined;
115
+ };
116
+ };
117
+ out: {
118
+ query: {
119
+ orderBy?: "name" | "createdAt" | undefined;
120
+ cursor?: string | undefined;
121
+ order?: "asc" | "desc" | undefined;
122
+ first?: string | undefined;
123
+ last?: string | undefined;
124
+ };
125
+ };
126
+ }>) => Promise<Response & import("hono").TypedResponse<{
127
+ edges: {
128
+ id: number;
129
+ name: string;
130
+ email: string;
131
+ nameCode: string;
132
+ createdAt: string;
133
+ newsletter: boolean;
134
+ avatarColor: string;
135
+ emailVerified: boolean;
136
+ roleId: number;
137
+ birthday: string | null;
138
+ language: string;
139
+ }[];
140
+ pageInfo: {
141
+ count: number;
142
+ endCursor: null | number;
143
+ hasNextPage: boolean;
144
+ hasPreviousPage: boolean;
145
+ startCursor: null | number;
146
+ totalCount: number;
147
+ };
148
+ }, 200, "json">>;
149
+ pluginId: "@vitnode/core";
150
+ route: {
151
+ method: "get";
152
+ description: string;
153
+ path: "/list";
154
+ request: {
155
+ query: import("zod").ZodObject<{
156
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
157
+ first: import("zod").ZodOptional<import("zod").ZodString>;
158
+ last: import("zod").ZodOptional<import("zod").ZodString>;
159
+ } & {
160
+ order: import("zod").ZodOptional<import("zod").ZodEnum<["asc", "desc"]>>;
161
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<["name", "createdAt"]>>;
162
+ }, "strip", import("zod").ZodTypeAny, {
163
+ orderBy?: "name" | "createdAt" | undefined;
164
+ cursor?: string | undefined;
165
+ order?: "asc" | "desc" | undefined;
166
+ first?: string | undefined;
167
+ last?: string | undefined;
168
+ }, {
169
+ orderBy?: "name" | "createdAt" | undefined;
170
+ cursor?: string | undefined;
171
+ order?: "asc" | "desc" | undefined;
172
+ first?: string | undefined;
173
+ last?: string | undefined;
174
+ }>;
175
+ };
176
+ responses: {
177
+ 200: {
178
+ content: {
179
+ 'application/json': {
180
+ schema: import("zod").ZodObject<{
181
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
182
+ id: import("zod").ZodNumber;
183
+ name: import("zod").ZodString;
184
+ email: import("zod").ZodString;
185
+ nameCode: import("zod").ZodString;
186
+ createdAt: import("zod").ZodDate;
187
+ newsletter: import("zod").ZodBoolean;
188
+ avatarColor: import("zod").ZodString;
189
+ emailVerified: import("zod").ZodBoolean;
190
+ roleId: import("zod").ZodNumber;
191
+ birthday: import("zod").ZodNullable<import("zod").ZodDate>;
192
+ language: import("zod").ZodString;
193
+ }, "strip", import("zod").ZodTypeAny, {
194
+ id: number;
195
+ name: string;
196
+ nameCode: string;
197
+ email: string;
198
+ createdAt: Date;
199
+ newsletter: boolean;
200
+ avatarColor: string;
201
+ emailVerified: boolean;
202
+ roleId: number;
203
+ birthday: Date | null;
204
+ language: string;
205
+ }, {
206
+ id: number;
207
+ name: string;
208
+ nameCode: string;
209
+ email: string;
210
+ createdAt: Date;
211
+ newsletter: boolean;
212
+ avatarColor: string;
213
+ emailVerified: boolean;
214
+ roleId: number;
215
+ birthday: Date | null;
216
+ language: string;
217
+ }>, "many">;
218
+ pageInfo: import("zod").ZodObject<{
219
+ totalCount: import("zod").ZodNumber;
220
+ count: import("zod").ZodNumber;
221
+ hasNextPage: import("zod").ZodBoolean;
222
+ hasPreviousPage: import("zod").ZodBoolean;
223
+ startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
224
+ endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
225
+ }, "strip", import("zod").ZodTypeAny, {
226
+ count: number;
227
+ totalCount: number;
228
+ hasNextPage: boolean;
229
+ hasPreviousPage: boolean;
230
+ startCursor: number | null;
231
+ endCursor: number | null;
232
+ }, {
233
+ count: number;
234
+ totalCount: number;
235
+ hasNextPage: boolean;
236
+ hasPreviousPage: boolean;
237
+ startCursor: number | null;
238
+ endCursor: number | null;
239
+ }>;
240
+ }, "strip", import("zod").ZodTypeAny, {
241
+ edges: {
242
+ id: number;
243
+ name: string;
244
+ nameCode: string;
245
+ email: string;
246
+ createdAt: Date;
247
+ newsletter: boolean;
248
+ avatarColor: string;
249
+ emailVerified: boolean;
250
+ roleId: number;
251
+ birthday: Date | null;
252
+ language: string;
253
+ }[];
254
+ pageInfo: {
255
+ count: number;
256
+ totalCount: number;
257
+ hasNextPage: boolean;
258
+ hasPreviousPage: boolean;
259
+ startCursor: number | null;
260
+ endCursor: number | null;
261
+ };
262
+ }, {
263
+ edges: {
264
+ id: number;
265
+ name: string;
266
+ nameCode: string;
267
+ email: string;
268
+ createdAt: Date;
269
+ newsletter: boolean;
270
+ avatarColor: string;
271
+ emailVerified: boolean;
272
+ roleId: number;
273
+ birthday: Date | null;
274
+ language: string;
275
+ }[];
276
+ pageInfo: {
277
+ count: number;
278
+ totalCount: number;
279
+ hasNextPage: boolean;
280
+ hasPreviousPage: boolean;
281
+ startCursor: number | null;
282
+ endCursor: number | null;
283
+ };
284
+ }>;
285
+ };
286
+ };
287
+ description: string;
288
+ };
289
+ };
290
+ } & {
291
+ getRoutingPath: () => "/list";
292
+ };
293
+ }], import("../../../api/lib/module").BaseBuildModuleReturn<"@vitnode/core", string, import("../../lib/route").Route<"@vitnode/core", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>[]>;
294
+ //# sourceMappingURL=admin.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQAKtB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { buildModule } from "../../lib/module";
2
+ import { CONFIG_PLUGIN } from "../../../config";
3
+ import { sessionAdminRoute } from "./routes/session.route";
4
+ import { usersAdminModule } from "./users/users.admin.module";
5
+ export const adminModule = buildModule({
6
+ ...CONFIG_PLUGIN,
7
+ name: 'admin',
8
+ routes: [
9
+ sessionAdminRoute
10
+ ],
11
+ modules: [
12
+ usersAdminModule
13
+ ]
14
+ });
@@ -0,0 +1,108 @@
1
+ import { z } from 'zod';
2
+ export declare const sessionAdminRoute: {
3
+ handler: (c: import("hono").Context<import("../../../middlewares/global/global").EnvVitNode, "/session", {}>) => Response & import("hono").TypedResponse<{
4
+ user: {
5
+ avatarColor: string;
6
+ birthday: string | null;
7
+ createdAt: string;
8
+ email: string;
9
+ emailVerified: boolean;
10
+ id: number;
11
+ name: string;
12
+ nameCode: string;
13
+ newsletter: boolean;
14
+ roleId: number;
15
+ };
16
+ vitnode_version: string;
17
+ }, 200 | 403, "json">;
18
+ pluginId: "@vitnode/core";
19
+ route: {
20
+ method: "get";
21
+ description: string;
22
+ pluginConfig: {
23
+ id: string;
24
+ name: string;
25
+ };
26
+ path: "/session";
27
+ responses: {
28
+ 200: {
29
+ content: {
30
+ 'application/json': {
31
+ schema: z.ZodObject<{
32
+ user: z.ZodObject<{
33
+ id: z.ZodNumber;
34
+ email: z.ZodString;
35
+ name: z.ZodString;
36
+ nameCode: z.ZodString;
37
+ createdAt: z.ZodDate;
38
+ newsletter: z.ZodBoolean;
39
+ avatarColor: z.ZodString;
40
+ emailVerified: z.ZodBoolean;
41
+ roleId: z.ZodNumber;
42
+ birthday: z.ZodNullable<z.ZodDate>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ id: number;
45
+ name: string;
46
+ nameCode: string;
47
+ email: string;
48
+ createdAt: Date;
49
+ newsletter: boolean;
50
+ avatarColor: string;
51
+ emailVerified: boolean;
52
+ roleId: number;
53
+ birthday: Date | null;
54
+ }, {
55
+ id: number;
56
+ name: string;
57
+ nameCode: string;
58
+ email: string;
59
+ createdAt: Date;
60
+ newsletter: boolean;
61
+ avatarColor: string;
62
+ emailVerified: boolean;
63
+ roleId: number;
64
+ birthday: Date | null;
65
+ }>;
66
+ vitnode_version: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ user: {
69
+ id: number;
70
+ name: string;
71
+ nameCode: string;
72
+ email: string;
73
+ createdAt: Date;
74
+ newsletter: boolean;
75
+ avatarColor: string;
76
+ emailVerified: boolean;
77
+ roleId: number;
78
+ birthday: Date | null;
79
+ };
80
+ vitnode_version: string;
81
+ }, {
82
+ user: {
83
+ id: number;
84
+ name: string;
85
+ nameCode: string;
86
+ email: string;
87
+ createdAt: Date;
88
+ newsletter: boolean;
89
+ avatarColor: string;
90
+ emailVerified: boolean;
91
+ roleId: number;
92
+ birthday: Date | null;
93
+ };
94
+ vitnode_version: string;
95
+ }>;
96
+ };
97
+ };
98
+ description: string;
99
+ };
100
+ 403: {
101
+ description: string;
102
+ };
103
+ };
104
+ } & {
105
+ getRoutingPath: () => "/session";
106
+ };
107
+ };
108
+ //# sourceMappingURL=session.route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/admin/routes/session.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+C5B,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { HTTPException } from "hono/http-exception";
2
+ import { z } from "zod";
3
+ import { buildRoute } from "../../../lib/route";
4
+ import { CONFIG_PLUGIN } from "../../../../config";
5
+ export const sessionAdminRoute = buildRoute({
6
+ ...CONFIG_PLUGIN,
7
+ route: {
8
+ method: 'get',
9
+ description: 'Verify admin session',
10
+ pluginConfig: {
11
+ id: 'core',
12
+ name: 'Core'
13
+ },
14
+ path: '/session',
15
+ responses: {
16
+ 200: {
17
+ content: {
18
+ 'application/json': {
19
+ schema: z.object({
20
+ user: z.object({
21
+ id: z.number(),
22
+ email: z.string(),
23
+ name: z.string(),
24
+ nameCode: z.string(),
25
+ createdAt: z.date(),
26
+ newsletter: z.boolean(),
27
+ avatarColor: z.string(),
28
+ emailVerified: z.boolean(),
29
+ roleId: z.number(),
30
+ birthday: z.date().nullable()
31
+ }),
32
+ vitnode_version: z.string()
33
+ })
34
+ }
35
+ },
36
+ description: 'User'
37
+ },
38
+ 403: {
39
+ description: 'Access Denied'
40
+ }
41
+ }
42
+ },
43
+ handler: (c)=>{
44
+ const user = c.get('admin')?.user;
45
+ if (!user) throw new HTTPException(403);
46
+ return c.json({
47
+ user,
48
+ vitnode_version: CONFIG_PLUGIN.version
49
+ });
50
+ }
51
+ });
@@ -0,0 +1,190 @@
1
+ import { z } from '@hono/zod-openapi';
2
+ export declare const listUsersAdminRoute: {
3
+ handler: (c: import("hono").Context<import("../../../../middlewares/global/global").EnvVitNode, "/list", {
4
+ in: {
5
+ query: {
6
+ orderBy?: "name" | "createdAt" | undefined;
7
+ cursor?: string | undefined;
8
+ order?: "asc" | "desc" | undefined;
9
+ first?: string | undefined;
10
+ last?: string | undefined;
11
+ };
12
+ };
13
+ out: {
14
+ query: {
15
+ orderBy?: "name" | "createdAt" | undefined;
16
+ cursor?: string | undefined;
17
+ order?: "asc" | "desc" | undefined;
18
+ first?: string | undefined;
19
+ last?: string | undefined;
20
+ };
21
+ };
22
+ }>) => Promise<Response & import("hono").TypedResponse<{
23
+ edges: {
24
+ id: number;
25
+ name: string;
26
+ email: string;
27
+ nameCode: string;
28
+ createdAt: string;
29
+ newsletter: boolean;
30
+ avatarColor: string;
31
+ emailVerified: boolean;
32
+ roleId: number;
33
+ birthday: string | null;
34
+ language: string;
35
+ }[];
36
+ pageInfo: {
37
+ count: number;
38
+ endCursor: null | number;
39
+ hasNextPage: boolean;
40
+ hasPreviousPage: boolean;
41
+ startCursor: null | number;
42
+ totalCount: number;
43
+ };
44
+ }, 200, "json">>;
45
+ pluginId: "@vitnode/core";
46
+ route: {
47
+ method: "get";
48
+ description: string;
49
+ path: "/list";
50
+ request: {
51
+ query: z.ZodObject<{
52
+ cursor: z.ZodOptional<z.ZodString>;
53
+ first: z.ZodOptional<z.ZodString>;
54
+ last: z.ZodOptional<z.ZodString>;
55
+ } & {
56
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
57
+ orderBy: z.ZodOptional<z.ZodEnum<["name", "createdAt"]>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ orderBy?: "name" | "createdAt" | undefined;
60
+ cursor?: string | undefined;
61
+ order?: "asc" | "desc" | undefined;
62
+ first?: string | undefined;
63
+ last?: string | undefined;
64
+ }, {
65
+ orderBy?: "name" | "createdAt" | undefined;
66
+ cursor?: string | undefined;
67
+ order?: "asc" | "desc" | undefined;
68
+ first?: string | undefined;
69
+ last?: string | undefined;
70
+ }>;
71
+ };
72
+ responses: {
73
+ 200: {
74
+ content: {
75
+ 'application/json': {
76
+ schema: z.ZodObject<{
77
+ edges: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodNumber;
79
+ name: z.ZodString;
80
+ email: z.ZodString;
81
+ nameCode: z.ZodString;
82
+ createdAt: z.ZodDate;
83
+ newsletter: z.ZodBoolean;
84
+ avatarColor: z.ZodString;
85
+ emailVerified: z.ZodBoolean;
86
+ roleId: z.ZodNumber;
87
+ birthday: z.ZodNullable<z.ZodDate>;
88
+ language: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ id: number;
91
+ name: string;
92
+ nameCode: string;
93
+ email: string;
94
+ createdAt: Date;
95
+ newsletter: boolean;
96
+ avatarColor: string;
97
+ emailVerified: boolean;
98
+ roleId: number;
99
+ birthday: Date | null;
100
+ language: string;
101
+ }, {
102
+ id: number;
103
+ name: string;
104
+ nameCode: string;
105
+ email: string;
106
+ createdAt: Date;
107
+ newsletter: boolean;
108
+ avatarColor: string;
109
+ emailVerified: boolean;
110
+ roleId: number;
111
+ birthday: Date | null;
112
+ language: string;
113
+ }>, "many">;
114
+ pageInfo: z.ZodObject<{
115
+ totalCount: z.ZodNumber;
116
+ count: z.ZodNumber;
117
+ hasNextPage: z.ZodBoolean;
118
+ hasPreviousPage: z.ZodBoolean;
119
+ startCursor: z.ZodNullable<z.ZodNumber>;
120
+ endCursor: z.ZodNullable<z.ZodNumber>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ count: number;
123
+ totalCount: number;
124
+ hasNextPage: boolean;
125
+ hasPreviousPage: boolean;
126
+ startCursor: number | null;
127
+ endCursor: number | null;
128
+ }, {
129
+ count: number;
130
+ totalCount: number;
131
+ hasNextPage: boolean;
132
+ hasPreviousPage: boolean;
133
+ startCursor: number | null;
134
+ endCursor: number | null;
135
+ }>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ edges: {
138
+ id: number;
139
+ name: string;
140
+ nameCode: string;
141
+ email: string;
142
+ createdAt: Date;
143
+ newsletter: boolean;
144
+ avatarColor: string;
145
+ emailVerified: boolean;
146
+ roleId: number;
147
+ birthday: Date | null;
148
+ language: string;
149
+ }[];
150
+ pageInfo: {
151
+ count: number;
152
+ totalCount: number;
153
+ hasNextPage: boolean;
154
+ hasPreviousPage: boolean;
155
+ startCursor: number | null;
156
+ endCursor: number | null;
157
+ };
158
+ }, {
159
+ edges: {
160
+ id: number;
161
+ name: string;
162
+ nameCode: string;
163
+ email: string;
164
+ createdAt: Date;
165
+ newsletter: boolean;
166
+ avatarColor: string;
167
+ emailVerified: boolean;
168
+ roleId: number;
169
+ birthday: Date | null;
170
+ language: string;
171
+ }[];
172
+ pageInfo: {
173
+ count: number;
174
+ totalCount: number;
175
+ hasNextPage: boolean;
176
+ hasPreviousPage: boolean;
177
+ startCursor: number | null;
178
+ endCursor: number | null;
179
+ };
180
+ }>;
181
+ };
182
+ };
183
+ description: string;
184
+ };
185
+ };
186
+ } & {
187
+ getRoutingPath: () => "/list";
188
+ };
189
+ };
190
+ //# sourceMappingURL=list.route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.route.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/users/routes/list.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAWtC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E9B,CAAC"}