|
- import React from 'react'
-
- import { CATEGORIES, USER_ROLES, ViewFlagBehavior } from '@/consts'
-
- export type Category = typeof CATEGORIES[number]
-
- export type Menu = MenuItem[]
-
- export type MenuItem = {
- name: string
- to: string
- base?: string
- subMenu: SubMenuItem[] }
-
- export type NicoTag = Tag & {
- category: 'nico'
- linkedTags: Tag[] }
-
- export type Post = {
- id: number
- url: string
- title: string
- thumbnail: string
- thumbnailBase: string
- tags: Tag[]
- viewed: boolean }
-
- export type SubMenuItem = {
- component: React.ReactNode
- visible: boolean
- } | {
- name: string
- to: string
- visible?: boolean }
-
- export type Tag = {
- id: number
- name: string
- category: Category
- postCount: number }
-
- export type User = {
- id: number
- name: string | null
- inheritanceCode: string
- role: UserRole }
-
- export type ViewFlagBehavior = typeof ViewFlagBehavior[keyof typeof ViewFlagBehavior]
-
- export type WikiPage = {
- id: number
- title: string
- body: string
- sha: string
- pred?: string
- succ?: string
- updatedAt?: string }
-
- export type WikiPageChange = {
- sha: string
- pred?: string
- succ?: string
- wikiPage: WikiPage
- user: User
- changeType: string
- timestamp: string }
-
- export type WikiPageDiff = {
- wikiPageId: number
- title: string
- olderSha: string
- newerSha: string
- diff: WikiPageDiffDiff[] }
-
- export type WikiPageDiffDiff = {
- type: 'context' | 'added' | 'removed'
- content: string }
-
- export type UserRole = typeof USER_ROLES[number]
|