forked from FoundKeyGang/FoundKey
foundkey-js: remove ads, detailed instance metadata
The distinction for "DetailedInstanceMetadata" does no longer exist
since commit 9022ab9f2a
.
The `DetailedInstanceMetadata` and `LiteInstanceMetadata` have
therefore been removed, leaving only `InstanceMetadata`.
Changelog: Removed
This commit is contained in:
parent
0ad0ab7589
commit
8c377b6a1a
2 changed files with 3 additions and 25 deletions
|
@ -1,6 +1,5 @@
|
|||
import {
|
||||
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, Instance, InstanceMetadata,
|
||||
LiteInstanceMetadata,
|
||||
Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, InstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, Instance,
|
||||
MeDetailed,
|
||||
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage,
|
||||
} from './entities.js';
|
||||
|
@ -380,21 +379,7 @@ export type Endpoints = {
|
|||
'messaging/messages/create': { req: { userId?: User['id']; groupId?: UserGroup['id']; text?: string; fileId?: DriveFile['id']; }; res: MessagingMessage; };
|
||||
'messaging/messages/delete': { req: { messageId: MessagingMessage['id']; }; res: null; };
|
||||
'messaging/messages/read': { req: { messageId: MessagingMessage['id']; }; res: null; };
|
||||
'meta': { req: { detail?: boolean; }; res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{ detail: true; },
|
||||
DetailedInstanceMetadata,
|
||||
], [
|
||||
{ detail: false; },
|
||||
LiteInstanceMetadata,
|
||||
], [
|
||||
{ detail: boolean; },
|
||||
LiteInstanceMetadata | DetailedInstanceMetadata,
|
||||
]];
|
||||
$default: LiteInstanceMetadata;
|
||||
};
|
||||
}; };
|
||||
'meta': { req: { detail?: boolean; }; res: InstanceMetadata; };
|
||||
'miauth/gen-token': { req: TODO; res: TODO; };
|
||||
'mute/create': { req: TODO; res: TODO; };
|
||||
'mute/delete': { req: { userId: User['id'] }; res: null; };
|
||||
|
|
|
@ -260,7 +260,7 @@ export type CustomEmoji = {
|
|||
aliases: string[];
|
||||
};
|
||||
|
||||
export type LiteInstanceMetadata = {
|
||||
export type InstanceMetadata = {
|
||||
maintainerName: string | null;
|
||||
maintainerEmail: string | null;
|
||||
version: string;
|
||||
|
@ -290,14 +290,9 @@ export type LiteInstanceMetadata = {
|
|||
notFound: string;
|
||||
info: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type DetailedInstanceMetadata = LiteInstanceMetadata & {
|
||||
features: Record<string, any>;
|
||||
};
|
||||
|
||||
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
|
||||
|
||||
export type ServerInfo = {
|
||||
machine: string;
|
||||
cpu: {
|
||||
|
@ -388,8 +383,6 @@ export type AuthSession = {
|
|||
token: string;
|
||||
};
|
||||
|
||||
export type Ad = TODO;
|
||||
|
||||
export type Clip = TODO;
|
||||
|
||||
export type NoteFavorite = {
|
||||
|
|
Loading…
Reference in a new issue