Article.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import { ITocPathNode } from "../corpus/TocPath";
  2. import type { IStudioApiResponse } 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 IArticleDataResponse {
  66. uid: string;
  67. title: string;
  68. subtitle: string;
  69. summary: string;
  70. content?: string;
  71. content_type?: string;
  72. html?: string;
  73. path?: ITocPathNode[];
  74. status: number;
  75. lang: string;
  76. created_at: string;
  77. updated_at: string;
  78. }
  79. export interface IArticleResponse {
  80. ok: boolean;
  81. message: string;
  82. data: IArticleDataResponse;
  83. }
  84. export interface IArticleListResponse {
  85. ok: boolean;
  86. message: string;
  87. data: {
  88. rows: IArticleDataResponse[];
  89. count: number;
  90. };
  91. }
  92. export interface IArticleCreateRequest {
  93. title: string;
  94. lang: string;
  95. studio: string;
  96. }
  97. export interface IAnthologyCreateRequest {
  98. title: string;
  99. lang: string;
  100. studio: string;
  101. }
  102. export interface IArticleMapRequest {
  103. id?: string;
  104. collect_id?: string;
  105. article_id?: string;
  106. level: number;
  107. title: string;
  108. children?: number;
  109. }
  110. export interface IArticleMapListResponse {
  111. ok: boolean;
  112. message: string;
  113. data: {
  114. rows: IArticleMapRequest[];
  115. count: number;
  116. };
  117. }
  118. export interface IArticleMapAddRequest {
  119. anthology_id: string;
  120. article_id: string[];
  121. operation: string;
  122. }
  123. export interface IArticleMapUpdateRequest {
  124. data: IArticleMapRequest[];
  125. operation: string;
  126. }
  127. export interface IArticleMapAddResponse {
  128. ok: boolean;
  129. message: string;
  130. data: number;
  131. }
  132. export interface IDeleteResponse {
  133. ok: boolean;
  134. message: string;
  135. data: number;
  136. }