fix(frontend, misskey-js): make block switch work (#11429)

* fix(frontend, misskey-js): make block switch work

* Update CHANGELOG.md
This commit is contained in:
Kagami Sascha Rosylight 2023-07-31 05:22:57 +02:00 committed by GitHub
parent 5096be06ac
commit a52f63ec6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 18 deletions

View file

@ -17,6 +17,11 @@ export type Acct = {
// @public (undocumented)
type Ad = TODO_2;
// @public (undocumented)
type AdminInstanceMetadata = DetailedInstanceMetadata & {
blockedHosts: string[];
};
// @public (undocumented)
type Announcement = {
id: ID;
@ -329,8 +334,8 @@ export type Endpoints = {
res: TODO;
};
'admin/meta': {
req: TODO;
res: TODO;
req: NoParams;
res: AdminInstanceMetadata;
};
'admin/reset-password': {
req: TODO;
@ -2226,6 +2231,7 @@ declare namespace entities {
LiteInstanceMetadata,
DetailedInstanceMetadata,
InstanceMetadata,
AdminInstanceMetadata,
ServerInfo,
Stats,
Page,
@ -2317,7 +2323,7 @@ type ID = string;
// @public (undocumented)
type Instance = {
id: ID;
caughtAt: DateString;
firstRetrievedAt: DateString;
host: string;
usersCount: number;
notesCount: number;
@ -2331,6 +2337,7 @@ type Instance = {
lastCommunicatedAt: DateString;
isNotResponding: boolean;
isSuspended: boolean;
isBlocked: boolean;
softwareName: string | null;
softwareVersion: string | null;
openRegistrations: boolean | null;

View file

@ -2,7 +2,7 @@ import type {
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance,
LiteInstanceMetadata,
MeDetailed,
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, Invite, InviteLimit,
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, Invite, InviteLimit, AdminInstanceMetadata,
} from './entities.js';
type TODO = Record<string, any> | null;
@ -20,7 +20,7 @@ export type Endpoints = {
'admin/get-table-stats': { req: TODO; res: TODO; };
'admin/invite': { req: TODO; res: TODO; };
'admin/logs': { req: TODO; res: TODO; };
'admin/meta': { req: TODO; res: TODO; };
'admin/meta': { req: NoParams; res: AdminInstanceMetadata; };
'admin/reset-password': { req: TODO; res: TODO; };
'admin/resolve-abuse-user-report': { req: TODO; res: TODO; };
'admin/resync-chart': { req: TODO; res: TODO; };

View file

@ -346,6 +346,11 @@ export type DetailedInstanceMetadata = LiteInstanceMetadata & {
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
export type AdminInstanceMetadata = DetailedInstanceMetadata & {
// TODO: There are more fields.
blockedHosts: string[];
};
export type ServerInfo = {
machine: string;
cpu: {
@ -482,7 +487,7 @@ export type Blocking = {
export type Instance = {
id: ID;
caughtAt: DateString;
firstRetrievedAt: DateString;
host: string;
usersCount: number;
notesCount: number;
@ -496,6 +501,7 @@ export type Instance = {
lastCommunicatedAt: DateString;
isNotResponding: boolean;
isSuspended: boolean;
isBlocked: boolean;
softwareName: string | null;
softwareVersion: string | null;
openRegistrations: boolean | null;