| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- import type { IStudio } from "../auth/Studio"
- import type { IUser } from "../auth/User"
- import type { IChannel } from "../channel/Channel"
- import type { ITocPathNode } from "../corpus/TocPath"
- import type { IStudioApiResponse, TRole } from "./Auth";
- export interface IArticleListApiResponse {
- article: string;
- title: string;
- level: string;
- children: number;
- }
- export interface IAnthologyDataRequest {
- title: string;
- subtitle: string;
- summary?: string;
- article_list?: IArticleListApiResponse[];
- lang: string;
- status: number;
- default_channel?: string | null;
- }
- export interface IAnthologyDataResponse {
- uid: string;
- title: string;
- subtitle: string;
- summary: string;
- article_list: IArticleListApiResponse[];
- studio: IStudio;
- default_channel?: IChannel;
- lang: string;
- status: number;
- childrenNumber: number;
- created_at: string;
- updated_at: string;
- }
- export interface IAnthologyResponse {
- ok: boolean;
- message: string;
- data: IAnthologyDataResponse;
- }
- export interface IAnthologyListResponse {
- ok: boolean;
- message: string;
- data: {
- rows: IAnthologyDataResponse[];
- count: number;
- };
- }
- export interface IAnthologyStudioListApiResponse {
- ok: boolean;
- message: string;
- data: {
- count: number;
- rows: IAnthologyStudioListDataApiResponse[];
- };
- }
- export interface IAnthologyStudioListDataApiResponse {
- count: number;
- studio: IStudioApiResponse;
- }
- export interface IArticleDataRequest {
- uid: string;
- title: string;
- subtitle: string;
- summary?: string | null;
- content?: string;
- content_type?: string;
- status: number;
- lang: string;
- to_tpl?: boolean;
- anthology_id?: string;
- }
- export interface IChapterToc {
- key?: string;
- book: number;
- paragraph: number;
- level: number;
- pali_title: string /**巴利文标题 */;
- title?: string /**译文文标题 */;
- progress?: number[];
- }
- export interface IArticleDataResponse {
- uid: string;
- title: string;
- title_text?: string;
- subtitle: string;
- summary: string | null;
- _summary?: string;
- content?: string;
- content_type?: string;
- toc?: IChapterToc[];
- html?: string;
- path?: ITocPathNode[];
- status: number;
- lang: string;
- anthology_count?: number;
- anthology_first?: { uid: string; title: string };
- role?: TRole;
- studio?: IStudio;
- editor?: IUser;
- created_at: string;
- updated_at: string;
- from?: number;
- to?: number;
- mode?: string;
- paraId?: string;
- parent_uid?: string;
- channels?: string;
- }
- export interface IArticleResponse {
- ok: boolean;
- message: string;
- data: IArticleDataResponse;
- }
- export interface IArticleListResponse {
- ok: boolean;
- message: string;
- data: {
- rows: IArticleDataResponse[];
- count: number;
- };
- }
- export interface IArticleCreateRequest {
- title: string;
- lang: string;
- studio: string;
- anthologyId?: string;
- parentId?: string;
- status?: number;
- }
- export interface IAnthologyCreateRequest {
- title: string;
- lang: string;
- studio: string;
- }
- export interface IArticleMapRequest {
- id?: string;
- collect_id?: string;
- collection?: { id: string; title: string };
- article_id?: string;
- level: number;
- title: string;
- title_text?: string;
- editor?: IUser;
- children?: number;
- status?: number;
- deleted_at?: string | null;
- created_at?: string;
- updated_at?: string;
- }
- export interface IArticleMapListResponse {
- ok: boolean;
- message: string;
- data: {
- rows: IArticleMapRequest[];
- count: number;
- };
- }
- export interface IArticleMapAddRequest {
- anthology_id: string;
- article_id: string[];
- operation: string;
- }
- export interface IArticleMapUpdateRequest {
- data: IArticleMapRequest[];
- operation: string;
- }
- export interface IArticleMapAddResponse {
- ok: boolean;
- message: string;
- data: number;
- }
- export interface IDeleteResponse {
- ok: boolean;
- message: string;
- data: number;
- }
- export interface IArticleNavResponse {
- ok: boolean;
- data: IArticleNavData;
- message: string;
- }
- export interface IArticleNavData {
- curr?: IArticleMapRequest;
- prev?: IArticleMapRequest;
- next?: IArticleMapRequest;
- }
- export interface IPageNavResponse {
- ok: boolean;
- data: IPageNavData;
- message: string;
- }
- export interface IPageNavData {
- curr: IPageNavItem;
- prev: IPageNavItem;
- next: IPageNavItem;
- }
- export interface IPageNavItem {
- id: number;
- type: string;
- volume: number;
- page: number;
- book: number;
- paragraph: number;
- wid: number;
- pcd_book_id: number;
- created_at: string;
- updated_at: string;
- }
- export interface ICSParaNavResponse {
- ok: boolean;
- data: ICSParaNavData;
- message: string;
- }
- export interface ICSParaNavData {
- curr: ICSParaNavItem;
- prev?: ICSParaNavItem;
- next?: ICSParaNavItem;
- end: number;
- }
- export interface ICSParaNavItem {
- book: number;
- start: number;
- content: string;
- }
- export interface IArticleFtsListResponse {
- ok: boolean;
- message: string;
- data: {
- rows: IArticleDataResponse[];
- page: { size: number; current: number; total: number };
- };
- }
|