Files
hats-app/types/next-auth.d.ts
T
Ichsan Kurniawan 7f8e6637e4 Move auth config and build admin menus
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
2026-11-06 18:25:54 +07:00

44 lines
1.4 KiB
TypeScript

import { ICompany } from "@/app/admin/administration/company/component/type";
import { IDivision } from "@/app/admin/administration/division/component/type";
import NextAuth from "next-auth";
declare module 'next-auth' {
interface Session {
user: {
access_token: string
refresh_token: string
expired_at: number
detail: {
id: number
email: string
nik: string
fullname: string
nickname: string
avatar?: string
phone_number: string
company?: ICompany
division?: IDivision
role: {
id: number
code: string
name: string
allow_admin_panel: boolean
role_detail?: {
action: string[]
menu: {
id: number
code: string
name: string
menu_parent_id: number
icon: string
path_url: string
sort: number
is_admin_menu: boolean
}
}[]
}
}
error?: string | any
}
}
}