@nextsparkjs/core 0.1.0-beta.185 → 0.1.0-beta.187

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 (518) hide show
  1. package/dist/components/app/guards/DeveloperGuard.d.ts.map +1 -1
  2. package/dist/components/app/guards/DeveloperGuard.js +8 -4
  3. package/dist/components/app/guards/SuperAdminGuard.d.ts.map +1 -1
  4. package/dist/components/app/guards/SuperAdminGuard.js +8 -4
  5. package/dist/components/app/layouts/PublicFooter.d.ts.map +1 -1
  6. package/dist/components/app/layouts/PublicFooter.js +2 -2
  7. package/dist/components/app/layouts/PublicNavbar.d.ts.map +1 -1
  8. package/dist/components/app/layouts/PublicNavbar.js +2 -2
  9. package/dist/components/app/misc/ThemeToggle.d.ts.map +1 -1
  10. package/dist/components/app/misc/ThemeToggle.js +4 -1
  11. package/dist/components/auth/DevKeyring.d.ts.map +1 -1
  12. package/dist/components/auth/DevKeyring.js +10 -2
  13. package/dist/components/auth/SessionCookieRefresher.d.ts +21 -0
  14. package/dist/components/auth/SessionCookieRefresher.d.ts.map +1 -0
  15. package/dist/components/auth/SessionCookieRefresher.js +11 -0
  16. package/dist/components/auth/forms/LoginForm.d.ts.map +1 -1
  17. package/dist/components/auth/forms/LoginForm.js +300 -6
  18. package/dist/components/auth/index.d.ts +1 -0
  19. package/dist/components/auth/index.d.ts.map +1 -1
  20. package/dist/components/auth/index.js +2 -0
  21. package/dist/components/billing/InvoicesTable.d.ts.map +1 -1
  22. package/dist/components/billing/InvoicesTable.js +4 -3
  23. package/dist/components/dashboard/block-editor/dynamic-form.d.ts.map +1 -1
  24. package/dist/components/dashboard/layouts/AuthGuard.d.ts.map +1 -1
  25. package/dist/components/dashboard/layouts/AuthGuard.js +2 -2
  26. package/dist/components/dashboard/layouts/DashboardAuthLayout.d.ts.map +1 -1
  27. package/dist/components/dashboard/layouts/DashboardAuthLayout.js +2 -2
  28. package/dist/components/dashboard/layouts/DashboardAuthSkeleton.d.ts +17 -0
  29. package/dist/components/dashboard/layouts/DashboardAuthSkeleton.d.ts.map +1 -0
  30. package/dist/components/dashboard/layouts/DashboardAuthSkeleton.js +52 -0
  31. package/dist/components/dashboard/layouts/Sidebar.d.ts.map +1 -1
  32. package/dist/components/dashboard/layouts/Sidebar.js +2 -3
  33. package/dist/components/dashboard/layouts/TopNavbar.js +2 -2
  34. package/dist/components/dashboard/layouts/index.d.ts +1 -0
  35. package/dist/components/dashboard/layouts/index.d.ts.map +1 -1
  36. package/dist/components/dashboard/layouts/index.js +2 -0
  37. package/dist/components/devtools/api-explorer/ApiExplorer.js +4 -4
  38. package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
  39. package/dist/components/entities/EntityFieldRenderer.js +3 -0
  40. package/dist/components/entities/EntityTable.d.ts.map +1 -1
  41. package/dist/components/entities/EntityTable.js +2 -1
  42. package/dist/components/entities/wrappers/EntityFormWrapper.d.ts.map +1 -1
  43. package/dist/components/entities/wrappers/EntityFormWrapper.js +7 -2
  44. package/dist/components/patterns/pages/PatternEditPage.d.ts +5 -1
  45. package/dist/components/patterns/pages/PatternEditPage.d.ts.map +1 -1
  46. package/dist/components/patterns/pages/PatternEditPage.js +16 -5
  47. package/dist/components/patterns/pages/PatternsCreatePage.d.ts +2 -1
  48. package/dist/components/patterns/pages/PatternsCreatePage.d.ts.map +1 -1
  49. package/dist/components/patterns/pages/PatternsCreatePage.js +17 -5
  50. package/dist/components/ui/combobox.d.ts +8 -1
  51. package/dist/components/ui/combobox.d.ts.map +1 -1
  52. package/dist/components/ui/combobox.js +37 -44
  53. package/dist/components/ui/country-select.d.ts +3 -1
  54. package/dist/components/ui/country-select.d.ts.map +1 -1
  55. package/dist/components/ui/country-select.js +3 -1
  56. package/dist/components/ui/currency-select.d.ts +3 -1
  57. package/dist/components/ui/currency-select.d.ts.map +1 -1
  58. package/dist/components/ui/currency-select.js +3 -1
  59. package/dist/components/ui/sheet.d.ts +5 -0
  60. package/dist/components/ui/sheet.d.ts.map +1 -1
  61. package/dist/components/ui/sheet.js +46 -26
  62. package/dist/components/ui/timezone-select.d.ts +3 -1
  63. package/dist/components/ui/timezone-select.d.ts.map +1 -1
  64. package/dist/components/ui/timezone-select.js +3 -1
  65. package/dist/contexts/TeamContext.d.ts +6 -0
  66. package/dist/contexts/TeamContext.d.ts.map +1 -1
  67. package/dist/contexts/TeamContext.js +8 -1
  68. package/dist/emails/otp-verification.d.ts.map +1 -1
  69. package/dist/emails/reset-password.d.ts.map +1 -1
  70. package/dist/emails/team-invitation.d.ts.map +1 -1
  71. package/dist/emails/team-invitation.js +3 -2
  72. package/dist/emails/verify-email.d.ts.map +1 -1
  73. package/dist/hooks/index.d.ts +1 -0
  74. package/dist/hooks/index.d.ts.map +1 -1
  75. package/dist/hooks/index.js +1 -0
  76. package/dist/hooks/useAuth.d.ts +29 -0
  77. package/dist/hooks/useAuth.d.ts.map +1 -1
  78. package/dist/hooks/useAuth.js +24 -0
  79. package/dist/hooks/useEnsureUserMetadata.d.ts +22 -0
  80. package/dist/hooks/useEnsureUserMetadata.d.ts.map +1 -1
  81. package/dist/hooks/useEnsureUserMetadata.js +18 -5
  82. package/dist/hooks/useSessionCookieRefresh.d.ts +35 -0
  83. package/dist/hooks/useSessionCookieRefresh.d.ts.map +1 -0
  84. package/dist/hooks/useSessionCookieRefresh.js +49 -0
  85. package/dist/lib/api/api-error.d.ts +3 -1
  86. package/dist/lib/api/api-error.d.ts.map +1 -1
  87. package/dist/lib/api/api-error.js +4 -2
  88. package/dist/lib/api/auth/dual-auth.d.ts +38 -3
  89. package/dist/lib/api/auth/dual-auth.d.ts.map +1 -1
  90. package/dist/lib/api/auth/dual-auth.js +42 -7
  91. package/dist/lib/api/auth/permissions.d.ts +7 -2
  92. package/dist/lib/api/auth/permissions.d.ts.map +1 -1
  93. package/dist/lib/api/auth/permissions.js +2 -2
  94. package/dist/lib/api/auth/scope-policy.d.ts +71 -0
  95. package/dist/lib/api/auth/scope-policy.d.ts.map +1 -0
  96. package/dist/lib/api/auth/scope-policy.js +53 -0
  97. package/dist/lib/api/auth.d.ts +15 -0
  98. package/dist/lib/api/auth.d.ts.map +1 -1
  99. package/dist/lib/api/auth.js +17 -4
  100. package/dist/lib/api/entities.js +2 -1
  101. package/dist/lib/api/entity/audit-log.d.ts +35 -0
  102. package/dist/lib/api/entity/audit-log.d.ts.map +1 -0
  103. package/dist/lib/api/entity/audit-log.js +35 -0
  104. package/dist/lib/api/entity/generic-handler.d.ts.map +1 -1
  105. package/dist/lib/api/entity/generic-handler.js +333 -138
  106. package/dist/lib/api/entity-handler.js +2 -2
  107. package/dist/lib/api/helpers.d.ts +29 -4
  108. package/dist/lib/api/helpers.d.ts.map +1 -1
  109. package/dist/lib/api/helpers.js +30 -6
  110. package/dist/lib/api/keys.d.ts +16 -0
  111. package/dist/lib/api/keys.d.ts.map +1 -1
  112. package/dist/lib/api/keys.js +19 -1
  113. package/dist/lib/api/routes/patterns-usages.d.ts.map +1 -1
  114. package/dist/lib/api/routes/patterns-usages.js +3 -11
  115. package/dist/lib/auth/auth-methods.d.ts +52 -0
  116. package/dist/lib/auth/auth-methods.d.ts.map +1 -0
  117. package/dist/lib/auth/auth-methods.js +63 -0
  118. package/dist/lib/auth/registration-guard-plugin.d.ts.map +1 -1
  119. package/dist/lib/auth/registration-helpers.d.ts +9 -0
  120. package/dist/lib/auth/registration-helpers.d.ts.map +1 -1
  121. package/dist/lib/auth/registration-helpers.js +8 -2
  122. package/dist/lib/auth/security-notifications/device-fingerprint.d.ts +52 -0
  123. package/dist/lib/auth/security-notifications/device-fingerprint.d.ts.map +1 -0
  124. package/dist/lib/auth/security-notifications/device-fingerprint.js +42 -0
  125. package/dist/lib/auth/security-notifications/dispatcher.d.ts +37 -0
  126. package/dist/lib/auth/security-notifications/dispatcher.d.ts.map +1 -0
  127. package/dist/lib/auth/security-notifications/dispatcher.js +157 -0
  128. package/dist/lib/auth/security-notifications/index.d.ts +20 -0
  129. package/dist/lib/auth/security-notifications/index.d.ts.map +1 -0
  130. package/dist/lib/auth/security-notifications/index.js +22 -0
  131. package/dist/lib/auth/security-notifications/registry.d.ts +36 -0
  132. package/dist/lib/auth/security-notifications/registry.d.ts.map +1 -0
  133. package/dist/lib/auth/security-notifications/registry.js +26 -0
  134. package/dist/lib/auth/security-notifications/templates/email-changed.d.ts +12 -0
  135. package/dist/lib/auth/security-notifications/templates/email-changed.d.ts.map +1 -0
  136. package/dist/lib/auth/security-notifications/templates/email-changed.js +43 -0
  137. package/dist/lib/auth/security-notifications/templates/new-device-login.d.ts +7 -0
  138. package/dist/lib/auth/security-notifications/templates/new-device-login.d.ts.map +1 -0
  139. package/dist/lib/auth/security-notifications/templates/new-device-login.js +46 -0
  140. package/dist/lib/auth/security-notifications/templates/password-changed.d.ts +7 -0
  141. package/dist/lib/auth/security-notifications/templates/password-changed.d.ts.map +1 -0
  142. package/dist/lib/auth/security-notifications/templates/password-changed.js +35 -0
  143. package/dist/lib/auth/security-notifications/templates/shared.d.ts +36 -0
  144. package/dist/lib/auth/security-notifications/templates/shared.d.ts.map +1 -0
  145. package/dist/lib/auth/security-notifications/templates/shared.js +68 -0
  146. package/dist/lib/auth/security-notifications/types.d.ts +74 -0
  147. package/dist/lib/auth/security-notifications/types.d.ts.map +1 -0
  148. package/dist/lib/auth/session-config.d.ts +37 -0
  149. package/dist/lib/auth/session-config.d.ts.map +1 -0
  150. package/dist/lib/auth/session-config.js +59 -0
  151. package/dist/lib/auth/session-refresh.d.ts +46 -0
  152. package/dist/lib/auth/session-refresh.d.ts.map +1 -0
  153. package/dist/lib/auth/session-refresh.js +11 -0
  154. package/dist/lib/auth-client.d.ts +1639 -0
  155. package/dist/lib/auth-client.d.ts.map +1 -0
  156. package/dist/lib/auth-client.js +13 -1
  157. package/dist/lib/auth.d.ts.map +1 -1
  158. package/dist/lib/auth.js +45 -11
  159. package/dist/lib/billing/gateways/factory.d.ts +8 -3
  160. package/dist/lib/billing/gateways/factory.d.ts.map +1 -1
  161. package/dist/lib/billing/gateways/factory.js +37 -23
  162. package/dist/lib/billing/stripe-webhook.d.ts.map +1 -1
  163. package/dist/lib/billing/stripe-webhook.js +2 -1
  164. package/dist/lib/config/app.config.d.ts.map +1 -1
  165. package/dist/lib/config/app.config.js +71 -0
  166. package/dist/lib/config/config-sync.d.ts +1 -4
  167. package/dist/lib/config/config-sync.d.ts.map +1 -1
  168. package/dist/lib/config/config-sync.js +6 -2
  169. package/dist/lib/config/types.d.ts +130 -0
  170. package/dist/lib/config/types.d.ts.map +1 -1
  171. package/dist/lib/email/templates.d.ts +3 -3
  172. package/dist/lib/email/templates.d.ts.map +1 -1
  173. package/dist/lib/entities/api-generator.js +5 -5
  174. package/dist/lib/entities/entity-hooks.d.ts +9 -1
  175. package/dist/lib/entities/entity-hooks.d.ts.map +1 -1
  176. package/dist/lib/entities/entity-hooks.js +77 -4
  177. package/dist/lib/entities/schema-generator.d.ts.map +1 -1
  178. package/dist/lib/entities/schema-generator.js +20 -4
  179. package/dist/lib/entities/serialization.d.ts +2 -2
  180. package/dist/lib/entities/serialization.d.ts.map +1 -1
  181. package/dist/lib/entities/serialization.js +3 -2
  182. package/dist/lib/entities/types.d.ts +20 -0
  183. package/dist/lib/entities/types.d.ts.map +1 -1
  184. package/dist/lib/locale.d.ts.map +1 -1
  185. package/dist/lib/locale.js +4 -1
  186. package/dist/lib/mcp/audit.d.ts +8 -4
  187. package/dist/lib/mcp/audit.d.ts.map +1 -1
  188. package/dist/lib/plugins/hook-system.d.ts +13 -0
  189. package/dist/lib/plugins/hook-system.d.ts.map +1 -1
  190. package/dist/lib/plugins/hook-system.js +32 -2
  191. package/dist/lib/scheduled-actions/handlers/index.d.ts +1 -0
  192. package/dist/lib/scheduled-actions/handlers/index.d.ts.map +1 -1
  193. package/dist/lib/scheduled-actions/handlers/index.js +3 -1
  194. package/dist/lib/scheduled-actions/handlers/security-notification.d.ts +26 -0
  195. package/dist/lib/scheduled-actions/handlers/security-notification.d.ts.map +1 -0
  196. package/dist/lib/scheduled-actions/handlers/security-notification.js +54 -0
  197. package/dist/lib/selectors/core-selectors.d.ts +12 -0
  198. package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
  199. package/dist/lib/selectors/domains/auth.selectors.d.ts +12 -0
  200. package/dist/lib/selectors/domains/auth.selectors.d.ts.map +1 -1
  201. package/dist/lib/selectors/domains/auth.selectors.js +14 -1
  202. package/dist/lib/selectors/selectors.d.ts +24 -0
  203. package/dist/lib/selectors/selectors.d.ts.map +1 -1
  204. package/dist/lib/services/api-docs.service.d.ts +5 -1
  205. package/dist/lib/services/api-docs.service.d.ts.map +1 -1
  206. package/dist/lib/services/api-presets.service.d.ts +6 -1
  207. package/dist/lib/services/api-presets.service.d.ts.map +1 -1
  208. package/dist/lib/services/feature.service.d.ts +58 -4
  209. package/dist/lib/services/feature.service.d.ts.map +1 -1
  210. package/dist/lib/services/generic-entity.service.d.ts.map +1 -1
  211. package/dist/lib/services/generic-entity.service.js +16 -32
  212. package/dist/lib/services/membership.service.d.ts +10 -2
  213. package/dist/lib/services/membership.service.d.ts.map +1 -1
  214. package/dist/lib/services/membership.service.js +37 -16
  215. package/dist/lib/services/permission.service.d.ts +10 -4
  216. package/dist/lib/services/permission.service.d.ts.map +1 -1
  217. package/dist/lib/services/plugin.service.d.ts +1 -1
  218. package/dist/lib/services/plugin.service.d.ts.map +1 -1
  219. package/dist/lib/services/subscription.service.d.ts.map +1 -1
  220. package/dist/lib/services/subscription.service.js +2 -1
  221. package/dist/lib/services/team-member.service.d.ts +15 -3
  222. package/dist/lib/services/team-member.service.d.ts.map +1 -1
  223. package/dist/lib/services/team-member.service.js +27 -6
  224. package/dist/lib/services/team.service.d.ts.map +1 -1
  225. package/dist/lib/teams/permissions.d.ts +3 -1
  226. package/dist/lib/teams/permissions.d.ts.map +1 -1
  227. package/dist/lib/teams/permissions.js +6 -0
  228. package/dist/lib/teams/schema.d.ts.map +1 -1
  229. package/dist/lib/teams/schema.js +3 -0
  230. package/dist/lib/template-resolver.d.ts +3 -3
  231. package/dist/lib/theme/forced-theme.d.ts +34 -0
  232. package/dist/lib/theme/forced-theme.d.ts.map +1 -0
  233. package/dist/lib/theme/forced-theme.js +27 -0
  234. package/dist/lib/theme/get-default-theme-mode.d.ts +3 -0
  235. package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
  236. package/dist/lib/theme/get-default-theme-mode.js +5 -3
  237. package/dist/lib/utils/cors.d.ts +13 -0
  238. package/dist/lib/utils/cors.d.ts.map +1 -1
  239. package/dist/lib/utils/cors.js +20 -0
  240. package/dist/messages/de/auth.json +25 -2
  241. package/dist/messages/de/index.d.ts +83 -0
  242. package/dist/messages/de/index.d.ts.map +1 -1
  243. package/dist/messages/de/index.js +2 -0
  244. package/dist/messages/de/index.ts +2 -0
  245. package/dist/messages/de/navigation.json +3 -1
  246. package/dist/messages/en/auth.json +25 -2
  247. package/dist/messages/en/index.d.ts +83 -0
  248. package/dist/messages/en/index.d.ts.map +1 -1
  249. package/dist/messages/en/index.js +2 -0
  250. package/dist/messages/en/index.ts +2 -0
  251. package/dist/messages/en/navigation.json +3 -1
  252. package/dist/messages/es/auth.json +25 -2
  253. package/dist/messages/es/index.d.ts +83 -0
  254. package/dist/messages/es/index.d.ts.map +1 -1
  255. package/dist/messages/es/index.js +2 -0
  256. package/dist/messages/es/index.ts +2 -0
  257. package/dist/messages/es/navigation.json +3 -1
  258. package/dist/messages/fr/auth.json +25 -2
  259. package/dist/messages/fr/index.d.ts +83 -0
  260. package/dist/messages/fr/index.d.ts.map +1 -1
  261. package/dist/messages/fr/index.js +2 -0
  262. package/dist/messages/fr/index.ts +2 -0
  263. package/dist/messages/fr/navigation.json +3 -1
  264. package/dist/messages/it/auth.json +25 -2
  265. package/dist/messages/it/index.d.ts +83 -0
  266. package/dist/messages/it/index.d.ts.map +1 -1
  267. package/dist/messages/it/index.js +2 -0
  268. package/dist/messages/it/index.ts +2 -0
  269. package/dist/messages/it/navigation.json +3 -1
  270. package/dist/messages/pt/auth.json +25 -2
  271. package/dist/messages/pt/index.d.ts +83 -0
  272. package/dist/messages/pt/index.d.ts.map +1 -1
  273. package/dist/messages/pt/index.js +2 -0
  274. package/dist/messages/pt/index.ts +2 -0
  275. package/dist/messages/pt/navigation.json +3 -1
  276. package/dist/migrations/005_api_audit_log.sql +2 -1
  277. package/dist/migrations/025_api_audit_log_nullable_api_key.sql +12 -0
  278. package/dist/migrations/026_login_events.sql +91 -0
  279. package/dist/migrations/027_rls_bypass_developer_and_system_admin_team.sql +197 -0
  280. package/dist/nextspark-registries.d.ts +580 -236
  281. package/dist/providers/DashboardProviders.d.ts +12 -3
  282. package/dist/providers/DashboardProviders.d.ts.map +1 -1
  283. package/dist/providers/DashboardProviders.js +6 -2
  284. package/dist/providers/theme-provider.d.ts +19 -2
  285. package/dist/providers/theme-provider.d.ts.map +1 -1
  286. package/dist/providers/theme-provider.js +6 -2
  287. package/dist/templates/app/(auth)/signup/page.tsx +8 -0
  288. package/dist/templates/app/(public)/[...slug]/page.tsx +9 -14
  289. package/dist/templates/app/api/auth/[...all]/route.ts +23 -1
  290. package/dist/templates/app/api/health/route.ts +4 -2
  291. package/dist/templates/app/api/internal/user-metadata/route.ts +5 -3
  292. package/dist/templates/app/api/mcp/route.ts +4 -1
  293. package/dist/templates/app/api/superadmin/subscriptions/route.ts +2 -1
  294. package/dist/templates/app/api/superadmin/teams/[teamId]/route.ts +4 -3
  295. package/dist/templates/app/api/superadmin/users/[userId]/route.ts +10 -3
  296. package/dist/templates/app/api/v1/api-keys/[id]/route.ts +50 -71
  297. package/dist/templates/app/api/v1/api-keys/route.ts +21 -43
  298. package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +14 -14
  299. package/dist/templates/app/api/v1/billing/cancel/route.ts +7 -6
  300. package/dist/templates/app/api/v1/billing/change-plan/route.ts +5 -4
  301. package/dist/templates/app/api/v1/billing/check-action/route.ts +6 -4
  302. package/dist/templates/app/api/v1/billing/checkout/route.ts +7 -5
  303. package/dist/templates/app/api/v1/billing/plans/route.ts +8 -12
  304. package/dist/templates/app/api/v1/billing/portal/route.ts +7 -5
  305. package/dist/templates/app/api/v1/billing/webhooks/polar/route.ts +1 -1
  306. package/dist/templates/app/api/v1/devtools/blocks/route.ts +5 -4
  307. package/dist/templates/app/api/v1/devtools/features/route.ts +5 -4
  308. package/dist/templates/app/api/v1/devtools/flows/route.ts +5 -4
  309. package/dist/templates/app/api/v1/devtools/scheduled-actions/route.ts +9 -7
  310. package/dist/templates/app/api/v1/devtools/scheduled-actions/run/route.ts +5 -4
  311. package/dist/templates/app/api/v1/devtools/testing/route.ts +5 -4
  312. package/dist/templates/app/api/v1/media/[id]/route.ts +13 -25
  313. package/dist/templates/app/api/v1/media/[id]/tags/route.ts +17 -25
  314. package/dist/templates/app/api/v1/media/check-duplicates/route.ts +5 -7
  315. package/dist/templates/app/api/v1/media/route.ts +5 -9
  316. package/dist/templates/app/api/v1/media/upload/route.ts +9 -21
  317. package/dist/templates/app/api/v1/media-tags/route.ts +9 -13
  318. package/dist/templates/app/api/v1/patterns/[id]/usages/route.ts +11 -19
  319. package/dist/templates/app/api/v1/post-categories/[id]/route.ts +9 -7
  320. package/dist/templates/app/api/v1/post-categories/route.ts +5 -4
  321. package/dist/templates/app/api/v1/team-invitations/[token]/accept/route.ts +16 -18
  322. package/dist/templates/app/api/v1/team-invitations/[token]/decline/route.ts +15 -17
  323. package/dist/templates/app/api/v1/team-invitations/[token]/route.ts +8 -8
  324. package/dist/templates/app/api/v1/team-invitations/route.ts +9 -11
  325. package/dist/templates/app/api/v1/teams/[teamId]/invitations/route.ts +41 -32
  326. package/dist/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +15 -16
  327. package/dist/templates/app/api/v1/teams/[teamId]/invoices/route.ts +14 -15
  328. package/dist/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +32 -36
  329. package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +33 -33
  330. package/dist/templates/app/api/v1/teams/[teamId]/route.ts +35 -41
  331. package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +5 -3
  332. package/dist/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +10 -6
  333. package/dist/templates/app/api/v1/teams/route.ts +33 -27
  334. package/dist/templates/app/api/v1/teams/switch/route.ts +11 -13
  335. package/dist/templates/app/api/v1/theme/[...path]/route.ts +23 -2
  336. package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +32 -77
  337. package/dist/templates/app/api/v1/users/[id]/route.ts +35 -68
  338. package/dist/templates/app/api/v1/users/route.ts +21 -25
  339. package/dist/templates/app/dashboard/layout.tsx +2 -6
  340. package/dist/templates/app/layout.ppr.tsx +15 -15
  341. package/dist/templates/app/layout.tsx +46 -20
  342. package/dist/templates/contents/themes/starter/config/app.config.ts +19 -0
  343. package/dist/templates/contents/themes/starter/config/theme.config.ts +6 -0
  344. package/dist/templates/contents/themes/starter/styles/globals.css +6 -2
  345. package/dist/templates/proxy.ts +46 -10
  346. package/dist/templates/tsconfig.json +4 -0
  347. package/dist/types/theme.d.ts +9 -0
  348. package/dist/types/theme.d.ts.map +1 -1
  349. package/migrations/005_api_audit_log.sql +2 -1
  350. package/migrations/025_api_audit_log_nullable_api_key.sql +12 -0
  351. package/migrations/026_login_events.sql +91 -0
  352. package/migrations/027_rls_bypass_developer_and_system_admin_team.sql +197 -0
  353. package/package.json +14 -11
  354. package/scripts/build/registry/__tests__/scope-registry.test.mjs +18 -0
  355. package/scripts/build/registry/generators/scope-registry.mjs +9 -2
  356. package/templates/app/(auth)/signup/page.tsx +8 -0
  357. package/templates/app/(public)/[...slug]/page.tsx +9 -14
  358. package/templates/app/api/auth/[...all]/route.ts +23 -1
  359. package/templates/app/api/health/route.ts +4 -2
  360. package/templates/app/api/internal/user-metadata/route.ts +5 -3
  361. package/templates/app/api/mcp/route.ts +4 -1
  362. package/templates/app/api/superadmin/subscriptions/route.ts +2 -1
  363. package/templates/app/api/superadmin/teams/[teamId]/route.ts +4 -3
  364. package/templates/app/api/superadmin/users/[userId]/route.ts +10 -3
  365. package/templates/app/api/v1/api-keys/[id]/route.ts +50 -71
  366. package/templates/app/api/v1/api-keys/route.ts +21 -43
  367. package/templates/app/api/v1/auth/signup-with-invite/route.ts +14 -14
  368. package/templates/app/api/v1/billing/cancel/route.ts +7 -6
  369. package/templates/app/api/v1/billing/change-plan/route.ts +5 -4
  370. package/templates/app/api/v1/billing/check-action/route.ts +6 -4
  371. package/templates/app/api/v1/billing/checkout/route.ts +7 -5
  372. package/templates/app/api/v1/billing/plans/route.ts +8 -12
  373. package/templates/app/api/v1/billing/portal/route.ts +7 -5
  374. package/templates/app/api/v1/billing/webhooks/polar/route.ts +1 -1
  375. package/templates/app/api/v1/devtools/blocks/route.ts +5 -4
  376. package/templates/app/api/v1/devtools/features/route.ts +5 -4
  377. package/templates/app/api/v1/devtools/flows/route.ts +5 -4
  378. package/templates/app/api/v1/devtools/scheduled-actions/route.ts +9 -7
  379. package/templates/app/api/v1/devtools/scheduled-actions/run/route.ts +5 -4
  380. package/templates/app/api/v1/devtools/testing/route.ts +5 -4
  381. package/templates/app/api/v1/media/[id]/route.ts +13 -25
  382. package/templates/app/api/v1/media/[id]/tags/route.ts +17 -25
  383. package/templates/app/api/v1/media/check-duplicates/route.ts +5 -7
  384. package/templates/app/api/v1/media/route.ts +5 -9
  385. package/templates/app/api/v1/media/upload/route.ts +9 -21
  386. package/templates/app/api/v1/media-tags/route.ts +9 -13
  387. package/templates/app/api/v1/patterns/[id]/usages/route.ts +11 -19
  388. package/templates/app/api/v1/post-categories/[id]/route.ts +9 -7
  389. package/templates/app/api/v1/post-categories/route.ts +5 -4
  390. package/templates/app/api/v1/team-invitations/[token]/accept/route.ts +16 -18
  391. package/templates/app/api/v1/team-invitations/[token]/decline/route.ts +15 -17
  392. package/templates/app/api/v1/team-invitations/[token]/route.ts +8 -8
  393. package/templates/app/api/v1/team-invitations/route.ts +9 -11
  394. package/templates/app/api/v1/teams/[teamId]/invitations/route.ts +41 -32
  395. package/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +15 -16
  396. package/templates/app/api/v1/teams/[teamId]/invoices/route.ts +14 -15
  397. package/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +32 -36
  398. package/templates/app/api/v1/teams/[teamId]/members/route.ts +33 -33
  399. package/templates/app/api/v1/teams/[teamId]/route.ts +35 -41
  400. package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +5 -3
  401. package/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +10 -6
  402. package/templates/app/api/v1/teams/route.ts +33 -27
  403. package/templates/app/api/v1/teams/switch/route.ts +11 -13
  404. package/templates/app/api/v1/theme/[...path]/route.ts +23 -2
  405. package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +32 -77
  406. package/templates/app/api/v1/users/[id]/route.ts +35 -68
  407. package/templates/app/api/v1/users/route.ts +21 -25
  408. package/templates/app/dashboard/layout.tsx +2 -6
  409. package/templates/app/layout.ppr.tsx +15 -15
  410. package/templates/app/layout.tsx +46 -20
  411. package/templates/contents/themes/starter/config/app.config.ts +19 -0
  412. package/templates/contents/themes/starter/config/theme.config.ts +6 -0
  413. package/templates/contents/themes/starter/styles/globals.css +6 -2
  414. package/templates/proxy.ts +46 -10
  415. package/templates/tsconfig.json +4 -0
  416. package/tests/jest/__mocks__/@nextsparkjs/registries/permissions-registry.ts +23 -0
  417. package/tests/jest/__mocks__/next-server.js +24 -0
  418. package/dist/components/teams/TeamSwitchModal.d.js +0 -0
  419. package/dist/components/ui/accordion.d.js +0 -0
  420. package/dist/components/ui/avatar.d.js +0 -0
  421. package/dist/components/ui/badge.d.js +0 -0
  422. package/dist/components/ui/button.d.js +0 -0
  423. package/dist/components/ui/card.d.js +0 -0
  424. package/dist/components/ui/dialog.d.js +0 -0
  425. package/dist/components/ui/dropdown-menu.d.js +0 -0
  426. package/dist/components/ui/input.d.js +0 -0
  427. package/dist/components/ui/progress.d.js +0 -0
  428. package/dist/components/ui/scroll-area.d.js +0 -0
  429. package/dist/components/ui/select.d.js +0 -0
  430. package/dist/components/ui/separator.d.js +0 -0
  431. package/dist/components/ui/table.d.js +0 -0
  432. package/dist/components/ui/textarea.d.js +0 -0
  433. package/dist/contexts/TeamContext.d.js +0 -0
  434. package/dist/hooks/useAuth.d.js +0 -0
  435. package/dist/hooks/useLastAuthMethod.d.js +0 -0
  436. package/dist/hooks/useOrigin.d.js +0 -0
  437. package/dist/lib/api/auth/dual-auth.d.js +0 -0
  438. package/dist/lib/api/auth.d.js +0 -0
  439. package/dist/lib/api/cache.d.js +0 -0
  440. package/dist/lib/api/keys.d.js +0 -0
  441. package/dist/lib/auth-client.d.js +0 -0
  442. package/dist/lib/auth-context.d.js +0 -0
  443. package/dist/lib/auth.d.js +0 -0
  444. package/dist/lib/billing/config-types.d.js +0 -0
  445. package/dist/lib/billing/enforcement.d.js +0 -0
  446. package/dist/lib/billing/helpers.d.js +0 -0
  447. package/dist/lib/billing/jobs.d.js +0 -0
  448. package/dist/lib/billing/types.d.js +0 -0
  449. package/dist/lib/blocks/loader.d.js +0 -0
  450. package/dist/lib/config/app.config.d.js +0 -0
  451. package/dist/lib/config/config-loader.d.js +0 -0
  452. package/dist/lib/config/config-sync.d.js +0 -0
  453. package/dist/lib/config/config-types.d.js +0 -0
  454. package/dist/lib/config/config-utils.d.js +0 -0
  455. package/dist/lib/config/dashboard-types.d.js +0 -0
  456. package/dist/lib/config/dashboard.config.d.js +0 -0
  457. package/dist/lib/config/icon-map.d.js +0 -0
  458. package/dist/lib/config/index.d.js +0 -7
  459. package/dist/lib/config/nextspark-types.d.js +0 -0
  460. package/dist/lib/config/roles-merge.d.js +0 -0
  461. package/dist/lib/config/types.d.js +0 -0
  462. package/dist/lib/db.d.js +0 -0
  463. package/dist/lib/email/factory.d.js +0 -0
  464. package/dist/lib/email/index.d.js +0 -3
  465. package/dist/lib/email/providers/console.d.js +0 -0
  466. package/dist/lib/email/providers/resend.d.js +0 -0
  467. package/dist/lib/email/templates.d.js +0 -0
  468. package/dist/lib/email/types.d.js +0 -0
  469. package/dist/lib/entities/types.d.js +0 -0
  470. package/dist/lib/permissions/system.d.js +0 -0
  471. package/dist/lib/permissions/types.d.js +0 -0
  472. package/dist/lib/plugins/hook-system.d.js +0 -0
  473. package/dist/lib/scheduled-actions/cleanup.d.js +0 -0
  474. package/dist/lib/scheduled-actions/index.d.js +0 -19
  475. package/dist/lib/scheduled-actions/initializer.d.js +0 -1
  476. package/dist/lib/scheduled-actions/processor.d.js +0 -0
  477. package/dist/lib/scheduled-actions/registry.d.js +0 -0
  478. package/dist/lib/scheduled-actions/scheduler.d.js +0 -0
  479. package/dist/lib/scheduled-actions/types.d.js +0 -0
  480. package/dist/lib/services/api-routes.service.d.js +0 -0
  481. package/dist/lib/services/entity-type.service.d.js +0 -0
  482. package/dist/lib/services/index.d.js +0 -40
  483. package/dist/lib/services/invoice.service.d.js +0 -0
  484. package/dist/lib/services/membership.service.d.js +0 -0
  485. package/dist/lib/services/meta.service.d.js +0 -0
  486. package/dist/lib/services/middleware.service.d.js +0 -0
  487. package/dist/lib/services/namespace.service.d.js +0 -0
  488. package/dist/lib/services/permission.service.d.js +0 -0
  489. package/dist/lib/services/plan.service.d.js +0 -0
  490. package/dist/lib/services/plugin.service.d.js +0 -0
  491. package/dist/lib/services/route-handler.service.d.js +0 -0
  492. package/dist/lib/services/scope.service.d.js +0 -0
  493. package/dist/lib/services/subscription.service.d.js +0 -0
  494. package/dist/lib/services/team-member.service.d.js +0 -0
  495. package/dist/lib/services/team.service.d.js +0 -0
  496. package/dist/lib/services/theme.service.d.js +0 -0
  497. package/dist/lib/services/usage.service.d.js +0 -0
  498. package/dist/lib/services/user-flags.service.d.js +0 -0
  499. package/dist/lib/services/user.service.d.js +0 -0
  500. package/dist/lib/teams/helpers.d.js +0 -0
  501. package/dist/lib/teams/permissions.d.js +0 -0
  502. package/dist/lib/teams/types.d.js +0 -0
  503. package/dist/lib/utils/config-merge.d.js +0 -0
  504. package/dist/lib/utils/file-logger.d.js +0 -0
  505. package/dist/lib/utils.d.js +0 -0
  506. package/dist/styles/classes.json +0 -1093
  507. package/dist/styles/ui.css +0 -2
  508. package/dist/types/auth.d.js +0 -0
  509. package/dist/types/blocks.d.js +0 -0
  510. package/dist/types/meta.types.d.js +0 -0
  511. package/dist/types/plugin.d.js +0 -0
  512. package/dist/types/testing.types.d.js +0 -0
  513. package/dist/types/theme.d.js +0 -0
  514. package/dist/types/user.types.d.js +0 -0
  515. package/scripts/build/build-ui-css.mjs +0 -351
  516. /package/dist/{components/app/layouts/PublicFooter.d.js → lib/auth/security-notifications/types.js} +0 -0
  517. /package/dist/{components/app/layouts/PublicNavbar.d.js → nextspark-registries.d.js} +0 -0
  518. /package/dist/{components/app/misc/ThemeToggle.d.js → types/use-intl-react-shim.d.js} +0 -0
@@ -0,0 +1,157 @@
1
+ import { AUTH_CONFIG, I18N_CONFIG, APP_NAME } from "../../config/index.js";
2
+ import { queryWithRLS, mutateWithRLS } from "../../db.js";
3
+ import { scheduleAction, isActionRegistered } from "../../scheduled-actions/index.js";
4
+ import { registerSecurityNotificationAction } from "../../scheduled-actions/handlers/security-notification.js";
5
+ import { computeDeviceFingerprint, extractClientIp } from "./device-fingerprint.js";
6
+ const ACTION_TYPE = "auth:security-notification";
7
+ function getPathname(req) {
8
+ var _a;
9
+ try {
10
+ const pathname = (_a = req.nextUrl) == null ? void 0 : _a.pathname;
11
+ if (pathname) return pathname;
12
+ } catch {
13
+ }
14
+ try {
15
+ return new URL(req.url).pathname;
16
+ } catch {
17
+ return "";
18
+ }
19
+ }
20
+ function isOk(response) {
21
+ return response.status >= 200 && response.status < 300;
22
+ }
23
+ function resolveAppName() {
24
+ return process.env.NEXT_PUBLIC_APP_NAME || APP_NAME || "Your App";
25
+ }
26
+ function ensureHandlerRegistered() {
27
+ if (!isActionRegistered(ACTION_TYPE)) {
28
+ registerSecurityNotificationAction();
29
+ }
30
+ }
31
+ async function queueNotification(userId, payload) {
32
+ if (!payload.to) return;
33
+ ensureHandlerRegistered();
34
+ await scheduleAction(ACTION_TYPE, {
35
+ ...payload,
36
+ // entityId+entityType drive the scheduler's dedup so a double-submit of the
37
+ // same event for the same user within the dedup window collapses to one email.
38
+ entityId: `${userId}:${payload.type}`,
39
+ entityType: "security-notification"
40
+ });
41
+ }
42
+ async function handleNewDeviceLogin(req, body) {
43
+ var _a;
44
+ const user = body.user;
45
+ if (!(user == null ? void 0 : user.id)) return;
46
+ const ip = extractClientIp(req.headers);
47
+ const userAgent = req.headers.get("user-agent");
48
+ const fingerprint = computeDeviceFingerprint(userAgent, ip);
49
+ const ttlDays = ((_a = AUTH_CONFIG.securityNotifications) == null ? void 0 : _a.fingerprintTtlDays) ?? null;
50
+ const params = [user.id, fingerprint];
51
+ let ttlClause = "";
52
+ if (typeof ttlDays === "number" && ttlDays > 0) {
53
+ ttlClause = `AND "createdAt" > now() - make_interval(days => $3)`;
54
+ params.push(ttlDays);
55
+ }
56
+ const existing = await queryWithRLS(
57
+ `SELECT id FROM "login_events"
58
+ WHERE "userId" = $1 AND "deviceFingerprint" = $2 ${ttlClause}
59
+ LIMIT 1`,
60
+ params,
61
+ null
62
+ );
63
+ const isNew = existing.length === 0;
64
+ await mutateWithRLS(
65
+ `INSERT INTO "login_events"
66
+ ("userId", "ipAddress", "userAgent", "deviceFingerprint", "isNew")
67
+ VALUES ($1, $2, $3, $4, $5)`,
68
+ [user.id, ip === "unknown" ? null : ip, userAgent, fingerprint, isNew],
69
+ null
70
+ );
71
+ if (!isNew) return;
72
+ await queueNotification(user.id, {
73
+ type: "newDeviceLogin",
74
+ locale: user.language || I18N_CONFIG.defaultLocale,
75
+ appName: resolveAppName(),
76
+ to: user.email || "",
77
+ userName: user.firstName || user.name,
78
+ ipAddress: ip === "unknown" ? void 0 : ip,
79
+ userAgent: userAgent || void 0,
80
+ occurredAt: (/* @__PURE__ */ new Date()).toISOString()
81
+ });
82
+ }
83
+ async function handlePasswordChanged(body) {
84
+ const user = body.user;
85
+ if (!(user == null ? void 0 : user.id) || !user.email) return;
86
+ await queueNotification(user.id, {
87
+ type: "passwordChanged",
88
+ locale: user.language || I18N_CONFIG.defaultLocale,
89
+ appName: resolveAppName(),
90
+ to: user.email,
91
+ userName: user.firstName || user.name,
92
+ occurredAt: (/* @__PURE__ */ new Date()).toISOString()
93
+ });
94
+ }
95
+ async function handleEmailChanged(req) {
96
+ const { auth } = await import("../../auth.js");
97
+ const session = await auth.api.getSession({ headers: req.headers });
98
+ const user = session == null ? void 0 : session.user;
99
+ if (!(user == null ? void 0 : user.id) || !user.email) return;
100
+ let newEmail;
101
+ try {
102
+ const reqBody = await req.json();
103
+ newEmail = reqBody == null ? void 0 : reqBody.newEmail;
104
+ } catch {
105
+ }
106
+ await queueNotification(user.id, {
107
+ type: "emailChanged",
108
+ locale: user.language || I18N_CONFIG.defaultLocale,
109
+ appName: resolveAppName(),
110
+ to: user.email,
111
+ // OLD address — deliberate
112
+ userName: user.firstName || user.name,
113
+ newEmail,
114
+ occurredAt: (/* @__PURE__ */ new Date()).toISOString()
115
+ });
116
+ }
117
+ function classifyEvent(pathname) {
118
+ if (pathname.endsWith("/sign-in/email") || pathname.endsWith("/sign-in/email-otp")) {
119
+ return "newDeviceLogin";
120
+ }
121
+ if (pathname.endsWith("/change-password")) return "passwordChanged";
122
+ if (pathname.endsWith("/change-email")) return "emailChanged";
123
+ return null;
124
+ }
125
+ async function dispatchSecurityNotificationsForRequest(req, response) {
126
+ var _a, _b, _c;
127
+ try {
128
+ const cfg = AUTH_CONFIG.securityNotifications;
129
+ if (!(cfg == null ? void 0 : cfg.enabled)) return;
130
+ if (!isOk(response)) return;
131
+ const event = classifyEvent(getPathname(req));
132
+ if (!event) return;
133
+ if (event === "newDeviceLogin" && !((_a = cfg.events) == null ? void 0 : _a.newDeviceLogin)) return;
134
+ if (event === "passwordChanged" && !((_b = cfg.events) == null ? void 0 : _b.passwordChanged)) return;
135
+ if (event === "emailChanged" && !((_c = cfg.events) == null ? void 0 : _c.emailChanged)) return;
136
+ if (event === "emailChanged") {
137
+ await handleEmailChanged(req);
138
+ return;
139
+ }
140
+ let body;
141
+ try {
142
+ body = await response.clone().json();
143
+ } catch {
144
+ return;
145
+ }
146
+ if (event === "newDeviceLogin") {
147
+ await handleNewDeviceLogin(req, body);
148
+ } else {
149
+ await handlePasswordChanged(body);
150
+ }
151
+ } catch (error) {
152
+ console.error("[security-notifications] dispatch failed:", error);
153
+ }
154
+ }
155
+ export {
156
+ dispatchSecurityNotificationsForRequest
157
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Built-in security email notifications (issue #75).
3
+ *
4
+ * Public surface:
5
+ * - dispatchSecurityNotificationsForRequest(req, response) → wire into the
6
+ * Better Auth route handler (best-effort, guarded by config).
7
+ * - registerSecurityEmailTemplate(type, locale, builder) → theme branding
8
+ * / localization override, no core fork required.
9
+ * - computeDeviceFingerprint(ua, ip) / extractClientIp(headers) → fingerprint
10
+ * primitives (also used by tests).
11
+ *
12
+ * The scheduled-action handler that actually sends the email lives at
13
+ * `@nextsparkjs/core/lib/scheduled-actions/handlers` as
14
+ * `registerSecurityNotificationAction()`.
15
+ */
16
+ export { dispatchSecurityNotificationsForRequest } from './dispatcher';
17
+ export { registerSecurityEmailTemplate, getSecurityEmailTemplate, clearSecurityEmailTemplates, } from './registry';
18
+ export { computeDeviceFingerprint, extractClientIp, normalizeUserAgent, ipToNetworkKey, } from './device-fingerprint';
19
+ export type { SecurityEventType, SecurityEmailContext, SecurityEmailContent, SecurityEmailTemplateBuilder, SecurityNotificationActionPayload, } from './types';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/security-notifications/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uCAAuC,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,SAAS,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { dispatchSecurityNotificationsForRequest } from "./dispatcher.js";
2
+ import {
3
+ registerSecurityEmailTemplate,
4
+ getSecurityEmailTemplate,
5
+ clearSecurityEmailTemplates
6
+ } from "./registry.js";
7
+ import {
8
+ computeDeviceFingerprint,
9
+ extractClientIp,
10
+ normalizeUserAgent,
11
+ ipToNetworkKey
12
+ } from "./device-fingerprint.js";
13
+ export {
14
+ clearSecurityEmailTemplates,
15
+ computeDeviceFingerprint,
16
+ dispatchSecurityNotificationsForRequest,
17
+ extractClientIp,
18
+ getSecurityEmailTemplate,
19
+ ipToNetworkKey,
20
+ normalizeUserAgent,
21
+ registerSecurityEmailTemplate
22
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Template registry for security emails.
3
+ *
4
+ * Resolution order for a given (type, locale):
5
+ * 1. a theme-registered builder for the exact `type:locale`
6
+ * 2. a theme-registered builder for the language-only `type:<lang>` (e.g. es-AR → es)
7
+ * 3. a theme-registered builder for `type:*` (locale-agnostic override)
8
+ * 4. the core baseline builder for that type (locale-aware ES/EN copy)
9
+ *
10
+ * The registry lives on globalThis so it survives Next.js HMR module reloads in
11
+ * dev — same pattern as the scheduled-actions registry.
12
+ */
13
+ import type { SecurityEventType, SecurityEmailTemplateBuilder } from './types';
14
+ /**
15
+ * Register (or override) a security-email template for a `(type, locale)` pair.
16
+ *
17
+ * Themes call this from their bootstrap to brand/translate the built-in security
18
+ * emails without forking core. Pass `'*'` as the locale to override a type for
19
+ * every locale.
20
+ *
21
+ * @example
22
+ * registerSecurityEmailTemplate('newDeviceLogin', 'es', (ctx) => ({
23
+ * subject: `🔐 Nuevo inicio de sesión en ${ctx.appName}`,
24
+ * html: renderBranding(ctx),
25
+ * }))
26
+ */
27
+ export declare function registerSecurityEmailTemplate(type: SecurityEventType, locale: string, builder: SecurityEmailTemplateBuilder): void;
28
+ /**
29
+ * Resolve the effective builder for a `(type, locale)`, applying the fallback
30
+ * chain described at the top of the file. Always returns a builder (baseline is
31
+ * guaranteed to exist for every SecurityEventType).
32
+ */
33
+ export declare function getSecurityEmailTemplate(type: SecurityEventType, locale: string): SecurityEmailTemplateBuilder;
34
+ /** Test helper: drop all theme-registered overrides (baseline is untouched). */
35
+ export declare function clearSecurityEmailTemplates(): void;
36
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/security-notifications/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,SAAS,CAAA;AAuBhB;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GACpC,IAAI,CAEN;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,GACb,4BAA4B,CAS9B;AAED,gFAAgF;AAChF,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
@@ -0,0 +1,26 @@
1
+ import newDeviceLogin from "./templates/new-device-login.js";
2
+ import passwordChanged from "./templates/password-changed.js";
3
+ import emailChanged from "./templates/email-changed.js";
4
+ const BASELINE = {
5
+ newDeviceLogin,
6
+ passwordChanged,
7
+ emailChanged
8
+ };
9
+ const globalForTemplates = globalThis;
10
+ const templateRegistry = globalForTemplates.__securityEmailTemplates ??= /* @__PURE__ */ new Map();
11
+ const key = (type, locale) => `${type}:${locale}`;
12
+ function registerSecurityEmailTemplate(type, locale, builder) {
13
+ templateRegistry.set(key(type, locale), builder);
14
+ }
15
+ function getSecurityEmailTemplate(type, locale) {
16
+ const lang = (locale || "").split("-")[0];
17
+ return templateRegistry.get(key(type, locale)) ?? (lang && lang !== locale ? templateRegistry.get(key(type, lang)) : void 0) ?? templateRegistry.get(key(type, "*")) ?? BASELINE[type];
18
+ }
19
+ function clearSecurityEmailTemplates() {
20
+ templateRegistry.clear();
21
+ }
22
+ export {
23
+ clearSecurityEmailTemplates,
24
+ getSecurityEmailTemplate,
25
+ registerSecurityEmailTemplate
26
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Baseline "email changed" security email (ES/EN).
3
+ *
4
+ * IMPORTANT: this notification is sent to the OLD address — it is the account
5
+ * owner's last chance to notice (and react to) an attacker moving the account to
6
+ * a new email. The new address will get Better Auth's own verification flow.
7
+ *
8
+ * Overridable per (type, locale) via registerSecurityEmailTemplate.
9
+ */
10
+ import type { SecurityEmailContext, SecurityEmailContent } from '../types';
11
+ export default function emailChanged(ctx: SecurityEmailContext): SecurityEmailContent;
12
+ //# sourceMappingURL=email-changed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-changed.d.ts","sourceRoot":"","sources":["../../../../../src/lib/auth/security-notifications/templates/email-changed.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AA+B1E,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,oBAAoB,GAAG,oBAAoB,CAkBpF"}
@@ -0,0 +1,43 @@
1
+ import { baseLayout, content, detailRows, escapeHtml, resolveBaselineLocale } from "./shared.js";
2
+ const COPY = {
3
+ en: {
4
+ subject: (app) => `Your ${app} email address is being changed`,
5
+ heading: "Email address change requested",
6
+ greeting: (name) => `Hi${name ? ` ${name}` : ""},`,
7
+ intro: (app) => `We received a request to change the email address on your ${app} account.`,
8
+ newLabel: "New email",
9
+ whenLabel: "When",
10
+ reassurance: "If you requested this, you can ignore this message. If you did NOT request it, contact support immediately \u2014 this email address may still control the account until the change is confirmed.",
11
+ footer: (app) => `This is an automated security email from ${app}, sent to your current address.`
12
+ },
13
+ es: {
14
+ subject: (app) => `Se est\xE1 cambiando el correo de tu cuenta de ${app}`,
15
+ heading: "Solicitud de cambio de correo",
16
+ greeting: (name) => `Hola${name ? ` ${name}` : ""},`,
17
+ intro: (app) => `Recibimos una solicitud para cambiar la direcci\xF3n de correo de tu cuenta de ${app}.`,
18
+ newLabel: "Nuevo correo",
19
+ whenLabel: "Fecha",
20
+ reassurance: "Si vos lo solicitaste, pod\xE9s ignorar este mensaje. Si NO lo solicitaste, contact\xE1 a soporte de inmediato: esta direcci\xF3n todav\xEDa puede controlar la cuenta hasta que se confirme el cambio.",
21
+ footer: (app) => `Este es un correo de seguridad autom\xE1tico de ${app}, enviado a tu direcci\xF3n actual.`
22
+ }
23
+ };
24
+ function emailChanged(ctx) {
25
+ const t = COPY[resolveBaselineLocale(ctx.locale)];
26
+ const app = ctx.appName;
27
+ const bodyHtml = `
28
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 12px 0;">${escapeHtml(t.greeting(ctx.userName))}</p>
29
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 8px 0;">${escapeHtml(t.intro(app))}</p>
30
+ ${detailRows([
31
+ { label: t.newLabel, value: ctx.newEmail },
32
+ { label: t.whenLabel, value: ctx.occurredAt }
33
+ ])}
34
+ <p style="color:#b45309;font-size:14px;line-height:1.6;margin:0;">${escapeHtml(t.reassurance)}</p>
35
+ `;
36
+ return content(
37
+ t.subject(app),
38
+ baseLayout({ appName: app, heading: t.heading, bodyHtml, footer: t.footer(app) })
39
+ );
40
+ }
41
+ export {
42
+ emailChanged as default
43
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Baseline "new device login" security email (ES/EN).
3
+ * Overridable per (type, locale) via registerSecurityEmailTemplate.
4
+ */
5
+ import type { SecurityEmailContext, SecurityEmailContent } from '../types';
6
+ export default function newDeviceLogin(ctx: SecurityEmailContext): SecurityEmailContent;
7
+ //# sourceMappingURL=new-device-login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-device-login.d.ts","sourceRoot":"","sources":["../../../../../src/lib/auth/security-notifications/templates/new-device-login.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAgC1E,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,oBAAoB,GAAG,oBAAoB,CAmBtF"}
@@ -0,0 +1,46 @@
1
+ import { baseLayout, content, detailRows, escapeHtml, resolveBaselineLocale } from "./shared.js";
2
+ const COPY = {
3
+ en: {
4
+ subject: (app) => `New sign-in to your ${app} account`,
5
+ heading: "New device sign-in",
6
+ greeting: (name) => `Hi${name ? ` ${name}` : ""},`,
7
+ intro: (app) => `We noticed a sign-in to your ${app} account from a device or location we haven't seen before.`,
8
+ ipLabel: "IP address",
9
+ deviceLabel: "Device",
10
+ whenLabel: "When",
11
+ reassurance: "If this was you, you can safely ignore this email. If you don't recognize this activity, change your password immediately.",
12
+ footer: (app) => `This is an automated security email from ${app}.`
13
+ },
14
+ es: {
15
+ subject: (app) => `Nuevo inicio de sesi\xF3n en tu cuenta de ${app}`,
16
+ heading: "Inicio de sesi\xF3n desde un nuevo dispositivo",
17
+ greeting: (name) => `Hola${name ? ` ${name}` : ""},`,
18
+ intro: (app) => `Detectamos un inicio de sesi\xF3n en tu cuenta de ${app} desde un dispositivo o ubicaci\xF3n que no hab\xEDamos visto antes.`,
19
+ ipLabel: "Direcci\xF3n IP",
20
+ deviceLabel: "Dispositivo",
21
+ whenLabel: "Fecha",
22
+ reassurance: "Si fuiste vos, pod\xE9s ignorar este correo. Si no reconoc\xE9s esta actividad, cambi\xE1 tu contrase\xF1a de inmediato.",
23
+ footer: (app) => `Este es un correo de seguridad autom\xE1tico de ${app}.`
24
+ }
25
+ };
26
+ function newDeviceLogin(ctx) {
27
+ const t = COPY[resolveBaselineLocale(ctx.locale)];
28
+ const app = ctx.appName;
29
+ const bodyHtml = `
30
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 12px 0;">${escapeHtml(t.greeting(ctx.userName))}</p>
31
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 8px 0;">${escapeHtml(t.intro(app))}</p>
32
+ ${detailRows([
33
+ { label: t.deviceLabel, value: ctx.userAgent },
34
+ { label: t.ipLabel, value: ctx.ipAddress },
35
+ { label: t.whenLabel, value: ctx.occurredAt }
36
+ ])}
37
+ <p style="color:#b45309;font-size:14px;line-height:1.6;margin:0;">${escapeHtml(t.reassurance)}</p>
38
+ `;
39
+ return content(
40
+ t.subject(app),
41
+ baseLayout({ appName: app, heading: t.heading, bodyHtml, footer: t.footer(app) })
42
+ );
43
+ }
44
+ export {
45
+ newDeviceLogin as default
46
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Baseline "password changed" security email (ES/EN).
3
+ * Overridable per (type, locale) via registerSecurityEmailTemplate.
4
+ */
5
+ import type { SecurityEmailContext, SecurityEmailContent } from '../types';
6
+ export default function passwordChanged(ctx: SecurityEmailContext): SecurityEmailContent;
7
+ //# sourceMappingURL=password-changed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-changed.d.ts","sourceRoot":"","sources":["../../../../../src/lib/auth/security-notifications/templates/password-changed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAwB1E,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,GAAG,EAAE,oBAAoB,GAAG,oBAAoB,CAcvF"}
@@ -0,0 +1,35 @@
1
+ import { baseLayout, content, escapeHtml, resolveBaselineLocale } from "./shared.js";
2
+ const COPY = {
3
+ en: {
4
+ subject: (app) => `Your ${app} password was changed`,
5
+ heading: "Password changed",
6
+ greeting: (name) => `Hi${name ? ` ${name}` : ""},`,
7
+ intro: (app) => `The password for your ${app} account was just changed.`,
8
+ reassurance: "If you made this change, no action is needed. If you did NOT change your password, reset it immediately and contact support.",
9
+ footer: (app) => `This is an automated security email from ${app}.`
10
+ },
11
+ es: {
12
+ subject: (app) => `Se cambi\xF3 la contrase\xF1a de tu cuenta de ${app}`,
13
+ heading: "Contrase\xF1a actualizada",
14
+ greeting: (name) => `Hola${name ? ` ${name}` : ""},`,
15
+ intro: (app) => `La contrase\xF1a de tu cuenta de ${app} se acaba de cambiar.`,
16
+ reassurance: "Si hiciste este cambio, no necesit\xE1s hacer nada. Si NO cambiaste tu contrase\xF1a, restablecela de inmediato y contact\xE1 a soporte.",
17
+ footer: (app) => `Este es un correo de seguridad autom\xE1tico de ${app}.`
18
+ }
19
+ };
20
+ function passwordChanged(ctx) {
21
+ const t = COPY[resolveBaselineLocale(ctx.locale)];
22
+ const app = ctx.appName;
23
+ const bodyHtml = `
24
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 12px 0;">${escapeHtml(t.greeting(ctx.userName))}</p>
25
+ <p style="color:#374151;font-size:15px;line-height:1.6;margin:0 0 16px 0;">${escapeHtml(t.intro(app))}</p>
26
+ <p style="color:#b45309;font-size:14px;line-height:1.6;margin:0;">${escapeHtml(t.reassurance)}</p>
27
+ `;
28
+ return content(
29
+ t.subject(app),
30
+ baseLayout({ appName: app, heading: t.heading, bodyHtml, footer: t.footer(app) })
31
+ );
32
+ }
33
+ export {
34
+ passwordChanged as default
35
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Shared helpers for the baseline security-email templates.
3
+ *
4
+ * The baseline templates ship self-contained ES/EN copy (no next-intl
5
+ * dependency) so they render correctly inside the scheduled-action worker with
6
+ * zero i18n wiring, and so unit tests stay hermetic. Themes that want full
7
+ * branding or additional locales register their own builders via
8
+ * `registerSecurityEmailTemplate(type, locale, builder)` — those take
9
+ * precedence over everything here.
10
+ */
11
+ import type { SecurityEmailContent } from '../types';
12
+ /** Locales the baseline copy is written in. Anything else falls back to 'en'. */
13
+ export type BaselineLocale = 'es' | 'en';
14
+ /** Map any BCP47 locale to the closest baseline locale ('es' or 'en'). */
15
+ export declare function resolveBaselineLocale(locale: string | undefined): BaselineLocale;
16
+ /** Escape a value for safe interpolation into HTML text/attributes. */
17
+ export declare function escapeHtml(value: string | undefined | null): string;
18
+ /**
19
+ * Wrap body content in a minimal, email-client-safe HTML shell. Kept intentionally
20
+ * plain (no gradients/branding) — this is the neutral baseline; themes override
21
+ * for a branded look.
22
+ */
23
+ export declare function baseLayout(params: {
24
+ appName: string;
25
+ heading: string;
26
+ bodyHtml: string;
27
+ footer: string;
28
+ }): string;
29
+ /** Render a labeled detail row block (used by the new-device email). */
30
+ export declare function detailRows(rows: Array<{
31
+ label: string;
32
+ value: string | undefined;
33
+ }>): string;
34
+ /** Build a `SecurityEmailContent` with an auto-derived plain-text fallback. */
35
+ export declare function content(subject: string, html: string, text?: string): SecurityEmailContent;
36
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/lib/auth/security-notifications/templates/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEpD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CAEhF;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAQnE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,MAAM,CAuCT;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,GAAG,MAAM,CAc5F;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAE1F"}
@@ -0,0 +1,68 @@
1
+ function resolveBaselineLocale(locale) {
2
+ return (locale || "").toLowerCase().startsWith("es") ? "es" : "en";
3
+ }
4
+ function escapeHtml(value) {
5
+ if (value == null) return "";
6
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
7
+ }
8
+ function baseLayout(params) {
9
+ const { appName, heading, bodyHtml, footer } = params;
10
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
11
+ return `<!DOCTYPE html>
12
+ <html>
13
+ <head>
14
+ <meta charset="utf-8">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+ </head>
17
+ <body style="margin:0;padding:0;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;background-color:#f4f4f4;">
18
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
19
+ <tr>
20
+ <td align="center" style="padding:40px 0;">
21
+ <table role="presentation" width="600" cellspacing="0" cellpadding="0" border="0" style="background-color:#ffffff;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,0.08);">
22
+ <tr>
23
+ <td style="padding:32px 40px 8px 40px;">
24
+ <h1 style="color:#111827;font-size:20px;margin:0;font-weight:600;">${escapeHtml(appName)}</h1>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <td style="padding:8px 40px 24px 40px;">
29
+ <h2 style="color:#111827;font-size:22px;margin:0 0 16px 0;font-weight:600;">${escapeHtml(heading)}</h2>
30
+ ${bodyHtml}
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <td style="padding:16px 40px 32px 40px;border-top:1px solid #eee;">
35
+ <p style="color:#9ca3af;font-size:12px;line-height:1.5;margin:16px 0 0 0;">
36
+ ${escapeHtml(footer)}<br>
37
+ &copy; ${year} ${escapeHtml(appName)}.
38
+ </p>
39
+ </td>
40
+ </tr>
41
+ </table>
42
+ </td>
43
+ </tr>
44
+ </table>
45
+ </body>
46
+ </html>`;
47
+ }
48
+ function detailRows(rows) {
49
+ const cells = rows.filter((r) => r.value).map(
50
+ (r) => `<tr><td style="color:#6b7280;font-size:14px;padding:4px 12px 4px 0;">${escapeHtml(
51
+ r.label
52
+ )}</td><td style="color:#111827;font-size:14px;padding:4px 0;">${escapeHtml(
53
+ r.value
54
+ )}</td></tr>`
55
+ ).join("");
56
+ if (!cells) return "";
57
+ return `<table role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin:8px 0 24px 0;background:#f9fafb;border-radius:6px;padding:8px 16px;">${cells}</table>`;
58
+ }
59
+ function content(subject, html, text) {
60
+ return { subject, html, text: text ?? subject };
61
+ }
62
+ export {
63
+ baseLayout,
64
+ content,
65
+ detailRows,
66
+ escapeHtml,
67
+ resolveBaselineLocale
68
+ };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Security Notifications — shared types.
3
+ *
4
+ * Built-in security email notifications for three scenarios Better Auth does
5
+ * not cover out of the box (issue #75):
6
+ * - new-device login alerts
7
+ * - password-changed confirmation
8
+ * - email-changed notification (sent to the OLD address)
9
+ */
10
+ /**
11
+ * The three security events. Keys match `AUTH_CONFIG.securityNotifications.events`
12
+ * so a single key toggles both the config flag and the template lookup.
13
+ */
14
+ export type SecurityEventType = 'newDeviceLogin' | 'passwordChanged' | 'emailChanged';
15
+ /**
16
+ * Context passed to a template builder. `appName` is always present; the rest is
17
+ * event-specific and best-effort (any field may be undefined if it could not be
18
+ * resolved from the request/response without leaking user-existence info).
19
+ */
20
+ export interface SecurityEmailContext {
21
+ /** Event this email is for. */
22
+ type: SecurityEventType;
23
+ /** Resolved locale (BCP47) used to pick copy; falls back to the app default. */
24
+ locale: string;
25
+ /** Display name of the application (NEXT_PUBLIC_APP_NAME or config). */
26
+ appName: string;
27
+ /** The user's display name / first name, when known. */
28
+ userName?: string;
29
+ /** Recipient email address (the OLD address for `emailChanged`). */
30
+ email?: string;
31
+ /** New device sign-in metadata (newDeviceLogin only). */
32
+ ipAddress?: string;
33
+ userAgent?: string;
34
+ /** When the event happened (ISO string), for display in the email body. */
35
+ occurredAt?: string;
36
+ /** For emailChanged: the address the account is being moved TO. */
37
+ newEmail?: string;
38
+ }
39
+ /** What a template builder returns. `text` is an optional plain-text fallback. */
40
+ export interface SecurityEmailContent {
41
+ subject: string;
42
+ html: string;
43
+ text?: string;
44
+ }
45
+ /**
46
+ * A template builder turns a context into rendered email content. Themes register
47
+ * their own builders (per type + locale) via `registerSecurityEmailTemplate` to
48
+ * brand/translate these emails without forking core.
49
+ */
50
+ export type SecurityEmailTemplateBuilder = (ctx: SecurityEmailContext) => SecurityEmailContent | Promise<SecurityEmailContent>;
51
+ /**
52
+ * Payload persisted on the `auth:security-notification` scheduled action. Kept to
53
+ * plain references + already-resolved display data (never secrets): the handler
54
+ * only needs it to render and send the email.
55
+ */
56
+ export interface SecurityNotificationActionPayload {
57
+ type: SecurityEventType;
58
+ locale: string;
59
+ appName: string;
60
+ /** Recipient (OLD address for emailChanged). */
61
+ to: string;
62
+ userName?: string;
63
+ ipAddress?: string;
64
+ userAgent?: string;
65
+ occurredAt?: string;
66
+ newEmail?: string;
67
+ /**
68
+ * Dedup discriminator so scheduleAction() collapses rapid duplicates of the
69
+ * same (user, event). Present for the scheduler's entityId-based dedup only.
70
+ */
71
+ entityId?: string;
72
+ entityType?: string;
73
+ }
74
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/security-notifications/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,CAAA;AAElB;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,+BAA+B;IAC/B,IAAI,EAAE,iBAAiB,CAAA;IACvB,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAA;IACf,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,kFAAkF;AAClF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,CACzC,GAAG,EAAE,oBAAoB,KACtB,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,iBAAiB,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB"}