index.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. export interface IUserProfile {
  2. email: string;
  3. is_active: boolean;
  4. is_superuser: boolean;
  5. full_name?: string;
  6. id: number;
  7. available_time: number;
  8. }
  9. export interface IUserProfileUpdate {
  10. email?: string;
  11. full_name?: string;
  12. password?: string;
  13. is_active?: boolean;
  14. is_superuser?: boolean;
  15. }
  16. export interface IUserProfileCreate {
  17. email: string;
  18. full_name?: string;
  19. password: string;
  20. is_active?: boolean;
  21. is_superuser?: boolean;
  22. }
  23. export interface AppNotification {
  24. content: string;
  25. color?: string;
  26. showProgress?: boolean;
  27. };
  28. export interface MainState {
  29. token: string;
  30. isLoggedIn: boolean | null;
  31. logInError: boolean;
  32. userProfile: IUserProfile | null;
  33. dashboardMiniDrawer: boolean;
  34. dashboardShowDrawer: boolean;
  35. notifications: AppNotification[];
  36. videos: Video[];
  37. images: Image[];
  38. videosWebSocket: WebSocket;
  39. };
  40. export interface Video {
  41. id: number;
  42. title: string;
  43. stored_filename: string;
  44. progress_state: string;
  45. }
  46. export interface VideoCreate {
  47. title: string;
  48. anchor_id: number;
  49. lang_id: number;
  50. }
  51. export interface VideoUploaded {
  52. accepted: boolean;
  53. error_message: string | null;
  54. video_info: Video | null;
  55. }
  56. export interface ArticleCreate {
  57. title: string;
  58. link: string;
  59. content: string;
  60. }
  61. export interface Image {
  62. file_name: string;
  63. stored_file_name: string;
  64. content: string;
  65. state: string;
  66. link: any;
  67. }
  68. export interface ImageDownload {
  69. file_name: string;
  70. stored_file_name: string;
  71. }