V2 integration (#293)

* feat: integrations and lifecycles

* refactor: prevent issues with start order
This commit is contained in:
Carlos Valente
2023-02-23 20:22:38 +01:00
committed by GitHub
parent d8a84ac88d
commit 70cc071425
61 changed files with 1510 additions and 687 deletions
@@ -0,0 +1,12 @@
import { OSCSettings } from './core/OscSettings.type.js';
export type DatabaseModel = {
rundown: any;
event: any;
settings: any;
views: any;
aliases: any;
userFields: any;
osc: OSCSettings;
http: any;
};
@@ -1,7 +1,7 @@
enum TimerType {
enum TimerTypeType {
CountDown = 'count-down',
CountUp = 'count-up',
Clock = 'clock'
}
export default TimerType
export default TimerTypeType
@@ -0,0 +1,13 @@
import { TimerLifeCycle } from './TimerLifecycle.type';
export type TimerLifeCycleKey = keyof typeof TimerLifeCycle;
export type OscSubscription = { [key in TimerLifeCycleKey]?: { message: string; enabled: boolean } };
export interface OSCSettings {
portIn: number;
portOut: number;
targetIP: string;
enabledIn: boolean;
enabledOut: boolean;
subscriptions: OscSubscription;
}
@@ -0,0 +1,8 @@
export enum TimerLifeCycle {
onLoad = 'onLoad',
onStart = 'onStart',
onPause = 'onPause',
onStop = 'onStop',
onUpdate = 'onUpdate',
onFinish = 'onFinish',
}
+23 -2
View File
@@ -1,3 +1,24 @@
import TimerType from './definitions/TimerType.js';
import TimerTypeType from './definitions/TimerType.type.js';
import { DatabaseModel } from './definitions/DataModel.type.js';
import { TimerLifeCycle } from './definitions/core/TimerLifecycle.type.js';
import { OSCSettings, OscSubscription } from './definitions/core/OscSettings.type.js';
export { TimerType };
// DATA MODEL
export type { DatabaseModel };
// ---> Rundown
export type { TimerTypeType };
// ---> Event
// ---> Settings
// ---> Views
// ---> Aliases
// ---> User Fields
// ---> OSC
export type { OscSubscription, OSCSettings };
// ---> HTTP
// SERVER
export { TimerLifeCycle };
// CLIENT