ぼざクリ タグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.2 KiB

  1. import { CATEGORIES, USER_ROLES } from '@/consts'
  2. export type Category = typeof CATEGORIES[number]
  3. export type Post = {
  4. id: number
  5. url: string
  6. title: string
  7. thumbnail: string
  8. thumbnailBase: string
  9. tags: Tag[]
  10. viewed: boolean }
  11. export type Tag = {
  12. id: number
  13. name: string
  14. category: Category
  15. count?: number}
  16. export type User = {
  17. id: number
  18. name: string | null
  19. inheritanceCode: string
  20. role: UserRole }
  21. export type WikiPage = {
  22. id: number
  23. title: string
  24. sha: string
  25. pred?: string
  26. succ?: string
  27. updatedAt?: string }
  28. export type WikiPageChange = {
  29. sha: string
  30. pred?: string
  31. succ?: string
  32. wikiPage: WikiPage
  33. user: User
  34. changeType: string
  35. timestamp: string }
  36. export type WikiPageDiff = {
  37. wikiPageId: number
  38. title: string
  39. olderSha: string
  40. newerSha: string
  41. diff: WikiPageDiffDiff[] }
  42. export type WikiPageDiffDiff = {
  43. type: 'context' | 'added' | 'removed'
  44. content: string }
  45. export type UserRole = typeof USER_ROLES[number]