@@ -48,6 +48,7 @@ import type { ExpectedPackage } from '../package'
48
48
import type { ABResolverConfiguration } from '../abPlayback'
49
49
import type { SofieIngestSegment } from '../ingest-types'
50
50
import { PackageStatusMessage } from '@sofie-automation/shared-lib/dist/packageStatusMessages'
51
+ import { BlueprintPlayoutPersistentStore } from '../context/playoutStore'
51
52
52
53
export { PackageStatusMessage }
53
54
@@ -111,7 +112,6 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
111
112
context : ISyncIngestUpdateToPartInstanceContext ,
112
113
existingPartInstance : BlueprintSyncIngestPartInstance ,
113
114
newData : BlueprintSyncIngestNewData ,
114
-
115
115
playoutStatus : 'previous' | 'current' | 'next'
116
116
) => void
117
117
@@ -130,12 +130,13 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
130
130
/** Execute an action defined by an IBlueprintActionManifest */
131
131
executeAction ?: (
132
132
context : IActionExecutionContext ,
133
+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
133
134
actionId : string ,
134
135
userData : ActionUserData ,
135
136
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
139
140
) => Promise < { validationErrors : any } | void >
140
141
141
142
/** Generate adlib piece from ingest data */
@@ -204,21 +205,27 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
204
205
* Called during a Take action.
205
206
* Allows for part modification or aborting the take.
206
207
*/
207
- onTake ?: ( context : IOnTakeContext ) => Promise < void >
208
+ onTake ?: (
209
+ context : IOnTakeContext ,
210
+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState >
211
+ ) => Promise < void >
208
212
/** Called after a Take action */
209
213
onPostTake ?: ( context : IPartEventContext ) => Promise < void >
210
214
211
215
/**
212
216
* Called when a part is set as Next, including right after a Take.
213
217
* Allows for part modification.
214
218
*/
215
- onSetAsNext ?: ( context : IOnSetAsNextContext ) => Promise < void >
219
+ onSetAsNext ?: (
220
+ context : IOnSetAsNextContext ,
221
+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState >
222
+ ) => Promise < void >
216
223
217
224
/** Called after the timeline has been generated, used to manipulate the timeline */
218
225
onTimelineGenerate ?: (
219
226
context : ITimelineEventContext ,
220
227
timeline : OnGenerateTimelineObj < TSR . TSRTimelineContent > [ ] ,
221
- previousPersistentState : TimelinePersistentState | undefined ,
228
+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
222
229
previousPartEndState : PartEndState | undefined ,
223
230
resolvedPieces : IBlueprintResolvedPieceInstance [ ]
224
231
) => Promise < BlueprintResultTimeline >
@@ -229,7 +236,7 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
229
236
/** 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) */
230
237
getEndStateForPart ?: (
231
238
context : IRundownContext ,
232
- previousPersistentState : TimelinePersistentState | undefined ,
239
+ playoutPersistentState : BlueprintPlayoutPersistentStore < TimelinePersistentState > ,
233
240
partInstance : IBlueprintPartInstance ,
234
241
resolvedPieces : IBlueprintResolvedPieceInstance [ ] ,
235
242
time : number
@@ -249,7 +256,6 @@ export interface ShowStyleBlueprintManifest<TRawConfig = IBlueprintConfig, TProc
249
256
250
257
export interface BlueprintResultTimeline {
251
258
timeline : OnGenerateTimelineObj < TSR . TSRTimelineContent > [ ]
252
- persistentState : TimelinePersistentState
253
259
}
254
260
export interface BlueprintResultBaseline {
255
261
timelineObjects : TimelineObjectCoreExt < TSR . TSRTimelineContent > [ ]
0 commit comments