Skip to content

Commit 17d8319

Browse files
authored
chore(types): update private API type definition (#631)
1 parent cc995b7 commit 17d8319

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/client/client.ts

+15
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export type TopicDetail = {
8383
title: string;
8484
};
8585
export type TopicCreation = {
86+
/** bbcode */
8687
text: string;
8788
title: string;
8889
};
@@ -105,6 +106,7 @@ export type GroupMember = {
105106
username: string;
106107
};
107108
export type Topic = {
109+
/** 发帖时间,unix time stamp in seconds */
108110
createdAt: number;
109111
creator: {
110112
avatar: {
@@ -118,14 +120,18 @@ export type Topic = {
118120
user_group: number;
119121
username: string;
120122
};
123+
/** topic id */
121124
id: number;
125+
/** 小组/条目ID */
122126
parentID: number;
123127
repliesCount: number;
124128
title: string;
129+
/** 最后回复时间,unix time stamp in seconds */
125130
updatedAt: number;
126131
};
127132
export type GroupProfile = {
128133
group: Group;
134+
/** 是否已经加入小组 */
129135
inGroup: boolean;
130136
recentAddedMembers: GroupMember[];
131137
topics: Topic[];
@@ -153,6 +159,7 @@ export type CurrentUser = {
153159
};
154160
};
155161
export type Notice = {
162+
/** unix timestamp in seconds */
156163
createdAt: number;
157164
id: number;
158165
postID: number;
@@ -170,10 +177,12 @@ export type Notice = {
170177
};
171178
title: string;
172179
topicID: number;
180+
/** 查看 `./lib/notify.ts` _settings */
173181
type: number;
174182
unread: boolean;
175183
};
176184
export type EpisodeWikiInfo = {
185+
/** YYYY-MM-DD */
177186
date?: string;
178187
duration: string;
179188
ep: number;
@@ -209,10 +218,12 @@ export type SubjectEdit = {
209218
};
210219
export type HistorySummary = {
211220
commitMessage: string;
221+
/** unix timestamp seconds */
212222
createdAt: number;
213223
creator: {
214224
username: string;
215225
};
226+
/** 修改类型。`1` 正常修改, `11` 合并,`103` 锁定/解锁 `104` 未知 */
216227
type: number;
217228
};
218229
/**
@@ -371,6 +382,7 @@ export function createGroupReply(
371382
topicId: number,
372383
body: {
373384
content: string;
385+
/** 被回复的 topic ID, `0` 代表回复楼主 */
374386
replyTo?: number;
375387
},
376388
opts?: Oazapfts.RequestOpts,
@@ -532,6 +544,7 @@ export function createNewGroupTopic(
532544
| {
533545
status: 200;
534546
data: {
547+
/** new topic id */
535548
id: number;
536549
};
537550
}
@@ -736,6 +749,7 @@ export function patchEpisodeWikiInfo(
736749
body: {
737750
commitMessage: string;
738751
episode: {
752+
/** YYYY-MM-DD */
739753
date?: string;
740754
duration?: string;
741755
ep?: number;
@@ -913,6 +927,7 @@ export function listSubjectCovers(subjectId: number, opts?: Oazapfts.RequestOpts
913927
export function uploadSubjectCover(
914928
subjectId: number,
915929
body: {
930+
/** base64 encoded raw bytes, 4mb size limit on **decoded** size */
916931
content: string;
917932
},
918933
opts?: Oazapfts.RequestOpts,

0 commit comments

Comments
 (0)