refactor: improve cuesheet composition

refactor: simplify placing events in rundown

m
This commit is contained in:
Carlos Valente
2024-12-17 13:21:16 +01:00
committed by Carlos Valente
parent c7faab00a3
commit ec823e0095
28 changed files with 223 additions and 1191 deletions
@@ -1,3 +1,4 @@
import type { OntimeBlock, OntimeDelay, OntimeEvent } from '../../definitions/core/OntimeEvent.type.js';
import type { OntimeRundownEntry } from '../../definitions/core/Rundown.type.js';
type EventId = string;
@@ -8,3 +9,14 @@ export interface RundownCached {
order: EventId[];
revision: number;
}
export type PatchWithId = Partial<OntimeEvent | OntimeDelay | OntimeBlock> & { id: string };
export type EventPostPayload = Partial<OntimeRundownEntry> & {
after?: string;
before?: string;
};
export type TransientEventPayload = Partial<OntimeEvent | OntimeDelay | OntimeBlock> & {
after?: string;
before?: string;
};
@@ -9,7 +9,6 @@ export enum SupportedEvent {
export type OntimeBaseEvent = {
type: SupportedEvent;
id: string;
after?: string; // used when creating an event to indicate its position in rundown
};
export type OntimeDelay = OntimeBaseEvent & {
+7 -1
View File
@@ -55,7 +55,13 @@ export type {
ProjectLogoResponse,
} from './api/ontime-controller/BackendResponse.type.js';
export type { QuickStartData } from './api/db/db.type.js';
export type { RundownCached, NormalisedRundown } from './api/rundown-controller/BackendResponse.type.js';
export type {
EventPostPayload,
NormalisedRundown,
PatchWithId,
RundownCached,
TransientEventPayload,
} from './api/rundown-controller/BackendResponse.type.js';
// SERVER RUNTIME
export { type Log, LogLevel, type LogMessage, LogOrigin } from './definitions/runtime/Logger.type.js';