hazo_auth 5.1.1 → 5.1.3

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 (86) hide show
  1. package/cli-src/lib/config/default_config.ts +4 -2
  2. package/dist/components/layouts/shared/components/auth_navbar.js +1 -1
  3. package/dist/components/layouts/shared/components/sidebar_layout_wrapper.d.ts.map +1 -1
  4. package/dist/components/layouts/shared/components/sidebar_layout_wrapper.js +2 -2
  5. package/dist/components/layouts/shared/components/standalone_layout_wrapper.d.ts.map +1 -1
  6. package/dist/components/layouts/shared/components/standalone_layout_wrapper.js +1 -1
  7. package/dist/components/layouts/shared/components/two_column_auth_layout.js +1 -1
  8. package/dist/lib/config/default_config.d.ts +8 -4
  9. package/dist/lib/config/default_config.d.ts.map +1 -1
  10. package/dist/lib/config/default_config.js +4 -2
  11. package/dist/server/routes/app_user_data.d.ts +63 -1
  12. package/dist/server/routes/app_user_data.d.ts.map +1 -1
  13. package/dist/server/routes/app_user_data.js +208 -2
  14. package/dist/server/routes/change_password.d.ts +7 -1
  15. package/dist/server/routes/change_password.d.ts.map +1 -1
  16. package/dist/server/routes/change_password.js +98 -2
  17. package/dist/server/routes/create_firm.d.ts +21 -1
  18. package/dist/server/routes/create_firm.d.ts.map +1 -1
  19. package/dist/server/routes/create_firm.js +96 -2
  20. package/dist/server/routes/forgot_password.d.ts +7 -1
  21. package/dist/server/routes/forgot_password.d.ts.map +1 -1
  22. package/dist/server/routes/forgot_password.js +93 -2
  23. package/dist/server/routes/get_auth.d.ts +9 -1
  24. package/dist/server/routes/get_auth.d.ts.map +1 -1
  25. package/dist/server/routes/get_auth.js +63 -2
  26. package/dist/server/routes/invalidate_cache.d.ts +13 -1
  27. package/dist/server/routes/invalidate_cache.d.ts.map +1 -1
  28. package/dist/server/routes/invalidate_cache.js +96 -2
  29. package/dist/server/routes/invitations.d.ts +44 -1
  30. package/dist/server/routes/invitations.d.ts.map +1 -1
  31. package/dist/server/routes/invitations.js +293 -2
  32. package/dist/server/routes/library_photo.d.ts +8 -1
  33. package/dist/server/routes/library_photo.d.ts.map +1 -1
  34. package/dist/server/routes/library_photo.js +82 -3
  35. package/dist/server/routes/library_photos.d.ts +21 -1
  36. package/dist/server/routes/library_photos.d.ts.map +1 -1
  37. package/dist/server/routes/library_photos.js +80 -2
  38. package/dist/server/routes/login.d.ts +11 -1
  39. package/dist/server/routes/login.d.ts.map +1 -1
  40. package/dist/server/routes/login.js +156 -2
  41. package/dist/server/routes/logout.d.ts +7 -1
  42. package/dist/server/routes/logout.d.ts.map +1 -1
  43. package/dist/server/routes/logout.js +103 -2
  44. package/dist/server/routes/me.d.ts +10 -1
  45. package/dist/server/routes/me.d.ts.map +1 -1
  46. package/dist/server/routes/me.js +106 -2
  47. package/dist/server/routes/profile_picture_filename.d.ts +6 -1
  48. package/dist/server/routes/profile_picture_filename.d.ts.map +1 -1
  49. package/dist/server/routes/profile_picture_filename.js +43 -3
  50. package/dist/server/routes/register.d.ts +8 -1
  51. package/dist/server/routes/register.d.ts.map +1 -1
  52. package/dist/server/routes/register.js +80 -2
  53. package/dist/server/routes/remove_profile_picture.d.ts +7 -1
  54. package/dist/server/routes/remove_profile_picture.d.ts.map +1 -1
  55. package/dist/server/routes/remove_profile_picture.js +64 -2
  56. package/dist/server/routes/resend_verification.d.ts +7 -1
  57. package/dist/server/routes/resend_verification.d.ts.map +1 -1
  58. package/dist/server/routes/resend_verification.js +79 -2
  59. package/dist/server/routes/reset_password.d.ts +7 -1
  60. package/dist/server/routes/reset_password.d.ts.map +1 -1
  61. package/dist/server/routes/reset_password.js +76 -2
  62. package/dist/server/routes/update_user.d.ts +8 -1
  63. package/dist/server/routes/update_user.d.ts.map +1 -1
  64. package/dist/server/routes/update_user.js +98 -2
  65. package/dist/server/routes/upload_profile_picture.d.ts +8 -1
  66. package/dist/server/routes/upload_profile_picture.d.ts.map +1 -1
  67. package/dist/server/routes/upload_profile_picture.js +204 -2
  68. package/dist/server/routes/user_management_permissions.d.ts +49 -1
  69. package/dist/server/routes/user_management_permissions.d.ts.map +1 -1
  70. package/dist/server/routes/user_management_permissions.js +257 -2
  71. package/dist/server/routes/user_management_roles.d.ts +39 -1
  72. package/dist/server/routes/user_management_roles.d.ts.map +1 -1
  73. package/dist/server/routes/user_management_roles.js +342 -2
  74. package/dist/server/routes/user_management_users.d.ts +46 -1
  75. package/dist/server/routes/user_management_users.d.ts.map +1 -1
  76. package/dist/server/routes/user_management_users.js +243 -2
  77. package/dist/server/routes/user_management_users_roles.d.ts +36 -1
  78. package/dist/server/routes/user_management_users_roles.d.ts.map +1 -1
  79. package/dist/server/routes/user_management_users_roles.js +267 -2
  80. package/dist/server/routes/validate_reset_token.d.ts +5 -1
  81. package/dist/server/routes/validate_reset_token.d.ts.map +1 -1
  82. package/dist/server/routes/validate_reset_token.js +58 -2
  83. package/dist/server/routes/verify_email.d.ts +13 -1
  84. package/dist/server/routes/verify_email.d.ts.map +1 -1
  85. package/dist/server/routes/verify_email.js +78 -2
  86. package/package.json +1 -1
@@ -133,6 +133,8 @@ export const DEFAULT_UI_SHELL = {
133
133
  image_width: 400,
134
134
  image_height: 400,
135
135
  show_visual_panel: true,
136
+ /** Enable vertical centering of content (default: true) */
137
+ vertical_center: true,
136
138
  } as const;
137
139
 
138
140
  // section: profile_pic_menu
@@ -187,8 +189,8 @@ export const DEFAULT_NAVBAR = {
187
189
  background_color: "",
188
190
  /** Navbar text color (empty = inherit) */
189
191
  text_color: "",
190
- /** Navbar height in pixels (default: 48px for slim appearance) */
191
- height: 48,
192
+ /** Navbar height in pixels (default: 40px for slim appearance) */
193
+ height: 40,
192
194
  } as const;
193
195
 
194
196
  // section: user_types
@@ -8,7 +8,7 @@ import Image from "next/image";
8
8
  import { Home } from "lucide-react";
9
9
  import { cn } from "../../../../lib/utils";
10
10
  // section: component
11
- export function AuthNavbar({ logo_path = "", logo_width = 28, logo_height = 28, company_name = "", home_path = "/", home_label = "Home", show_home_link = true, background_color, text_color, height = 48, className, }) {
11
+ export function AuthNavbar({ logo_path = "", logo_width = 28, logo_height = 28, company_name = "", home_path = "/", home_label = "Home", show_home_link = true, background_color, text_color, height = 40, className, }) {
12
12
  // Only show logo if logo_path is configured (non-empty)
13
13
  const showLogo = logo_path !== "";
14
14
  const navStyle = Object.assign(Object.assign({ height: `${height}px` }, (background_color && { backgroundColor: background_color })), (text_color && { color: text_color }));
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/sidebar_layout_wrapper.tsx"],"names":[],"mappings":"AAwBA,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAGF,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,yBAAyB,2CA6M3E"}
1
+ {"version":3,"file":"sidebar_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/sidebar_layout_wrapper.tsx"],"names":[],"mappings":"AAwBA,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAGF,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,yBAAyB,2CAqO3E"}
@@ -5,11 +5,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  // section: imports
6
6
  import Link from "next/link";
7
7
  import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger, SidebarInset, } from "../../../ui/sidebar";
8
- import { LogIn, UserPlus, BookOpen, ExternalLink, Database, KeyRound, MailCheck, Key, User, ShieldCheck, CircleUserRound, FileJson } from "lucide-react";
8
+ import { LogIn, UserPlus, BookOpen, ExternalLink, Database, KeyRound, MailCheck, Key, User, ShieldCheck, CircleUserRound, FileJson, Building2, Palette } from "lucide-react";
9
9
  import { use_auth_status } from "../hooks/use_auth_status";
10
10
  import { ProfilePicMenu } from "./profile_pic_menu";
11
11
  // section: component
12
12
  export function SidebarLayoutWrapper({ children }) {
13
13
  const authStatus = use_auth_status();
14
- return (_jsx(SidebarProvider, { children: _jsxs("div", { className: "cls_sidebar_layout_wrapper flex min-h-screen w-full", children: [_jsxs(Sidebar, { children: [_jsx(SidebarHeader, { className: "cls_sidebar_layout_header", children: _jsx("div", { className: "cls_sidebar_layout_title flex items-center gap-2 px-2 py-4", children: _jsx("h1", { className: "cls_sidebar_layout_title_text text-lg font-semibold text-sidebar-foreground", children: "hazo auth" }) }) }), _jsxs(SidebarContent, { className: "cls_sidebar_layout_content", children: [_jsxs(SidebarGroup, { className: "cls_sidebar_layout_test_group", children: [_jsx(SidebarGroupLabel, { className: "cls_sidebar_layout_group_label", children: "Test components" }), _jsxs(SidebarMenu, { className: "cls_sidebar_layout_test_menu", children: [_jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_login_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/login", className: "cls_sidebar_layout_test_login_link flex items-center gap-2", "aria-label": "Test login layout component", children: [_jsx(LogIn, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test login" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_register_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/register", className: "cls_sidebar_layout_test_register_link flex items-center gap-2", "aria-label": "Test register layout component", children: [_jsx(UserPlus, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test register" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_forgot_password_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/forgot_password", className: "cls_sidebar_layout_test_forgot_password_link flex items-center gap-2", "aria-label": "Test forgot password layout component", children: [_jsx(KeyRound, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test forgot password" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_reset_password_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/reset_password", className: "cls_sidebar_layout_test_reset_password_link flex items-center gap-2", "aria-label": "Test reset password layout component", children: [_jsx(Key, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test reset password" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_email_verification_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/verify_email", className: "cls_sidebar_layout_test_email_verification_link flex items-center gap-2", "aria-label": "Test email verification layout component", children: [_jsx(MailCheck, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test email verification" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_sqlite_admin_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_connect/sqlite_admin", className: "cls_sidebar_layout_sqlite_admin_link flex items-center gap-2", "aria-label": "Open SQLite admin UI to browse and edit database", children: [_jsx(Database, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "SQLite Admin" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_user_management_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/user_management", className: "cls_sidebar_layout_user_management_link flex items-center gap-2", "aria-label": "Open User Management to manage users, roles, and permissions", children: [_jsx(User, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "User Management" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_rbac_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/rbac_test", className: "cls_sidebar_layout_rbac_test_link flex items-center gap-2", "aria-label": "Test RBAC and HRBAC access control", children: [_jsx(ShieldCheck, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "RBAC/HRBAC Test" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_profile_stamp_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/profile_stamp_test", className: "cls_sidebar_layout_profile_stamp_test_link flex items-center gap-2", "aria-label": "Test ProfileStamp component", children: [_jsx(CircleUserRound, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "ProfileStamp Test" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_app_user_data_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/app_user_data_test", className: "cls_sidebar_layout_app_user_data_test_link flex items-center gap-2", "aria-label": "Test app_user_data JSON storage", children: [_jsx(FileJson, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "App User Data Test" })] }) }) })] })] }), _jsx(ProfilePicMenu, { variant: "sidebar", avatar_size: "sm", className: "cls_sidebar_layout_profile_menu", sidebar_group_label: "Account" }), _jsxs(SidebarGroup, { className: "cls_sidebar_layout_resources_group", children: [_jsx(SidebarGroupLabel, { className: "cls_sidebar_layout_group_label", children: "Resources" }), _jsxs(SidebarMenu, { className: "cls_sidebar_layout_resources_menu", children: [_jsx(SidebarMenuItem, { className: "cls_sidebar_layout_storybook_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: "http://localhost:6006", target: "_blank", rel: "noopener noreferrer", className: "cls_sidebar_layout_storybook_link flex items-center gap-2", "aria-label": "Open Storybook preview for reusable components", children: [_jsx(BookOpen, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Storybook" }), _jsx(ExternalLink, { className: "ml-auto h-3 w-3", "aria-hidden": "true" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_docs_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: "https://ui.shadcn.com/docs", target: "_blank", rel: "noopener noreferrer", className: "cls_sidebar_layout_docs_link flex items-center gap-2", "aria-label": "Review shadcn documentation for styling guidance", children: [_jsx(BookOpen, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Shadcn docs" }), _jsx(ExternalLink, { className: "ml-auto h-3 w-3", "aria-hidden": "true" })] }) }) })] })] })] })] }), _jsxs(SidebarInset, { className: "cls_sidebar_layout_inset", children: [_jsxs("header", { className: "cls_sidebar_layout_main_header flex h-16 shrink-0 items-center gap-2 border-b px-4", children: [_jsx(SidebarTrigger, { className: "cls_sidebar_layout_trigger" }), _jsx("div", { className: "cls_sidebar_layout_main_header_content flex flex-1 items-center gap-2", children: _jsx("h2", { className: "cls_sidebar_layout_main_title text-lg font-semibold text-foreground", children: "hazo reusable ui library workspace" }) }), _jsx(ProfilePicMenu, { className: "cls_sidebar_layout_auth_status", avatar_size: "sm" })] }), _jsx("main", { className: "cls_sidebar_layout_main_content flex flex-1 items-center justify-center p-6", children: children })] })] }) }));
14
+ return (_jsx(SidebarProvider, { children: _jsxs("div", { className: "cls_sidebar_layout_wrapper flex min-h-screen w-full", children: [_jsxs(Sidebar, { children: [_jsx(SidebarHeader, { className: "cls_sidebar_layout_header", children: _jsx("div", { className: "cls_sidebar_layout_title flex items-center gap-2 px-2 py-4", children: _jsx("h1", { className: "cls_sidebar_layout_title_text text-lg font-semibold text-sidebar-foreground", children: "hazo auth" }) }) }), _jsxs(SidebarContent, { className: "cls_sidebar_layout_content", children: [_jsxs(SidebarGroup, { className: "cls_sidebar_layout_test_group", children: [_jsx(SidebarGroupLabel, { className: "cls_sidebar_layout_group_label", children: "Test components" }), _jsxs(SidebarMenu, { className: "cls_sidebar_layout_test_menu", children: [_jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_login_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/login", className: "cls_sidebar_layout_test_login_link flex items-center gap-2", "aria-label": "Test login layout component", children: [_jsx(LogIn, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test login" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_register_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/register", className: "cls_sidebar_layout_test_register_link flex items-center gap-2", "aria-label": "Test register layout component", children: [_jsx(UserPlus, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test register" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_forgot_password_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/forgot_password", className: "cls_sidebar_layout_test_forgot_password_link flex items-center gap-2", "aria-label": "Test forgot password layout component", children: [_jsx(KeyRound, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test forgot password" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_reset_password_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/reset_password", className: "cls_sidebar_layout_test_reset_password_link flex items-center gap-2", "aria-label": "Test reset password layout component", children: [_jsx(Key, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test reset password" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_test_email_verification_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/verify_email", className: "cls_sidebar_layout_test_email_verification_link flex items-center gap-2", "aria-label": "Test email verification layout component", children: [_jsx(MailCheck, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Test email verification" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_sqlite_admin_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_connect/sqlite_admin", className: "cls_sidebar_layout_sqlite_admin_link flex items-center gap-2", "aria-label": "Open SQLite admin UI to browse and edit database", children: [_jsx(Database, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "SQLite Admin" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_user_management_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/user_management", className: "cls_sidebar_layout_user_management_link flex items-center gap-2", "aria-label": "Open User Management to manage users, roles, and permissions", children: [_jsx(User, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "User Management" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_rbac_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/rbac_test", className: "cls_sidebar_layout_rbac_test_link flex items-center gap-2", "aria-label": "Test RBAC and HRBAC access control", children: [_jsx(ShieldCheck, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "RBAC/HRBAC Test" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_profile_stamp_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/profile_stamp_test", className: "cls_sidebar_layout_profile_stamp_test_link flex items-center gap-2", "aria-label": "Test ProfileStamp component", children: [_jsx(CircleUserRound, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "ProfileStamp Test" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_app_user_data_test_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/app_user_data_test", className: "cls_sidebar_layout_app_user_data_test_link flex items-center gap-2", "aria-label": "Test app_user_data JSON storage", children: [_jsx(FileJson, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "App User Data Test" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_create_firm_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/create_firm", className: "cls_sidebar_layout_create_firm_link flex items-center gap-2", "aria-label": "Test create firm flow", children: [_jsx(Building2, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Create Firm" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_edit_firm_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { href: "/hazo_auth/edit_firm", className: "cls_sidebar_layout_edit_firm_link flex items-center gap-2", "aria-label": "Test branding editor for firm", children: [_jsx(Palette, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Edit Firm" })] }) }) })] })] }), _jsx(ProfilePicMenu, { variant: "sidebar", avatar_size: "sm", className: "cls_sidebar_layout_profile_menu", sidebar_group_label: "Account" }), _jsxs(SidebarGroup, { className: "cls_sidebar_layout_resources_group", children: [_jsx(SidebarGroupLabel, { className: "cls_sidebar_layout_group_label", children: "Resources" }), _jsxs(SidebarMenu, { className: "cls_sidebar_layout_resources_menu", children: [_jsx(SidebarMenuItem, { className: "cls_sidebar_layout_storybook_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: "http://localhost:6006", target: "_blank", rel: "noopener noreferrer", className: "cls_sidebar_layout_storybook_link flex items-center gap-2", "aria-label": "Open Storybook preview for reusable components", children: [_jsx(BookOpen, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Storybook" }), _jsx(ExternalLink, { className: "ml-auto h-3 w-3", "aria-hidden": "true" })] }) }) }), _jsx(SidebarMenuItem, { className: "cls_sidebar_layout_docs_item", children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs("a", { href: "https://ui.shadcn.com/docs", target: "_blank", rel: "noopener noreferrer", className: "cls_sidebar_layout_docs_link flex items-center gap-2", "aria-label": "Review shadcn documentation for styling guidance", children: [_jsx(BookOpen, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { children: "Shadcn docs" }), _jsx(ExternalLink, { className: "ml-auto h-3 w-3", "aria-hidden": "true" })] }) }) })] })] })] })] }), _jsxs(SidebarInset, { className: "cls_sidebar_layout_inset", children: [_jsxs("header", { className: "cls_sidebar_layout_main_header flex h-16 shrink-0 items-center gap-2 border-b px-4", children: [_jsx(SidebarTrigger, { className: "cls_sidebar_layout_trigger" }), _jsx("div", { className: "cls_sidebar_layout_main_header_content flex flex-1 items-center gap-2", children: _jsx("h2", { className: "cls_sidebar_layout_main_title text-lg font-semibold text-foreground", children: "hazo reusable ui library workspace" }) }), _jsx(ProfilePicMenu, { className: "cls_sidebar_layout_auth_status", avatar_size: "sm" })] }), _jsx("main", { className: "cls_sidebar_layout_main_content flex flex-1 items-center justify-center p-6", children: children })] })] }) }));
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"standalone_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/standalone_layout_wrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,OAAqB,EACrB,WAA8E,EAC9E,gBAAgB,EAChB,gBAAgB,EAChB,WAAkB,EAClB,eAAsB,EACtB,MAAM,EACN,cAAqB,GACtB,EAAE,4BAA4B,2CA+C9B"}
1
+ {"version":3,"file":"standalone_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/standalone_layout_wrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,OAAqB,EACrB,WAA8E,EAC9E,gBAAgB,EAChB,gBAAgB,EAChB,WAAkB,EAClB,eAAsB,EACtB,MAAM,EACN,cAAqB,GACtB,EAAE,4BAA4B,2CAgD9B"}
@@ -11,5 +11,5 @@ export function StandaloneLayoutWrapper({ children, heading = "hazo auth", descr
11
11
  return (
12
12
  // Single wrapper with min-h-screen and flexbox for proper layout
13
13
  // wrapperClassName applied here for consuming app theming/background
14
- _jsxs("div", { className: cn("cls_standalone_layout_outer cls_standalone_layout_wrapper flex min-h-screen w-full flex-col bg-background", wrapperClassName), children: [hasNavbar && _jsx(AuthNavbar, Object.assign({}, navbar)), _jsx("div", { className: cn("cls_standalone_layout_content_area flex-1", verticalCenter && "flex items-center justify-center"), children: _jsxs("div", { className: cn("cls_standalone_layout_content mx-auto flex w-full max-w-5xl flex-col gap-8 p-6", contentClassName), children: [(showHeading || showDescription) && (_jsxs("div", { className: "cls_standalone_layout_header text-center", children: [showHeading && (_jsx("h1", { className: "cls_standalone_layout_title text-2xl font-semibold tracking-tight text-foreground", children: heading })), showDescription && (_jsx("p", { className: "cls_standalone_layout_description mt-2 text-sm text-muted-foreground", children: description }))] })), _jsx("div", { className: "cls_standalone_layout_body", children: children })] }) })] }));
14
+ _jsxs("div", { className: cn("cls_standalone_layout_outer cls_standalone_layout_wrapper flex min-h-screen w-full flex-col bg-background", wrapperClassName), children: [hasNavbar && _jsx(AuthNavbar, Object.assign({}, navbar)), _jsx("div", { className: cn("cls_standalone_layout_content_area flex-1", verticalCenter && "flex items-center justify-center"), children: _jsxs("div", { className: cn("cls_standalone_layout_content mx-auto flex w-full flex-col", verticalCenter ? "max-w-5xl gap-2 p-4" : "max-w-5xl gap-6 p-6", contentClassName), children: [(showHeading || showDescription) && (_jsxs("div", { className: "cls_standalone_layout_header text-center", children: [showHeading && (_jsx("h1", { className: "cls_standalone_layout_title text-2xl font-semibold tracking-tight text-foreground", children: heading })), showDescription && (_jsx("p", { className: "cls_standalone_layout_description mt-2 text-sm text-muted-foreground", children: description }))] })), _jsx("div", { className: "cls_standalone_layout_body", children: children })] }) })] }));
15
15
  }
@@ -4,5 +4,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { VisualPanel } from "./visual_panel";
5
5
  // section: component
6
6
  export function TwoColumnAuthLayout({ imageSrc, imageAlt, imageBackgroundColor, formContent, className, visualPanelClassName, formContainerClassName, }) {
7
- return (_jsxs("div", { className: `cls_two_column_auth_layout mx-6 my-8 grid w-full max-w-5xl grid-cols-1 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm sm:mx-8 md:mx-auto md:my-12 md:grid-cols-2 md:min-h-[520px] ${className !== null && className !== void 0 ? className : ""}`, children: [_jsx(VisualPanel, { imageSrc: imageSrc, imageAlt: imageAlt, backgroundColor: imageBackgroundColor, className: visualPanelClassName }), _jsx("div", { className: `cls_two_column_auth_layout_form_container flex flex-col gap-6 p-8 ${formContainerClassName !== null && formContainerClassName !== void 0 ? formContainerClassName : ""}`, children: formContent })] }));
7
+ return (_jsxs("div", { className: `cls_two_column_auth_layout grid w-full max-w-5xl grid-cols-1 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm md:grid-cols-2 md:min-h-[520px] ${className !== null && className !== void 0 ? className : ""}`, children: [_jsx(VisualPanel, { imageSrc: imageSrc, imageAlt: imageAlt, backgroundColor: imageBackgroundColor, className: visualPanelClassName }), _jsx("div", { className: `cls_two_column_auth_layout_form_container flex flex-col gap-6 p-8 ${formContainerClassName !== null && formContainerClassName !== void 0 ? formContainerClassName : ""}`, children: formContent })] }));
8
8
  }
@@ -98,6 +98,8 @@ export declare const DEFAULT_UI_SHELL: {
98
98
  readonly image_width: 400;
99
99
  readonly image_height: 400;
100
100
  readonly show_visual_panel: true;
101
+ /** Enable vertical centering of content (default: true) */
102
+ readonly vertical_center: true;
101
103
  };
102
104
  export declare const DEFAULT_PROFILE_PIC_MENU: {
103
105
  readonly show_single_button: false;
@@ -144,8 +146,8 @@ export declare const DEFAULT_NAVBAR: {
144
146
  readonly background_color: "";
145
147
  /** Navbar text color (empty = inherit) */
146
148
  readonly text_color: "";
147
- /** Navbar height in pixels (default: 48px for slim appearance) */
148
- readonly height: 48;
149
+ /** Navbar height in pixels (default: 40px for slim appearance) */
150
+ readonly height: 40;
149
151
  };
150
152
  export declare const DEFAULT_USER_TYPES: {
151
153
  /** Enable user types feature (default: false) */
@@ -286,6 +288,8 @@ export declare const HAZO_AUTH_DEFAULTS: {
286
288
  readonly image_width: 400;
287
289
  readonly image_height: 400;
288
290
  readonly show_visual_panel: true;
291
+ /** Enable vertical centering of content (default: true) */
292
+ readonly vertical_center: true;
289
293
  };
290
294
  readonly profilePicMenu: {
291
295
  readonly show_single_button: false;
@@ -360,8 +364,8 @@ export declare const HAZO_AUTH_DEFAULTS: {
360
364
  readonly background_color: "";
361
365
  /** Navbar text color (empty = inherit) */
362
366
  readonly text_color: "";
363
- /** Navbar height in pixels (default: 48px for slim appearance) */
364
- readonly height: 48;
367
+ /** Navbar height in pixels (default: 40px for slim appearance) */
368
+ readonly height: 40;
365
369
  };
366
370
  readonly userTypes: {
367
371
  /** Enable user types feature (default: false) */
@@ -1 +1 @@
1
- {"version":3,"file":"default_config.d.ts","sourceRoot":"","sources":["../../../src/lib/config/default_config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B;;;;;;CAMhC,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAGX,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAGX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAGX,eAAO,MAAM,yBAAyB;;;;;;CAM5B,CAAC;AAGX,eAAO,MAAM,aAAa;4BACI,MAAM,GAAG,SAAS;;;;;;CAMtC,CAAC;AAGX,eAAO,MAAM,gBAAgB;4BACC,MAAM,GAAG,SAAS;;;;;CAKtC,CAAC;AAGX,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AAGX,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AAGX,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAGX,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AAGX,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAGX,eAAO,MAAM,gBAAgB;0BACE,YAAY,GAAG,cAAc;;;;;CAKlD,CAAC;AAGX,eAAO,MAAM,wBAAwB;;;;;;;;CAQ3B,CAAC;AAGX,eAAO,MAAM,iBAAiB;;CAEpB,CAAC;AAGX,eAAO,MAAM,aAAa;IACxB,kHAAkH;;IAElH,8CAA8C;;IAE9C,iGAAiG;;IAEjG,kDAAkD;;IAElD,0EAA0E;;CAElE,CAAC;AAGX,eAAO,MAAM,cAAc;IACzB,kCAAkC;;IAElC,iEAAiE;;IAEjE,2BAA2B;;IAE3B,4BAA4B;;IAE5B,sD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kEAAkE;;;;QAMlE,iDAAiD;;QAEjD,2DAA2D;;;CA8DnD,CAAC;AAGX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,kBAAkB,CAAC"}
@@ -117,6 +117,8 @@ export const DEFAULT_UI_SHELL = {
117
117
  image_width: 400,
118
118
  image_height: 400,
119
119
  show_visual_panel: true,
120
+ /** Enable vertical centering of content (default: true) */
121
+ vertical_center: true,
120
122
  };
121
123
  // section: profile_pic_menu
122
124
  export const DEFAULT_PROFILE_PIC_MENU = {
@@ -167,8 +169,8 @@ export const DEFAULT_NAVBAR = {
167
169
  background_color: "",
168
170
  /** Navbar text color (empty = inherit) */
169
171
  text_color: "",
170
- /** Navbar height in pixels (default: 48px for slim appearance) */
171
- height: 48,
172
+ /** Navbar height in pixels (default: 40px for slim appearance) */
173
+ height: 40,
172
174
  };
173
175
  // section: user_types
174
176
  export const DEFAULT_USER_TYPES = {
@@ -1,2 +1,64 @@
1
- export { GET, PATCH, PUT, DELETE } from "../../app/api/hazo_auth/app_user_data/route";
1
+ import { NextRequest, NextResponse } from "next/server";
2
+ /**
3
+ * GET /api/hazo_auth/app_user_data
4
+ *
5
+ * Returns the current app_user_data for the authenticated user.
6
+ *
7
+ * Response format:
8
+ * { success: true, data: {...} | null }
9
+ */
10
+ export declare function GET(request: NextRequest): Promise<NextResponse<{
11
+ error: string;
12
+ }> | NextResponse<{
13
+ success: boolean;
14
+ data: Record<string, unknown> | null;
15
+ }>>;
16
+ /**
17
+ * PATCH /api/hazo_auth/app_user_data
18
+ *
19
+ * Merges new data with existing app_user_data.
20
+ *
21
+ * Request body:
22
+ * { data: {...} }
23
+ *
24
+ * Response format:
25
+ * { success: true, data: {...} }
26
+ */
27
+ export declare function PATCH(request: NextRequest): Promise<NextResponse<{
28
+ error: string;
29
+ }> | NextResponse<{
30
+ success: boolean;
31
+ data: Record<string, unknown> | null;
32
+ }>>;
33
+ /**
34
+ * PUT /api/hazo_auth/app_user_data
35
+ *
36
+ * Replaces existing app_user_data entirely with new data.
37
+ *
38
+ * Request body:
39
+ * { data: {...} }
40
+ *
41
+ * Response format:
42
+ * { success: true, data: {...} }
43
+ */
44
+ export declare function PUT(request: NextRequest): Promise<NextResponse<{
45
+ error: string;
46
+ }> | NextResponse<{
47
+ success: boolean;
48
+ data: Record<string, unknown> | null;
49
+ }>>;
50
+ /**
51
+ * DELETE /api/hazo_auth/app_user_data
52
+ *
53
+ * Clears the app_user_data for the authenticated user (sets to null).
54
+ *
55
+ * Response format:
56
+ * { success: true, data: null }
57
+ */
58
+ export declare function DELETE(request: NextRequest): Promise<NextResponse<{
59
+ error: string;
60
+ }> | NextResponse<{
61
+ success: boolean;
62
+ data: null;
63
+ }>>;
2
64
  //# sourceMappingURL=app_user_data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app_user_data.d.ts","sourceRoot":"","sources":["../../../src/server/routes/app_user_data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC"}
1
+ {"version":3,"file":"app_user_data.d.ts","sourceRoot":"","sources":["../../../src/server/routes/app_user_data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAaxD;;;;;;;GAOG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;;;;IA8C7C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,WAAW;;;;;IAsE/C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;;;;IAsE7C;AAED;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,WAAW;;;;;IAoDhD"}
@@ -1,2 +1,208 @@
1
- // file_description: re-export app_user_data route handlers for use by consuming projects
2
- export { GET, PATCH, PUT, DELETE } from "../../app/api/hazo_auth/app_user_data/route";
1
+ // file_description: API route handler for managing app_user_data (custom application-specific user data)
2
+ // section: imports
3
+ import { NextResponse } from "next/server";
4
+ import { get_hazo_connect_instance } from "../../lib/hazo_connect_instance.server";
5
+ import { create_app_logger } from "../../lib/app_logger";
6
+ import { get_app_user_data, update_app_user_data, clear_app_user_data, } from "../../lib/services/app_user_data_service";
7
+ import { get_filename, get_line_number } from "../../lib/utils/api_route_helpers";
8
+ import { require_auth } from "../../lib/auth/auth_utils.server";
9
+ // section: api_handlers
10
+ /**
11
+ * GET /api/hazo_auth/app_user_data
12
+ *
13
+ * Returns the current app_user_data for the authenticated user.
14
+ *
15
+ * Response format:
16
+ * { success: true, data: {...} | null }
17
+ */
18
+ export async function GET(request) {
19
+ const logger = create_app_logger();
20
+ try {
21
+ // Require authentication
22
+ let user_id;
23
+ try {
24
+ const user = await require_auth(request);
25
+ user_id = user.user_id;
26
+ }
27
+ catch (error) {
28
+ if (error instanceof Error && error.message === "Authentication required") {
29
+ return NextResponse.json({ error: "Authentication required" }, { status: 401 });
30
+ }
31
+ throw error;
32
+ }
33
+ const hazoConnect = get_hazo_connect_instance();
34
+ const result = await get_app_user_data(hazoConnect, user_id);
35
+ if (!result.success) {
36
+ return NextResponse.json({ error: result.error || "Failed to get app user data" }, { status: 400 });
37
+ }
38
+ return NextResponse.json({ success: true, data: result.data }, { status: 200 });
39
+ }
40
+ catch (error) {
41
+ const error_message = error instanceof Error ? error.message : "Unknown error";
42
+ logger.error("app_user_data_get_error", {
43
+ filename: get_filename(),
44
+ line_number: get_line_number(),
45
+ error_message,
46
+ });
47
+ return NextResponse.json({ error: "Failed to get app user data" }, { status: 500 });
48
+ }
49
+ }
50
+ /**
51
+ * PATCH /api/hazo_auth/app_user_data
52
+ *
53
+ * Merges new data with existing app_user_data.
54
+ *
55
+ * Request body:
56
+ * { data: {...} }
57
+ *
58
+ * Response format:
59
+ * { success: true, data: {...} }
60
+ */
61
+ export async function PATCH(request) {
62
+ const logger = create_app_logger();
63
+ try {
64
+ // Require authentication
65
+ let user_id;
66
+ try {
67
+ const user = await require_auth(request);
68
+ user_id = user.user_id;
69
+ }
70
+ catch (error) {
71
+ if (error instanceof Error && error.message === "Authentication required") {
72
+ return NextResponse.json({ error: "Authentication required" }, { status: 401 });
73
+ }
74
+ throw error;
75
+ }
76
+ const body = await request.json();
77
+ const { data } = body;
78
+ // Validate input
79
+ if (data === undefined || data === null) {
80
+ return NextResponse.json({ error: "Data field is required" }, { status: 400 });
81
+ }
82
+ if (typeof data !== "object" || Array.isArray(data)) {
83
+ return NextResponse.json({ error: "Data must be an object" }, { status: 400 });
84
+ }
85
+ const hazoConnect = get_hazo_connect_instance();
86
+ const result = await update_app_user_data(hazoConnect, user_id, data, { merge: true });
87
+ if (!result.success) {
88
+ return NextResponse.json({ error: result.error || "Failed to update app user data" }, { status: 400 });
89
+ }
90
+ logger.info("app_user_data_patch_success", {
91
+ filename: get_filename(),
92
+ line_number: get_line_number(),
93
+ user_id,
94
+ });
95
+ return NextResponse.json({ success: true, data: result.data }, { status: 200 });
96
+ }
97
+ catch (error) {
98
+ const error_message = error instanceof Error ? error.message : "Unknown error";
99
+ logger.error("app_user_data_patch_error", {
100
+ filename: get_filename(),
101
+ line_number: get_line_number(),
102
+ error_message,
103
+ });
104
+ return NextResponse.json({ error: "Failed to update app user data" }, { status: 500 });
105
+ }
106
+ }
107
+ /**
108
+ * PUT /api/hazo_auth/app_user_data
109
+ *
110
+ * Replaces existing app_user_data entirely with new data.
111
+ *
112
+ * Request body:
113
+ * { data: {...} }
114
+ *
115
+ * Response format:
116
+ * { success: true, data: {...} }
117
+ */
118
+ export async function PUT(request) {
119
+ const logger = create_app_logger();
120
+ try {
121
+ // Require authentication
122
+ let user_id;
123
+ try {
124
+ const user = await require_auth(request);
125
+ user_id = user.user_id;
126
+ }
127
+ catch (error) {
128
+ if (error instanceof Error && error.message === "Authentication required") {
129
+ return NextResponse.json({ error: "Authentication required" }, { status: 401 });
130
+ }
131
+ throw error;
132
+ }
133
+ const body = await request.json();
134
+ const { data } = body;
135
+ // Validate input
136
+ if (data === undefined || data === null) {
137
+ return NextResponse.json({ error: "Data field is required" }, { status: 400 });
138
+ }
139
+ if (typeof data !== "object" || Array.isArray(data)) {
140
+ return NextResponse.json({ error: "Data must be an object" }, { status: 400 });
141
+ }
142
+ const hazoConnect = get_hazo_connect_instance();
143
+ const result = await update_app_user_data(hazoConnect, user_id, data, { merge: false });
144
+ if (!result.success) {
145
+ return NextResponse.json({ error: result.error || "Failed to replace app user data" }, { status: 400 });
146
+ }
147
+ logger.info("app_user_data_put_success", {
148
+ filename: get_filename(),
149
+ line_number: get_line_number(),
150
+ user_id,
151
+ });
152
+ return NextResponse.json({ success: true, data: result.data }, { status: 200 });
153
+ }
154
+ catch (error) {
155
+ const error_message = error instanceof Error ? error.message : "Unknown error";
156
+ logger.error("app_user_data_put_error", {
157
+ filename: get_filename(),
158
+ line_number: get_line_number(),
159
+ error_message,
160
+ });
161
+ return NextResponse.json({ error: "Failed to replace app user data" }, { status: 500 });
162
+ }
163
+ }
164
+ /**
165
+ * DELETE /api/hazo_auth/app_user_data
166
+ *
167
+ * Clears the app_user_data for the authenticated user (sets to null).
168
+ *
169
+ * Response format:
170
+ * { success: true, data: null }
171
+ */
172
+ export async function DELETE(request) {
173
+ const logger = create_app_logger();
174
+ try {
175
+ // Require authentication
176
+ let user_id;
177
+ try {
178
+ const user = await require_auth(request);
179
+ user_id = user.user_id;
180
+ }
181
+ catch (error) {
182
+ if (error instanceof Error && error.message === "Authentication required") {
183
+ return NextResponse.json({ error: "Authentication required" }, { status: 401 });
184
+ }
185
+ throw error;
186
+ }
187
+ const hazoConnect = get_hazo_connect_instance();
188
+ const result = await clear_app_user_data(hazoConnect, user_id);
189
+ if (!result.success) {
190
+ return NextResponse.json({ error: result.error || "Failed to clear app user data" }, { status: 400 });
191
+ }
192
+ logger.info("app_user_data_delete_success", {
193
+ filename: get_filename(),
194
+ line_number: get_line_number(),
195
+ user_id,
196
+ });
197
+ return NextResponse.json({ success: true, data: null }, { status: 200 });
198
+ }
199
+ catch (error) {
200
+ const error_message = error instanceof Error ? error.message : "Unknown error";
201
+ logger.error("app_user_data_delete_error", {
202
+ filename: get_filename(),
203
+ line_number: get_line_number(),
204
+ error_message,
205
+ });
206
+ return NextResponse.json({ error: "Failed to clear app user data" }, { status: 500 });
207
+ }
208
+ }
@@ -1,2 +1,8 @@
1
- export { POST } from "../../app/api/hazo_auth/change_password/route";
1
+ import { NextRequest, NextResponse } from "next/server";
2
+ export declare function POST(request: NextRequest): Promise<NextResponse<{
3
+ error: string;
4
+ }> | NextResponse<{
5
+ success: boolean;
6
+ message: string;
7
+ }>>;
2
8
  //# sourceMappingURL=change_password.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"change_password.d.ts","sourceRoot":"","sources":["../../../src/server/routes/change_password.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAC"}
1
+ {"version":3,"file":"change_password.d.ts","sourceRoot":"","sources":["../../../src/server/routes/change_password.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAUxD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;;IAsH9C"}
@@ -1,2 +1,98 @@
1
- // file_description: re-export change_password route handler for use by consuming projects
2
- export { POST } from "../../app/api/hazo_auth/change_password/route";
1
+ // file_description: API route handler for changing user password
2
+ // section: imports
3
+ import { NextResponse } from "next/server";
4
+ import { get_hazo_connect_instance } from "../../lib/hazo_connect_instance.server";
5
+ import { create_app_logger } from "../../lib/app_logger";
6
+ import { change_password } from "../../lib/services/password_change_service";
7
+ import { get_filename, get_line_number } from "../../lib/utils/api_route_helpers";
8
+ import { require_auth } from "../../lib/auth/auth_utils.server";
9
+ import { get_auth_cache } from "../../lib/auth/auth_cache";
10
+ import { get_auth_utility_config } from "../../lib/auth_utility_config.server";
11
+ // section: api_handler
12
+ export async function POST(request) {
13
+ const logger = create_app_logger();
14
+ try {
15
+ // Use centralized auth check
16
+ let user_id;
17
+ try {
18
+ const user = await require_auth(request);
19
+ user_id = user.user_id;
20
+ }
21
+ catch (error) {
22
+ if (error instanceof Error && error.message === "Authentication required") {
23
+ logger.warn("password_change_authentication_failed", {
24
+ filename: get_filename(),
25
+ line_number: get_line_number(),
26
+ error: "User not authenticated",
27
+ });
28
+ return NextResponse.json({ error: "Authentication required" }, { status: 401 });
29
+ }
30
+ throw error;
31
+ }
32
+ const body = await request.json();
33
+ const { current_password, new_password } = body;
34
+ // Validate input
35
+ if (!current_password || !new_password) {
36
+ logger.warn("password_change_validation_failed", {
37
+ filename: get_filename(),
38
+ line_number: get_line_number(),
39
+ error: "Missing required fields",
40
+ has_current_password: !!current_password,
41
+ has_new_password: !!new_password,
42
+ });
43
+ return NextResponse.json({ error: "Current password and new password are required" }, { status: 400 });
44
+ }
45
+ // Get singleton hazo_connect instance
46
+ const hazoConnect = get_hazo_connect_instance();
47
+ // Change password
48
+ const result = await change_password(hazoConnect, user_id, {
49
+ current_password,
50
+ new_password,
51
+ });
52
+ if (!result.success) {
53
+ logger.warn("password_change_failed", {
54
+ filename: get_filename(),
55
+ line_number: get_line_number(),
56
+ error: result.error,
57
+ user_id,
58
+ });
59
+ return NextResponse.json({ error: result.error || "Failed to change password" }, { status: 400 });
60
+ }
61
+ // Invalidate user cache after password change
62
+ try {
63
+ const config = get_auth_utility_config();
64
+ const cache = get_auth_cache(config.cache_max_users, config.cache_ttl_minutes, config.cache_max_age_minutes);
65
+ cache.invalidate_user(user_id);
66
+ }
67
+ catch (cache_error) {
68
+ // Log but don't fail password change if cache invalidation fails
69
+ const cache_error_message = cache_error instanceof Error ? cache_error.message : "Unknown error";
70
+ logger.warn("password_change_cache_invalidation_failed", {
71
+ filename: get_filename(),
72
+ line_number: get_line_number(),
73
+ user_id,
74
+ error: cache_error_message,
75
+ });
76
+ }
77
+ logger.info("password_change_successful", {
78
+ filename: get_filename(),
79
+ line_number: get_line_number(),
80
+ user_id,
81
+ });
82
+ return NextResponse.json({
83
+ success: true,
84
+ message: "Password changed successfully",
85
+ }, { status: 200 });
86
+ }
87
+ catch (error) {
88
+ const error_message = error instanceof Error ? error.message : "Unknown error";
89
+ const error_stack = error instanceof Error ? error.stack : undefined;
90
+ logger.error("password_change_error", {
91
+ filename: get_filename(),
92
+ line_number: get_line_number(),
93
+ error_message,
94
+ error_stack,
95
+ });
96
+ return NextResponse.json({ error: "Failed to change password. Please try again." }, { status: 500 });
97
+ }
98
+ }
@@ -1,2 +1,22 @@
1
- export { POST } from "../../app/api/hazo_auth/create_firm/route";
1
+ import { NextRequest, NextResponse } from "next/server";
2
+ export declare const dynamic = "force-dynamic";
3
+ /**
4
+ * POST - Create a new firm for the authenticated user
5
+ * Body: { firm_name: string, org_structure: string }
6
+ *
7
+ * This endpoint is called when a new user verifies their email and has no
8
+ * existing scope or invitation. They need to create their own firm.
9
+ *
10
+ * Validation:
11
+ * - User must be authenticated
12
+ * - User must not already have a scope assignment
13
+ */
14
+ export declare function POST(request: NextRequest): Promise<NextResponse<{
15
+ error: string;
16
+ }> | NextResponse<{
17
+ success: boolean;
18
+ scope: import("../..").ScopeRecord | undefined;
19
+ user_scope: import("../..").UserScope | undefined;
20
+ message: string;
21
+ }>>;
2
22
  //# sourceMappingURL=create_firm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create_firm.d.ts","sourceRoot":"","sources":["../../../src/server/routes/create_firm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"create_firm.d.ts","sourceRoot":"","sources":["../../../src/server/routes/create_firm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AASxD,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAGvC;;;;;;;;;;GAUG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;;;;IAiH9C"}