@@ -48,6 +48,7 @@ import type { ExpectedPackage } from '../package'
4848import type { ABResolverConfiguration } from '../abPlayback'
4949import type { SofieIngestSegment } from '../ingest-types'
5050import { PackageStatusMessage } from '@sofie-automation/shared-lib/dist/packageStatusMessages'
51+ import { BlueprintPlayoutPersistentStore } from '../context/playoutStore'
5152
5253export { PackageStatusMessage }
5354
@@ -111,7 +112,6 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
111112 context : ISyncIngestUpdateToPartInstanceContext ,
112113 existingPartInstance : BlueprintSyncIngestPartInstance ,
113114 newData : BlueprintSyncIngestNewData ,
114-
115115 playoutStatus : 'previous' | 'current' | 'next'
116116 ) => void
117117
@@ -130,12 +130,13 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
130130 /** Execute an action defined by an IBlueprintActionManifest */
131131 executeAction ?: (
132132 context : IActionExecutionContext ,
133+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
133134 actionId : string ,
134135 userData : ActionUserData ,
135136 triggerMode : string | undefined ,
136- privateData ? : unknown ,
137- publicData ? : unknown ,
138- actionOptions ? : { [ key : string ] : any }
137+ privateData : unknown | undefined ,
138+ publicData : unknown | undefined ,
139+ actionOptions : { [ key : string ] : any } | undefined
139140 ) => Promise < { validationErrors : any } | void >
140141
141142 /** Generate adlib piece from ingest data */
@@ -204,21 +205,27 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
204205 * Called during a Take action.
205206 * Allows for part modification or aborting the take.
206207 */
207- onTake ?: ( context : IOnTakeContext ) => Promise < void >
208+ onTake ?: (
209+ context : IOnTakeContext ,
210+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState >
211+ ) => Promise < void >
208212 /** Called after a Take action */
209213 onPostTake ?: ( context : IPartEventContext ) => Promise < void >
210214
211215 /**
212216 * Called when a part is set as Next, including right after a Take.
213217 * Allows for part modification.
214218 */
215- onSetAsNext ?: ( context : IOnSetAsNextContext ) => Promise < void >
219+ onSetAsNext ?: (
220+ context : IOnSetAsNextContext ,
221+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState >
222+ ) => Promise < void >
216223
217224 /** Called after the timeline has been generated, used to manipulate the timeline */
218225 onTimelineGenerate ?: (
219226 context : ITimelineEventContext ,
220227 timeline : OnGenerateTimelineObj < TSR . TSRTimelineContent > [ ] ,
221- previousPersistentState : TimelinePersistentState | undefined ,
228+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
222229 previousPartEndState : PartEndState | undefined ,
223230 resolvedPieces : IBlueprintResolvedPieceInstance [ ]
224231 ) => Promise < BlueprintResultTimeline >
@@ -229,7 +236,7 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
229236 /** Called just before taking the next part. This generates some persisted data used by onTimelineGenerate to modify the timeline based on the previous part (eg, persist audio levels) */
230237 getEndStateForPart ?: (
231238 context : IRundownContext ,
232- previousPersistentState : TimelinePersistentState | undefined ,
239+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
233240 partInstance : IBlueprintPartInstance ,
234241 resolvedPieces : IBlueprintResolvedPieceInstance [ ] ,
235242 time : number
@@ -249,7 +256,6 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
249256
250257export interface BlueprintResultTimeline {
251258 timeline : OnGenerateTimelineObj < TSR . TSRTimelineContent > [ ]
252- persistentState : TimelinePersistentState
253259}
254260export interface BlueprintResultBaseline {
255261 timelineObjects : TimelineObjectCoreExt < TSR . TSRTimelineContent > [ ]
0 commit comments