remove deprecated api
This commit is contained in:
+7
-68
@@ -2,12 +2,12 @@ import type { Attachment } from "./Attachment";
|
||||
import type { Model } from "./Model";
|
||||
|
||||
// 文章
|
||||
export type Article<E extends ArticleMusicExtendData | ArticleSoftwareExtendData> = {
|
||||
export type Article<A> = {
|
||||
title?: string;
|
||||
type: ArticleType;
|
||||
digest?: string;
|
||||
data?: string;
|
||||
extendData?: E;
|
||||
args?: A;
|
||||
reads: number;
|
||||
likes: number;
|
||||
showComment: boolean;
|
||||
@@ -15,74 +15,13 @@ export type Article<E extends ArticleMusicExtendData | ArticleSoftwareExtendData
|
||||
canRanking: boolean;
|
||||
} & Model;
|
||||
|
||||
export type ArticleView<E extends ArticleMusicExtendData | ArticleSoftwareExtendData> = {
|
||||
export type ArticleView<A> = {
|
||||
comments?: number;
|
||||
attachmentList: Attachment[];
|
||||
} & Article<E>;
|
||||
} & Article<A>;
|
||||
|
||||
export enum ArticleType {
|
||||
export const ArticleType = "COMMON";
|
||||
|
||||
/** 公版 */
|
||||
PUBLIC,
|
||||
export type ArticleType = (typeof ArticleType)[keyof typeof ArticleType];
|
||||
|
||||
/** 音乐 */
|
||||
MUSIC,
|
||||
|
||||
/** 软件 */
|
||||
SOFTWARE
|
||||
}
|
||||
|
||||
export enum ArticleAttachType {
|
||||
|
||||
COVER,
|
||||
}
|
||||
|
||||
export type ArticleMusicExtendData = {
|
||||
title: string;
|
||||
list: ArticleMusicItem[];
|
||||
info: {
|
||||
key: string;
|
||||
value: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export type ArticleSoftwareExtendData = {
|
||||
url?: string;
|
||||
downloads: ArticleSoftwareDownload[];
|
||||
format: string;
|
||||
runtime: ArticleSoftwareRuntime[];
|
||||
size: number;
|
||||
version: string;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
export enum ArticleSoftwareDownloadType {
|
||||
|
||||
TIMI_MONGO,
|
||||
|
||||
TIMI_COS,
|
||||
|
||||
URL
|
||||
}
|
||||
|
||||
export enum ArticleSoftwareRuntime {
|
||||
|
||||
JVM,
|
||||
|
||||
WINDOWS,
|
||||
|
||||
LINUX,
|
||||
|
||||
MAC_OS
|
||||
}
|
||||
|
||||
export type ArticleSoftwareDownload = {
|
||||
type: ArticleSoftwareDownloadType;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export type ArticleMusicItem = {
|
||||
title: string;
|
||||
audio?: string;
|
||||
video?: string;
|
||||
}
|
||||
export const ArticleAttachType = "COVER";
|
||||
|
||||
+6
-17
@@ -1,10 +1,10 @@
|
||||
import { Model } from "./Model";
|
||||
|
||||
export type Attachment = {
|
||||
bizType: AttachmentBizType;
|
||||
bizId: string;
|
||||
bizType?: AttachmentBizType;
|
||||
bizId?: string;
|
||||
attachType?: string;
|
||||
mongoId: string;
|
||||
mongoId?: string;
|
||||
title?: string;
|
||||
name?: string;
|
||||
mimeType?: string;
|
||||
@@ -17,26 +17,15 @@ export type Attachment = {
|
||||
tempFileId?: string;
|
||||
} & Model;
|
||||
|
||||
export type TempFileResp = {
|
||||
export type TempFile = {
|
||||
id: string;
|
||||
expireAt?: number;
|
||||
};
|
||||
|
||||
export type BizUpdateReq = {
|
||||
export type BizIdUpdate = {
|
||||
bizType: AttachmentBizType;
|
||||
bizId: string;
|
||||
items: Partial<Attachment>[];
|
||||
};
|
||||
|
||||
export enum AttachmentBizType {
|
||||
|
||||
USER = "USER",
|
||||
|
||||
GAO_CUSTOMER = "GAO_CUSTOMER",
|
||||
|
||||
GAO_REGISTER_RECORD = "GAO_REGISTER_RECORD",
|
||||
|
||||
TEMP_FILE = "TEMP_FILE",
|
||||
|
||||
MIRROR = "MIRROR"
|
||||
}
|
||||
export type AttachmentBizType = | "USER" | "GAO_CUSTOMER" | "GAO_REGISTER_RECORD" | "TEMP_FILE" | "MIRROR";
|
||||
|
||||
+3
-32
@@ -13,10 +13,10 @@ export type Comment = {
|
||||
user?: User;
|
||||
|
||||
/** 回复列表 */
|
||||
replies?: CommentReply[];
|
||||
replies?: Comment[];
|
||||
|
||||
/** 回复分页 */
|
||||
repliesPage?: Page<CommentReply>;
|
||||
repliesPage?: Page<Comment>;
|
||||
|
||||
/** 用于绑定组件当前页下标 */
|
||||
repliesCurrent?: number;
|
||||
@@ -31,33 +31,4 @@ export type Comment = {
|
||||
repository?: object;
|
||||
} & Model
|
||||
|
||||
export type CommentReply = {
|
||||
replyId?: number;
|
||||
commentId?: number;
|
||||
senderId?: number;
|
||||
senderNick?: string;
|
||||
receiverId?: number;
|
||||
receiverNick?: string;
|
||||
content?: string;
|
||||
|
||||
comment?: Comment;
|
||||
sender?: User;
|
||||
receiver?: User;
|
||||
} & Model;
|
||||
|
||||
export enum CommentReplyBizType {
|
||||
|
||||
COMMENT = "COMMENT",
|
||||
|
||||
SENDER = "SENDER",
|
||||
|
||||
RECEIVER = "RECEIVER"
|
||||
}
|
||||
|
||||
export enum CommentBizType {
|
||||
ARTICLE = "ARTICLE",
|
||||
|
||||
GIT_ISSUE = "GIT_ISSUE",
|
||||
|
||||
GIT_MERGE = "GIT_MERGE",
|
||||
}
|
||||
export type CommentBizType = "ARTICLE" | "GIT_ISSUE" | "GIT_MERGE";
|
||||
|
||||
+7
-17
@@ -1,9 +1,3 @@
|
||||
export enum RunEnv {
|
||||
DEV = "DEV",
|
||||
DEV_SSL = "DEV_SSL",
|
||||
PROD = "PROD"
|
||||
}
|
||||
|
||||
// 基本实体模型
|
||||
export type Model = {
|
||||
id?: string;
|
||||
@@ -23,17 +17,17 @@ export type ApiResponse<T> = {
|
||||
}
|
||||
|
||||
export type Page<T> = {
|
||||
index: number;
|
||||
size: number;
|
||||
orderMap?: { [K in keyof T]?: OrderType };
|
||||
equalsExample?: Partial<T>;
|
||||
likesExample?: Partial<T>;
|
||||
} & BasePage;
|
||||
|
||||
export type BasePage = {
|
||||
index: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export enum OrderType {
|
||||
ASC = "ASC",
|
||||
DESC = "DESC"
|
||||
}
|
||||
export type OrderType = "ASC" | "DESC";
|
||||
|
||||
export type PageResult<T> = {
|
||||
total: number;
|
||||
@@ -53,11 +47,7 @@ export type CaptchaResult = {
|
||||
data: string;
|
||||
}
|
||||
|
||||
export enum ImageType {
|
||||
AUTO = "ir-auto",
|
||||
SMOOTH = "ir-smooth",
|
||||
PIXELATED = "ir-pixelated"
|
||||
}
|
||||
export type ImageType = "IR-AUTO" | "IR-SMOOTH" | "IR-PIXELATED";
|
||||
|
||||
export type KeyValue<V, K = string> = {
|
||||
key: K;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
export enum TemplateBizType {
|
||||
|
||||
GIT = "GIT",
|
||||
|
||||
FOREVER_MC = "FOREVER_MC"
|
||||
}
|
||||
+1
-18
@@ -32,18 +32,7 @@ export type User = {
|
||||
phoneNoVerified?: boolean;
|
||||
} & Model;
|
||||
|
||||
export enum UserAttachType {
|
||||
|
||||
AVATAR = "AVATAR",
|
||||
|
||||
WRAPPER = "WRAPPER",
|
||||
|
||||
LICENSE = "LICENSE",
|
||||
|
||||
DEFAULT_AVATAR = "DEFAULT_AVATAR",
|
||||
|
||||
DEFAULT_WRAPPER = "DEFAULT_WRAPPER"
|
||||
}
|
||||
export type UserAttachType = "AVATAR" | "WRAPPER";
|
||||
|
||||
export type RegisterRequest = {
|
||||
name: string;
|
||||
@@ -76,12 +65,6 @@ export type LoginUser = {
|
||||
user?: User;
|
||||
};
|
||||
|
||||
export enum LoginType {
|
||||
ALERT,
|
||||
IFRAME,
|
||||
REDIRECT
|
||||
}
|
||||
|
||||
export type UserLevelType = {
|
||||
exp: number; // 经验数值,和 UserData.exp 一样
|
||||
value: number; // 经验对应等级,[0, 8]
|
||||
|
||||
@@ -8,7 +8,6 @@ export * from "./Model";
|
||||
export * from "./Permission";
|
||||
export * from "./Role";
|
||||
export * from "./User";
|
||||
export * from "./Template";
|
||||
export * from "./Comment";
|
||||
export * from "./Developer";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user