-
-
Notifications
You must be signed in to change notification settings - Fork 427
/
Copy pathnotification-service.ts
42 lines (40 loc) · 1.51 KB
/
notification-service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
import type {
AttachedBoardsChangeEvent,
BoardsPackage,
Config,
ProgressMessage,
Sketch,
ExampleRef,
} from '../protocol';
import type { LibraryPackage } from './library-service';
export interface NotificationServiceClient {
notifyIndexWillUpdate(progressId: string): void;
notifyIndexUpdateDidProgress(progressMessage: ProgressMessage): void;
notifyIndexDidUpdate(progressId: string): void;
notifyIndexUpdateDidFail({
progressId,
message,
}: {
progressId: string;
message: string;
}): void;
notifyDaemonDidStart(port: string): void;
notifyDaemonDidStop(): void;
notifyConfigDidChange(event: { config: Config | undefined }): void;
notifyPlatformDidInstall(event: { item: BoardsPackage }): void;
notifyPlatformDidUninstall(event: { item: BoardsPackage }): void;
notifyLibraryDidInstall(event: { item: LibraryPackage }): void;
notifyLibraryDidUninstall(event: { item: LibraryPackage }): void;
notifyAttachedBoardsDidChange(event: AttachedBoardsChangeEvent): void;
notifyRecentSketchesDidChange(event: {
sketches: (Sketch | ExampleRef)[];
}): void;
}
export const NotificationServicePath = '/services/notification-service';
export const NotificationServiceServer = Symbol('NotificationServiceServer');
export interface NotificationServiceServer
extends Required<NotificationServiceClient>,
JsonRpcServer<NotificationServiceClient> {
disposeClient(client: NotificationServiceClient): void;
}