Channel.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import type { IStudio, TRole } from "./Auth";
  2. export interface IChannel {
  3. name: string;
  4. id: string;
  5. type?: TChannelType;
  6. lang?: string;
  7. }
  8. export type TChannelType =
  9. | "translation"
  10. | "nissaya"
  11. | "original"
  12. | "wbw"
  13. | "commentary"
  14. | "similar";
  15. export interface IChannelApiData {
  16. id: string;
  17. name: string;
  18. type?: TChannelType;
  19. }
  20. export interface ChannelInfoProps {
  21. channel: IChannelApiData;
  22. studio: IStudio;
  23. count?: number;
  24. }
  25. /**
  26. * 句子完成情况
  27. * [句子字符数,是否完成]
  28. *
  29. */
  30. export type IFinal = [number, boolean];
  31. export interface IApiResponseChannelData {
  32. uid: string;
  33. name: string;
  34. summary: string;
  35. type: TChannelType;
  36. studio: IStudio;
  37. lang: string;
  38. status: number;
  39. is_system: boolean;
  40. progress?: number;
  41. created_at: string;
  42. updated_at: string;
  43. role?: TRole;
  44. final?: IFinal[];
  45. content_created_at: string;
  46. content_updated_at: string;
  47. }
  48. export interface IApiResponseChannel {
  49. ok: boolean;
  50. message: string;
  51. data: IApiResponseChannelData;
  52. }
  53. export interface IApiResponseChannelList {
  54. ok: boolean;
  55. message: string;
  56. data: {
  57. rows: IApiResponseChannelData[];
  58. count: number;
  59. };
  60. }
  61. export interface ISentInChapterListResponse {
  62. ok: boolean;
  63. data: ISentInChapterListData;
  64. message: string;
  65. }
  66. export interface ISentInChapterListData {
  67. rows: ISentInChapterListDataRow[];
  68. count: number;
  69. }
  70. export interface ISentInChapterListDataRow {
  71. book: number;
  72. paragraph: number;
  73. word_begin: number;
  74. word_end: number;
  75. }