resources.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import type { Record } from 'immutable';
  2. type CustomEmoji = Record<{
  3. shortcode: string;
  4. static_url: string;
  5. url: string;
  6. }>;
  7. type AccountField = Record<{
  8. name: string;
  9. value: string;
  10. verified_at: string | null;
  11. }>;
  12. interface AccountApiResponseValues {
  13. acct: string;
  14. avatar: string;
  15. avatar_static: string;
  16. bot: boolean;
  17. created_at: string;
  18. discoverable: boolean;
  19. display_name: string;
  20. emojis: CustomEmoji[];
  21. fields: AccountField[];
  22. followers_count: number;
  23. following_count: number;
  24. group: boolean;
  25. header: string;
  26. header_static: string;
  27. id: string;
  28. last_status_at: string;
  29. locked: boolean;
  30. note: string;
  31. statuses_count: number;
  32. url: string;
  33. uri: string;
  34. username: string;
  35. }
  36. type NormalizedAccountField = Record<{
  37. name_emojified: string;
  38. value_emojified: string;
  39. value_plain: string;
  40. }>;
  41. interface NormalizedAccountValues {
  42. display_name_html: string;
  43. fields: NormalizedAccountField[];
  44. note_emojified: string;
  45. note_plain: string;
  46. }
  47. export type Account = Record<
  48. AccountApiResponseValues & NormalizedAccountValues
  49. >;