2021-05-16 09:18:45 +00:00
|
|
|
import { ID, InstanceMetadata, Note, OriginType, Page, ServerInfo, Stats, User, UserSorting } from './entities';
|
2021-05-14 02:46:39 +00:00
|
|
|
|
|
|
|
type TODO = Record<string, any>;
|
|
|
|
|
2021-05-15 05:25:18 +00:00
|
|
|
type ShowUserReq = { username: string; host?: string; } | { userId: ID; };
|
|
|
|
|
2021-05-14 02:46:39 +00:00
|
|
|
export type Endpoints = {
|
2021-05-15 05:25:18 +00:00
|
|
|
// admin
|
|
|
|
|
|
|
|
// announcements
|
|
|
|
'announcements': { req: { limit?: number; withUnreads?: boolean; sinceId?: ID; untilId?: ID; }; res: TODO; };
|
|
|
|
|
|
|
|
// antennas
|
|
|
|
'antennas/create': { req: TODO; res: TODO; };
|
|
|
|
|
|
|
|
// ap
|
|
|
|
|
|
|
|
// app
|
|
|
|
|
|
|
|
// auth
|
|
|
|
|
|
|
|
// blocking
|
|
|
|
|
|
|
|
// channnels
|
|
|
|
|
|
|
|
// charts
|
|
|
|
|
|
|
|
// clips
|
|
|
|
|
|
|
|
// drive
|
|
|
|
'drive': { req: null; res: { capacity: number; usage: number; }; };
|
|
|
|
|
|
|
|
// federation
|
|
|
|
|
|
|
|
// following
|
|
|
|
|
|
|
|
// gallery
|
|
|
|
|
|
|
|
// games
|
|
|
|
|
|
|
|
// get-online-users-count
|
|
|
|
|
|
|
|
// hashtags
|
|
|
|
|
|
|
|
// i
|
2021-05-14 02:46:39 +00:00
|
|
|
'i': { req: TODO; res: User; };
|
2021-05-15 05:25:18 +00:00
|
|
|
|
|
|
|
// messaging
|
|
|
|
|
|
|
|
// meta
|
2021-05-16 02:19:51 +00:00
|
|
|
'meta': { req: { detail?: boolean; }; res: InstanceMetadata; };
|
2021-05-15 05:25:18 +00:00
|
|
|
|
|
|
|
// miauth
|
|
|
|
|
|
|
|
// mute
|
|
|
|
|
|
|
|
// my
|
|
|
|
|
|
|
|
// notes
|
|
|
|
'notes': { req: { limit?: number; sinceId?: ID; untilId?: ID; }; res: Note[]; };
|
|
|
|
'notes/create': { req: TODO; res: { createdNote: Note }; };
|
|
|
|
'notes/delete': { req: { noteId: ID; }; res: null; };
|
|
|
|
'notes/show': { req: { noteId: ID; }; res: Note; };
|
|
|
|
|
|
|
|
// notifications
|
|
|
|
|
|
|
|
// page-push
|
|
|
|
'page-push': { req: { pageId: ID; event: string; var?: any; }; res: null; };
|
|
|
|
|
|
|
|
// pages
|
|
|
|
'pages/create': { req: TODO; res: Page; };
|
|
|
|
'pages/delete': { req: { pageId: ID; }; res: null; };
|
|
|
|
'pages/featured': { req: null; res: Page[]; };
|
|
|
|
'pages/like': { req: { pageId: ID; }; res: null; };
|
|
|
|
'pages/show': { req: { pageId?: ID; name?: string; username?: string; }; res: Page; };
|
|
|
|
'pages/unlike': { req: { pageId: ID; }; res: null; };
|
|
|
|
'pages/update': { req: TODO; res: null; };
|
|
|
|
|
|
|
|
// ping
|
|
|
|
|
|
|
|
// pinned-users
|
|
|
|
|
|
|
|
// promo
|
|
|
|
|
|
|
|
// request-reset-password
|
|
|
|
|
|
|
|
// reset-password
|
|
|
|
'reset-password': { req: { token: string; password: string; }; res: null; };
|
|
|
|
|
|
|
|
// room
|
|
|
|
|
|
|
|
// stats
|
|
|
|
'stats': { req: null; res: Stats; };
|
|
|
|
|
|
|
|
// server-info
|
|
|
|
'server-info': { req: null; res: ServerInfo; };
|
|
|
|
|
|
|
|
// sw
|
|
|
|
|
|
|
|
// username
|
|
|
|
|
|
|
|
// users
|
|
|
|
'users': { req: { limit?: number; offset?: number; sort?: UserSorting; origin?: OriginType; }; res: User[]; };
|
|
|
|
'users/show': { req: ShowUserReq; res: User; } | { req: { userIds: ID[]; }; res: User[]; };
|
2021-05-14 02:46:39 +00:00
|
|
|
};
|