first commit
This commit is contained in:
26
types/next-auth.d.ts
vendored
Normal file
26
types/next-auth.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import NextAuth from 'next-auth'
|
||||
|
||||
declare module 'next-auth' {
|
||||
interface Session {
|
||||
user: {
|
||||
id: string
|
||||
email: string
|
||||
name?: string | null
|
||||
image?: string | null
|
||||
role: 'ADMIN' | 'MEMBER' | 'WHOLESALER' | 'PART_TIME' | 'CUSTOMER'
|
||||
referralCode: string
|
||||
}
|
||||
}
|
||||
|
||||
interface User {
|
||||
role: 'ADMIN' | 'MEMBER' | 'WHOLESALER' | 'PART_TIME' | 'CUSTOMER'
|
||||
referralCode: string
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'next-auth/jwt' {
|
||||
interface JWT {
|
||||
role: 'ADMIN' | 'MEMBER' | 'WHOLESALER' | 'PART_TIME' | 'CUSTOMER'
|
||||
referralCode: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user