Update misskey-js API md file

This commit is contained in:
ssmucny 2023-04-24 22:39:22 -04:00
parent bcbc261e3b
commit 5295ddae71
1 changed files with 982 additions and 975 deletions

View File

@ -1680,6 +1680,12 @@ export type Endpoints = {
expiresAt?: null | number; expiresAt?: null | number;
expiredAfter?: null | number; expiredAfter?: null | number;
}; };
event?: null | {
title: string;
start: number;
end?: null | number;
metadata: Record<string, string[]>;
};
}; };
res: { res: {
createdNote: Note; createdNote: Note;
@ -1759,16 +1765,17 @@ export type Endpoints = {
}; };
'notes/events/search': { 'notes/events/search': {
req: { req: {
query?: string;
sinceId?: Note['id']; sinceId?: Note['id'];
untilId?: Note['id']; untilId?: Note['id'];
limit?: number; limit?: number;
offset?: number; offset?: number;
host?: string;
users?: User['id'][]; users?: User['id'][];
sinceDate?: number; sinceDate?: number;
untilDate?: number; untilDate?: number;
sortBy?: 'startDate' | 'craetedAt';
filters?: Record<string, string[]>; filters?: Record<string, string[]>;
sortBy?: 'startDate' | 'createAt' };
res: Note[]; res: Note[];
}; };
'notes/reactions': { 'notes/reactions': {
@ -2168,9 +2175,9 @@ export type Endpoints = {
req: TODO; req: TODO;
res: TODO; res: TODO;
}; };
}; };
declare namespace entities { declare namespace entities {
export { export {
ID, ID,
DateString, DateString,
@ -2213,11 +2220,11 @@ export type Endpoints = {
UserSorting, UserSorting,
OriginType OriginType
} }
} }
export { entities } export { entities }
// @public (undocumented) // @public (undocumented)
type FetchLike = (input: string, init?: { type FetchLike = (input: string, init?: {
method?: string; method?: string;
body?: string; body?: string;
credentials?: RequestCredentials; credentials?: RequestCredentials;
@ -2225,41 +2232,41 @@ export type Endpoints = {
headers: { headers: {
[key in string]: string; [key in string]: string;
}; };
}) => Promise<{ }) => Promise<{
status: number; status: number;
json(): Promise<any>; json(): Promise<any>;
}>; }>;
// @public (undocumented) // @public (undocumented)
export const ffVisibility: readonly ["public", "followers", "private"]; export const ffVisibility: readonly ["public", "followers", "private"];
// @public (undocumented) // @public (undocumented)
type Following = { type Following = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
followerId: User['id']; followerId: User['id'];
followeeId: User['id']; followeeId: User['id'];
}; };
// @public (undocumented) // @public (undocumented)
type FollowingFolloweePopulated = Following & { type FollowingFolloweePopulated = Following & {
followee: UserDetailed; followee: UserDetailed;
}; };
// @public (undocumented) // @public (undocumented)
type FollowingFollowerPopulated = Following & { type FollowingFollowerPopulated = Following & {
follower: UserDetailed; follower: UserDetailed;
}; };
// @public (undocumented) // @public (undocumented)
type FollowRequest = { type FollowRequest = {
id: ID; id: ID;
follower: User; follower: User;
followee: User; followee: User;
}; };
// @public (undocumented) // @public (undocumented)
type GalleryPost = { type GalleryPost = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
updatedAt: DateString; updatedAt: DateString;
@ -2272,13 +2279,13 @@ export type Endpoints = {
isSensitive: boolean; isSensitive: boolean;
likedCount: number; likedCount: number;
isLiked?: boolean; isLiked?: boolean;
}; };
// @public (undocumented) // @public (undocumented)
type ID = string; type ID = string;
// @public (undocumented) // @public (undocumented)
type Instance = { type Instance = {
id: ID; id: ID;
caughtAt: DateString; caughtAt: DateString;
host: string; host: string;
@ -2305,16 +2312,16 @@ export type Endpoints = {
faviconUrl: string | null; faviconUrl: string | null;
themeColor: string | null; themeColor: string | null;
infoUpdatedAt: DateString | null; infoUpdatedAt: DateString | null;
}; };
// @public (undocumented) // @public (undocumented)
type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
// @public (undocumented) // @public (undocumented)
function isAPIError(reason: any): reason is APIError; function isAPIError(reason: any): reason is APIError;
// @public (undocumented) // @public (undocumented)
type LiteInstanceMetadata = { type LiteInstanceMetadata = {
maintainerName: string | null; maintainerName: string | null;
maintainerEmail: string | null; maintainerEmail: string | null;
version: string; version: string;
@ -2363,10 +2370,10 @@ export type Endpoints = {
}[]; }[];
translatorAvailable: boolean; translatorAvailable: boolean;
serverRules: string[]; serverRules: string[];
}; };
// @public (undocumented) // @public (undocumented)
type MeDetailed = UserDetailed & { type MeDetailed = UserDetailed & {
avatarId: DriveFile['id']; avatarId: DriveFile['id'];
bannerId: DriveFile['id']; bannerId: DriveFile['id'];
autoAcceptFollowed: boolean; autoAcceptFollowed: boolean;
@ -2391,10 +2398,10 @@ export type Endpoints = {
receiveAnnouncementEmail: boolean; receiveAnnouncementEmail: boolean;
usePasswordLessLogin: boolean; usePasswordLessLogin: boolean;
[other: string]: any; [other: string]: any;
}; };
// @public (undocumented) // @public (undocumented)
type MessagingMessage = { type MessagingMessage = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
file: DriveFile | null; file: DriveFile | null;
@ -2408,13 +2415,13 @@ export type Endpoints = {
recipientId: User['id'] | null; recipientId: User['id'] | null;
group?: UserGroup | null; group?: UserGroup | null;
groupId: UserGroup['id'] | null; groupId: UserGroup['id'] | null;
}; };
// @public (undocumented) // @public (undocumented)
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
// @public (undocumented) // @public (undocumented)
type Note = { type Note = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
text: string | null; text: string | null;
@ -2429,7 +2436,7 @@ export type Endpoints = {
title: string; title: string;
start: DateString; start: DateString;
end: DateString | null; end: DateString | null;
metadata: Record<string, string[]>; metadata: Record<string, string>;
}; };
files: DriveFile[]; files: DriveFile[];
fileIds: DriveFile['id'][]; fileIds: DriveFile['id'][];
@ -2456,95 +2463,95 @@ export type Endpoints = {
uri?: string; uri?: string;
url?: string; url?: string;
isHidden?: boolean; isHidden?: boolean;
}; };
// @public (undocumented) // @public (undocumented)
type NoteFavorite = { type NoteFavorite = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
noteId: Note['id']; noteId: Note['id'];
note: Note; note: Note;
}; };
// @public (undocumented) // @public (undocumented)
type NoteReaction = { type NoteReaction = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
user: UserLite; user: UserLite;
type: string; type: string;
}; };
// @public (undocumented) // @public (undocumented)
export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; export const noteVisibilities: readonly ["public", "home", "followers", "specified"];
// @public (undocumented) // @public (undocumented)
type Notification_2 = { type Notification_2 = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
isRead: boolean; isRead: boolean;
} & ({ } & ({
type: 'reaction'; type: 'reaction';
reaction: string; reaction: string;
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'reply'; type: 'reply';
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'renote'; type: 'renote';
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'quote'; type: 'quote';
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'mention'; type: 'mention';
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'pollVote'; type: 'pollVote';
user: User; user: User;
userId: User['id']; userId: User['id'];
note: Note; note: Note;
} | { } | {
type: 'follow'; type: 'follow';
user: User; user: User;
userId: User['id']; userId: User['id'];
} | { } | {
type: 'followRequestAccepted'; type: 'followRequestAccepted';
user: User; user: User;
userId: User['id']; userId: User['id'];
} | { } | {
type: 'receiveFollowRequest'; type: 'receiveFollowRequest';
user: User; user: User;
userId: User['id']; userId: User['id'];
} | { } | {
type: 'groupInvited'; type: 'groupInvited';
invitation: UserGroup; invitation: UserGroup;
user: User; user: User;
userId: User['id']; userId: User['id'];
} | { } | {
type: 'app'; type: 'app';
header?: string | null; header?: string | null;
body: string; body: string;
icon?: string | null; icon?: string | null;
}); });
// @public (undocumented) // @public (undocumented)
export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"];
// @public (undocumented) // @public (undocumented)
type OriginType = 'combined' | 'local' | 'remote'; type OriginType = 'combined' | 'local' | 'remote';
// @public (undocumented) // @public (undocumented)
type Page = { type Page = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
updatedAt: DateString; updatedAt: DateString;
@ -2564,22 +2571,22 @@ export type Endpoints = {
attachedFiles: any; attachedFiles: any;
likedCount: number; likedCount: number;
isLiked?: boolean; isLiked?: boolean;
}; };
// @public (undocumented) // @public (undocumented)
type PageEvent = { type PageEvent = {
pageId: Page['id']; pageId: Page['id'];
event: string; event: string;
var: any; var: any;
userId: User['id']; userId: User['id'];
user: User; user: User;
}; };
// @public (undocumented) // @public (undocumented)
export const permissions: string[]; export const permissions: string[];
// @public (undocumented) // @public (undocumented)
type ServerInfo = { type ServerInfo = {
machine: string; machine: string;
cpu: { cpu: {
model: string; model: string;
@ -2592,19 +2599,19 @@ export type Endpoints = {
total: number; total: number;
used: number; used: number;
}; };
}; };
// @public (undocumented) // @public (undocumented)
type Signin = { type Signin = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
ip: string; ip: string;
headers: Record<string, any>; headers: Record<string, any>;
success: boolean; success: boolean;
}; };
// @public (undocumented) // @public (undocumented)
type Stats = { type Stats = {
notesCount: number; notesCount: number;
originalNotesCount: number; originalNotesCount: number;
usersCount: number; usersCount: number;
@ -2612,12 +2619,12 @@ export type Endpoints = {
instances: number; instances: number;
driveUsageLocal: number; driveUsageLocal: number;
driveUsageRemote: number; driveUsageRemote: number;
}; };
// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts
// //
// @public (undocumented) // @public (undocumented)
export class Stream extends EventEmitter<StreamEvents> { export class Stream extends EventEmitter<StreamEvents> {
constructor(origin: string, user: { constructor(origin: string, user: {
token: string; token: string;
} | null, options?: { } | null, options?: {
@ -2647,13 +2654,13 @@ export type Endpoints = {
state: 'initializing' | 'reconnecting' | 'connected'; state: 'initializing' | 'reconnecting' | 'connected';
// (undocumented) // (undocumented)
useChannel<C extends keyof Channels>(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection<Channels[C]>; useChannel<C extends keyof Channels>(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection<Channels[C]>;
} }
// @public (undocumented) // @public (undocumented)
type User = UserLite | UserDetailed; type User = UserLite | UserDetailed;
// @public (undocumented) // @public (undocumented)
type UserDetailed = UserLite & { type UserDetailed = UserLite & {
bannerBlurhash: string | null; bannerBlurhash: string | null;
bannerColor: string | null; bannerColor: string | null;
bannerUrl: string | null; bannerUrl: string | null;
@ -2695,21 +2702,21 @@ export type Endpoints = {
updatedAt: DateString | null; updatedAt: DateString | null;
uri: string | null; uri: string | null;
url: string | null; url: string | null;
}; };
// @public (undocumented) // @public (undocumented)
type UserGroup = TODO_2; type UserGroup = TODO_2;
// @public (undocumented) // @public (undocumented)
type UserList = { type UserList = {
id: ID; id: ID;
createdAt: DateString; createdAt: DateString;
name: string; name: string;
userIds: User['id'][]; userIds: User['id'][];
}; };
// @public (undocumented) // @public (undocumented)
type UserLite = { type UserLite = {
id: ID; id: ID;
username: string; username: string;
host: string | null; host: string | null;
@ -2731,18 +2738,18 @@ export type Endpoints = {
faviconUrl: Instance['faviconUrl']; faviconUrl: Instance['faviconUrl'];
themeColor: Instance['themeColor']; themeColor: Instance['themeColor'];
}; };
}; };
// @public (undocumented) // @public (undocumented)
type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt';
// Warnings were encountered during analysis: // Warnings were encountered during analysis:
// //
// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts // src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts // src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:602:27 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts // src/api.types.ts:614:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts // src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package) // (No @packageDocumentation comment for this package)
``` ```