Akos Kitta a36524e02a Update package index on 3rd party URLs change.
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-07-08 09:04:10 +02:00

40 lines
1.5 KiB
TypeScript

import type { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
import type {
AttachedBoardsChangeEvent,
BoardsPackage,
Config,
ProgressMessage,
Sketch,
} 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[] }): void;
}
export const NotificationServicePath = '/services/notification-service';
export const NotificationServiceServer = Symbol('NotificationServiceServer');
export interface NotificationServiceServer
extends Required<NotificationServiceClient>,
JsonRpcServer<NotificationServiceClient> {
disposeClient(client: NotificationServiceClient): void;
}