Files
gremiumhub/legalconsenthub/utils/auth-types.ts

21 lines
762 B
TypeScript

import type { auth } from '../server/utils/auth'
import type { authClient } from './auth-client'
export type Session = typeof auth.$Infer.Session
export type ActiveOrganization = typeof authClient.$Infer.ActiveOrganization
export type Invitation = typeof authClient.$Infer.Invitation
// Types can be found here: https://github.com/better-auth/better-auth/blob/3f574ec70bb15c155a78673d42c5e25f7376ced3/packages/better-auth/src/plugins/organization/routes/crud-invites.ts#L531
export type CustomInvitation = {
organizationName: string
organizationSlug: string
inviterEmail: string
id: string
status: 'pending' | 'accepted' | 'rejected' | 'canceled'
email: string
expiresAt: Date
organizationId: string
role: string
inviterId: string
} | null