@vitnode/core 1.2.0-canary.10 → 1.2.0-canary.12

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