Article.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. import { ITocPathNode } from "../corpus/TocPath";
  2. import type { IStudioApiResponse, TRole } from "./Auth";
  3. export interface IArticleListApiResponse {
  4. article: string;
  5. title: string;
  6. level: string;
  7. children: number;
  8. }
  9. export interface IAnthologyDataRequest {
  10. title: string;
  11. subtitle: string;
  12. summary: string;
  13. article_list?: IArticleListApiResponse[];
  14. lang: string;
  15. status: number;
  16. }
  17. export interface IAnthologyDataResponse {
  18. uid: string;
  19. title: string;
  20. subtitle: string;
  21. summary: string;
  22. article_list: IArticleListApiResponse[];
  23. studio: IStudioApiResponse;
  24. lang: string;
  25. status: number;
  26. childrenNumber: number;
  27. created_at: string;
  28. updated_at: string;
  29. }
  30. export interface IAnthologyResponse {
  31. ok: boolean;
  32. message: string;
  33. data: IAnthologyDataResponse;
  34. }
  35. export interface IAnthologyListResponse {
  36. ok: boolean;
  37. message: string;
  38. data: {
  39. rows: IAnthologyDataResponse[];
  40. count: number;
  41. };
  42. }
  43. export interface IAnthologyStudioListApiResponse {
  44. ok: boolean;
  45. message: string;
  46. data: {
  47. count: number;
  48. rows: IAnthologyStudioListDataApiResponse[];
  49. };
  50. }
  51. export interface IAnthologyStudioListDataApiResponse {
  52. count: number;
  53. studio: IStudioApiResponse;
  54. }
  55. export interface IArticleDataRequest {
  56. uid: string;
  57. title: string;
  58. subtitle: string;
  59. summary: string;
  60. content?: string;
  61. content_type?: string;
  62. status: number;
  63. lang: string;
  64. }
  65. export interface IChapterToc {
  66. book: number;
  67. paragraph: number;
  68. level: number;
  69. pali_title: string /**巴利文标题 */;
  70. title?: string /**译文文标题 */;
  71. progress?: number[];
  72. }
  73. export interface IArticleDataResponse {
  74. uid: string;
  75. title: string;
  76. subtitle: string;
  77. summary: string;
  78. content?: string;
  79. content_type?: string;
  80. toc?: IChapterToc[];
  81. html?: string;
  82. path?: ITocPathNode[];
  83. status: number;
  84. lang: string;
  85. anthology_count?: number;
  86. anthology_first?: { title: string };
  87. role?: TRole;
  88. created_at: string;
  89. updated_at: string;
  90. }
  91. export interface IArticleResponse {
  92. ok: boolean;
  93. message: string;
  94. data: IArticleDataResponse;
  95. }
  96. export interface IArticleListResponse {
  97. ok: boolean;
  98. message: string;
  99. data: {
  100. rows: IArticleDataResponse[];
  101. count: number;
  102. };
  103. }
  104. export interface IArticleCreateRequest {
  105. title: string;
  106. lang: string;
  107. studio: string;
  108. }
  109. export interface IAnthologyCreateRequest {
  110. title: string;
  111. lang: string;
  112. studio: string;
  113. }
  114. export interface IArticleMapRequest {
  115. id?: string;
  116. collect_id?: string;
  117. article_id?: string;
  118. level: number;
  119. title: string;
  120. children?: number;
  121. }
  122. export interface IArticleMapListResponse {
  123. ok: boolean;
  124. message: string;
  125. data: {
  126. rows: IArticleMapRequest[];
  127. count: number;
  128. };
  129. }
  130. export interface IArticleMapAddRequest {
  131. anthology_id: string;
  132. article_id: string[];
  133. operation: string;
  134. }
  135. export interface IArticleMapUpdateRequest {
  136. data: IArticleMapRequest[];
  137. operation: string;
  138. }
  139. export interface IArticleMapAddResponse {
  140. ok: boolean;
  141. message: string;
  142. data: number;
  143. }
  144. export interface IDeleteResponse {
  145. ok: boolean;
  146. message: string;
  147. data: number;
  148. }