Merge branch 'develop' into mkjs-n

This commit is contained in:
tamaina
2023-06-16 06:14:29 +00:00
75 changed files with 650 additions and 562 deletions

View File

@@ -2147,10 +2147,6 @@ export type Endpoints = {
};
};
};
'users/stats': {
req: TODO;
res: TODO;
};
};
declare namespace entities {
@@ -2324,7 +2320,9 @@ type LiteInstanceMetadata = {
themeColor: string | null;
mascotImageUrl: string | null;
bannerUrl: string | null;
errorImageUrl: string | null;
serverErrorImageUrl: string | null;
infoImageUrl: string | null;
notFoundImageUrl: string | null;
iconUrl: string | null;
backgroundImageUrl: string | null;
logoImageUrl: string | null;
@@ -2606,6 +2604,10 @@ export class Stream extends EventEmitter<StreamEvents> {
//
// (undocumented)
disconnectToChannel(connection: NonSharedConnection): void;
// (undocumented)
heartbeat(): void;
// (undocumented)
ping(): void;
// Warning: (ae-forgotten-export) The symbol "SharedConnection" needs to be exported by the entry point index.d.ts
//
// (undocumented)

View File

@@ -584,5 +584,4 @@ export type Endpoints = {
$default: UserDetailed;
};
}; };
'users/stats': { req: TODO; res: TODO; };
};

View File

@@ -71,7 +71,9 @@ export type LiteInstanceMetadata = {
themeColor: string | null;
mascotImageUrl: string | null;
bannerUrl: string | null;
errorImageUrl: string | null;
serverErrorImageUrl: string | null;
infoImageUrl: string | null;
notFoundImageUrl: string | null;
iconUrl: string | null;
backgroundImageUrl: string | null;
logoImageUrl: string | null;

View File

@@ -186,6 +186,14 @@ export default class Stream extends EventEmitter<StreamEvents> {
this.stream.send(JSON.stringify(typeOrPayload));
}
public ping(): void {
this.stream.send('ping');
}
public heartbeat(): void {
this.stream.send('h');
}
/**
* Close this connection
*/