refactor: validation

This commit is contained in:
Carlos Valente
2023-12-01 13:08:05 +01:00
parent f720c56345
commit efcd6494be
20 changed files with 263 additions and 172 deletions
@@ -5,7 +5,7 @@ import { OSCSettings } from './core/OscSettings.type.js';
import { Settings } from './core/Settings.type.js';
import { UserFields } from './core/UserFields.type.js';
import { ViewSettings } from './core/Views.type.js';
import { HTTPSettings } from '../index.js';
import { HttpSettings } from '../index.js';
export type DatabaseModel = {
rundown: OntimeRundown;
@@ -15,5 +15,5 @@ export type DatabaseModel = {
aliases: Alias[];
userFields: UserFields;
osc: OSCSettings;
http: HTTPSettings;
http: HttpSettings;
};
@@ -1,9 +1,9 @@
import { Subscription } from './Subscription.type.js';
type HttpSubscriptionOptions = { message: string; enabled: boolean };
export type HttpSubscriptionOptions = { message: string; enabled: boolean };
export type HttpSubscription = Subscription<HttpSubscriptionOptions>;
export interface HTTPSettings {
export interface HttpSettings {
enabledOut: boolean;
subscriptions: HttpSubscription;
}
@@ -1,6 +1,6 @@
import { Subscription } from './Subscription.type.js';
type OscSubscriptionOptions = { message: string; enabled: boolean };
export type OscSubscriptionOptions = { message: string; enabled: boolean };
export type OscSubscription = Subscription<OscSubscriptionOptions>;
export interface OSCSettings {
+3 -2
View File
@@ -32,9 +32,10 @@ export type { UserFields } from './definitions/core/UserFields.type.js';
export type { Subscription } from './definitions/core/Subscription.type.js';
// ---> OSC
export type { OSCSettings, OscSubscription } from './definitions/core/OscSettings.type.js';
export type { OSCSettings, OscSubscription, OscSubscriptionOptions } from './definitions/core/OscSettings.type.js';
// ---> HTTP
export type { HTTPSettings, HttpSubscription } from './definitions/core/HttpSettings.type.js';
export type { HttpSettings, HttpSubscription, HttpSubscriptionOptions } from './definitions/core/HttpSettings.type.js';
// SERVER RESPONSES
export type { NetworkInterface, GetInfo } from './api/ontime-controller/BackendResponse.type.js';