feat: send http

This commit is contained in:
Carlos Valente
2025-01-11 14:39:58 +01:00
committed by Carlos Valente
parent 8b84963e17
commit ab4dd300ca
8 changed files with 138 additions and 52 deletions
+2
View File
@@ -105,5 +105,7 @@ export {
isPlayableEvent,
isOntimeCycle,
isKeyOfType,
isOSCOutput,
isHTTPOutput,
} from './utils/guards.js';
export type { MaybeNumber, MaybeString } from './utils/utils.type.js';
+9
View File
@@ -1,3 +1,4 @@
import type { AutomationOutput, HTTPOutput, OSCOutput } from '../definitions/core/Automation.type.js';
import type { OntimeBlock, OntimeDelay, OntimeEvent, PlayableEvent } from '../definitions/core/OntimeEvent.type.js';
import { SupportedEvent } from '../definitions/core/OntimeEvent.type.js';
import type { OntimeRundownEntry } from '../definitions/core/Rundown.type.js';
@@ -32,3 +33,11 @@ export function isOntimeCycle(maybeCycle: unknown): maybeCycle is TimerLifeCycle
if (typeof maybeCycle !== 'string') return false;
return Object.values(TimerLifeCycle).includes(maybeCycle as TimerLifeCycle);
}
export function isOSCOutput(output: AutomationOutput): output is OSCOutput {
return output.type === 'osc';
}
export function isHTTPOutput(output: AutomationOutput): output is HTTPOutput {
return output.type === 'http';
}