ぼざクリ タグ広場 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.
 
 
 
 
 
 

63 lines
1.4 KiB

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