2
0
mirror of https://github.com/ad1217/PrinterStatus synced 2024-11-11 02:55:09 -05:00
PrinterStatus/types/messages.d.ts
2021-11-08 17:34:41 -05:00

28 lines
620 B
TypeScript

import { Message as OctoprintMessage } from './octoprint';
interface BaseMessage {
printer: string;
}
export interface StatusMessage extends BaseMessage {
kind: 'status';
msg: OctoprintMessage;
}
export interface WebcamSettings {
flipH: boolean;
flipV: boolean;
rotate90: boolean;
}
export type OctoprintColor = 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'black' | 'white' | 'default';
export interface SettingsMessage extends BaseMessage {
kind: 'settings';
name: string;
webcam: WebcamSettings;
color: OctoprintColor;
}
export type Message = StatusMessage | SettingsMessage;