taxonomy/types/index.d.ts

61 lines
1.1 KiB
TypeScript

import { Icons } from "@/components/icons"
import { User } from "@prisma/client"
import type { Icon } from "lucide-react"
export type NavItem = {
title: string
href: string
disabled?: boolean
}
export type MainNavItem = NavItem
export type SidebarNavItem = {
title: string
disabled?: boolean
external?: boolean
icon?: keyof typeof Icons
} & (
| {
href: string
items?: never
}
| {
href?: string
items: NavLink[]
}
)
export type SiteConfig = {
name: string
links: {
twitter: string
github: string
}
}
export type DocsConfig = {
mainNav: MainNavItem[]
sidebarNav: SidebarNavItem[]
}
export type MarketingConfig = {
mainNav: MainNavItem[]
}
export type DashboardConfig = {
mainNav: MainNavItem[]
sidebarNav: SidebarNavItem[]
}
export type SubscriptionPlan = {
name: string
description: string
stripePriceId: string
}
export type UserSubscriptionPlan = SubscriptionPlan &
Pick<User, "stripeCustomerId" | "stripeSubscriptionId"> & {
stripeCurrentPeriodEnd: number
isPro: boolean
}