mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
78 lines
1.6 KiB
TypeScript
78 lines
1.6 KiB
TypeScript
import { type ParsedUrlQuery } from 'node:querystring'
|
|
|
|
import { type ExtendedRecordMap, type PageMap } from 'notion-types'
|
|
|
|
export * from 'notion-types'
|
|
|
|
export type NavigationStyle = 'default' | 'custom'
|
|
|
|
export interface PageError {
|
|
message?: string
|
|
statusCode: number
|
|
}
|
|
|
|
export interface PageProps {
|
|
site?: Site
|
|
recordMap?: ExtendedRecordMap
|
|
pageId?: string
|
|
error?: PageError
|
|
}
|
|
|
|
export interface ExtendedTweetRecordMap extends ExtendedRecordMap {
|
|
tweets: Record<string, any>
|
|
}
|
|
|
|
export interface Params extends ParsedUrlQuery {
|
|
pageId: string
|
|
}
|
|
|
|
export interface Site {
|
|
name: string
|
|
domain: string
|
|
|
|
rootNotionPageId: string
|
|
rootNotionSpaceId: string | null
|
|
|
|
// settings
|
|
html?: string
|
|
fontFamily?: string
|
|
darkMode?: boolean
|
|
previewImages?: boolean
|
|
|
|
// opengraph metadata
|
|
description?: string
|
|
image?: string
|
|
}
|
|
|
|
export interface SiteMap {
|
|
site: Site
|
|
pageMap: PageMap
|
|
canonicalPageMap: CanonicalPageMap
|
|
}
|
|
|
|
export interface CanonicalPageMap {
|
|
[canonicalPageId: string]: string
|
|
}
|
|
|
|
export interface PageUrlOverridesMap {
|
|
// maps from a URL path to the notion page id the page should be resolved to
|
|
// (this overrides the built-in URL path generation for these pages)
|
|
[pagePath: string]: string
|
|
}
|
|
|
|
export interface PageUrlOverridesInverseMap {
|
|
// maps from a notion page id to the URL path the page should be resolved to
|
|
// (this overrides the built-in URL path generation for these pages)
|
|
[pageId: string]: string
|
|
}
|
|
|
|
export interface NotionPageInfo {
|
|
pageId: string
|
|
title: string
|
|
image?: string
|
|
imageObjectPosition?: string
|
|
author?: string
|
|
authorImage?: string
|
|
detail?: string
|
|
}
|