mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
notes/createの型定義をした
This commit is contained in:
parent
b426e8792c
commit
b2875c9d90
1 changed files with 22 additions and 1 deletions
23
src/ai.ts
23
src/ai.ts
|
@ -36,6 +36,27 @@ export type Meta = {
|
||||||
lastWakingAt: number;
|
lastWakingAt: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type postParam = {
|
||||||
|
text: string;
|
||||||
|
visibility?: 'public' | 'home' | 'followers' | 'specified';
|
||||||
|
visibleUserIds?: string[];
|
||||||
|
cw? : string | null;
|
||||||
|
localOnly?: boolean;
|
||||||
|
noExtractMentions?: boolean;
|
||||||
|
noExtractHashtags?: boolean;
|
||||||
|
noExtractEmojis?: boolean;
|
||||||
|
fileIds?: string[];
|
||||||
|
replyId?: string;
|
||||||
|
renoteId?: string;
|
||||||
|
channelId?: string;
|
||||||
|
poll?: {
|
||||||
|
choices: string[];
|
||||||
|
multiple?: boolean;
|
||||||
|
expiresAt?: number | null;
|
||||||
|
expiredAfter?: number | null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 藍
|
* 藍
|
||||||
*/
|
*/
|
||||||
|
@ -374,7 +395,7 @@ export default class 藍 {
|
||||||
* 投稿します
|
* 投稿します
|
||||||
*/
|
*/
|
||||||
@autobind
|
@autobind
|
||||||
public async post(param: any) {
|
public async post(param: postParam) {
|
||||||
const res = await this.api('notes/create', param);
|
const res = await this.api('notes/create', param);
|
||||||
return res.createdNote;
|
return res.createdNote;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue