2021-11-04 23:28:21 -04:00
|
|
|
import { Message as OctoprintMessage } from './octoprint';
|
2019-09-20 15:46:05 -04:00
|
|
|
|
2021-11-04 23:28:21 -04:00
|
|
|
interface BaseMessage {
|
2019-09-20 15:46:05 -04:00
|
|
|
printer: string;
|
2021-11-04 23:28:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface StatusMessage extends BaseMessage {
|
|
|
|
kind: 'status';
|
|
|
|
msg: OctoprintMessage;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type OctoprintColor = 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'black' | 'white' | 'default';
|
|
|
|
|
|
|
|
export interface SettingsMessage extends BaseMessage {
|
|
|
|
kind: 'settings';
|
|
|
|
name: string;
|
|
|
|
color: OctoprintColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type Message = StatusMessage | SettingsMessage;
|