common-objects.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. export interface ActivityIdentifierObject {
  2. identifier: string
  3. name: string
  4. }
  5. export interface ActivityIconObject {
  6. type: 'Image'
  7. url: string
  8. mediaType: 'image/jpeg'
  9. width: number
  10. height: number
  11. }
  12. export type ActivityVideoUrlObject = {
  13. type: 'Link'
  14. mediaType: 'video/mp4' | 'video/webm' | 'video/ogg'
  15. href: string
  16. height: number
  17. size: number
  18. fps: number
  19. }
  20. export type ActivityPlaylistSegmentHashesObject = {
  21. type: 'Link'
  22. name: 'sha256'
  23. mediaType: 'application/json'
  24. href: string
  25. }
  26. export type ActivityPlaylistInfohashesObject = {
  27. type: 'Infohash'
  28. name: string
  29. }
  30. export type ActivityPlaylistUrlObject = {
  31. type: 'Link'
  32. mediaType: 'application/x-mpegURL'
  33. href: string
  34. tag?: ActivityTagObject[]
  35. }
  36. export type ActivityBitTorrentUrlObject = {
  37. type: 'Link'
  38. mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
  39. href: string
  40. height: number
  41. }
  42. export type ActivityMagnetUrlObject = {
  43. type: 'Link'
  44. mediaType: 'application/x-bittorrent;x-scheme-handler/magnet'
  45. href: string
  46. height: number
  47. }
  48. export type ActivityHtmlUrlObject = {
  49. type: 'Link'
  50. mediaType: 'text/html'
  51. href: string
  52. }
  53. export interface ActivityHashTagObject {
  54. type: 'Hashtag' | 'Mention'
  55. href?: string
  56. name: string
  57. }
  58. export interface ActivityMentionObject {
  59. type: 'Hashtag' | 'Mention'
  60. href?: string
  61. name: string
  62. }
  63. export type ActivityTagObject = ActivityPlaylistSegmentHashesObject |
  64. ActivityPlaylistInfohashesObject |
  65. ActivityVideoUrlObject |
  66. ActivityHashTagObject |
  67. ActivityMentionObject |
  68. ActivityBitTorrentUrlObject |
  69. ActivityMagnetUrlObject
  70. export type ActivityUrlObject = ActivityVideoUrlObject |
  71. ActivityPlaylistUrlObject |
  72. ActivityBitTorrentUrlObject |
  73. ActivityMagnetUrlObject |
  74. ActivityHtmlUrlObject
  75. export interface ActivityPubAttributedTo {
  76. type: 'Group' | 'Person'
  77. id: string
  78. }