mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: subscription types and form register
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { Subscription } from './Subscription.type.js';
|
||||
|
||||
type HttpSubscriptionOptions = { message: string; enabled: boolean };
|
||||
export type HttpSubscription = Subscription<HttpSubscriptionOptions>;
|
||||
|
||||
export interface HTTPSettings {
|
||||
enabledOut: boolean;
|
||||
subscriptions: Subscription;
|
||||
subscriptions: HttpSubscription;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { Subscription } from './Subscription.type.js';
|
||||
|
||||
type OscSubscriptionOptions = { message: string; enabled: boolean };
|
||||
export type OscSubscription = Subscription<OscSubscriptionOptions>;
|
||||
|
||||
export interface OSCSettings {
|
||||
portIn: number;
|
||||
portOut: number;
|
||||
targetIP: string;
|
||||
enabledIn: boolean;
|
||||
enabledOut: boolean;
|
||||
subscriptions: Subscription;
|
||||
subscriptions: OscSubscription;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { TimerLifeCycleKey } from './TimerLifecycle.type.js';
|
||||
|
||||
export type SubscriptionOptions = { message: string; enabled: boolean };
|
||||
export type Subscription = { [key in TimerLifeCycleKey]: SubscriptionOptions[] };
|
||||
export type Subscription<T> = { [key in TimerLifeCycleKey]: T[] };
|
||||
|
||||
@@ -29,11 +29,12 @@ export type { Alias } from './definitions/core/Alias.type.js';
|
||||
export type { UserFields } from './definitions/core/UserFields.type.js';
|
||||
|
||||
// ---> Integration, Subscription
|
||||
export type { Subscription, SubscriptionOptions } from './definitions/core/Subscription.type.js';
|
||||
export type { Subscription } from './definitions/core/Subscription.type.js';
|
||||
|
||||
// ---> OSC
|
||||
export type { OSCSettings } from './definitions/core/OscSettings.type.js';
|
||||
export type { OSCSettings, OscSubscription } from './definitions/core/OscSettings.type.js';
|
||||
// ---> HTTP
|
||||
export type { HTTPSettings } from './definitions/core/HttpSettings.type.js';
|
||||
export type { HTTPSettings, HttpSubscription } from './definitions/core/HttpSettings.type.js';
|
||||
|
||||
// SERVER RESPONSES
|
||||
export type { NetworkInterface, GetInfo } from './api/ontime-controller/BackendResponse.type.js';
|
||||
|
||||
Reference in New Issue
Block a user