import { IBlueprintMutatablePart, IBlueprintPart, IBlueprintPartInstance, IBlueprintPiece, IBlueprintPieceDB, IBlueprintPieceInstance, IBlueprintResolvedPieceInstance, IEventContext, IShowStyleUserContext } from '..'; import { BlueprintQuickLookInfo } from './quickLoopInfo'; /** * Context in which 'current' is the part currently on air, and 'next' is the partInstance being set as Next * This is similar to `IPartAndPieceActionContext`, but has more limits on what is allowed to be changed. */ export interface IOnSetAsNextContext extends IShowStyleUserContext, IEventContext { /** Information about the current loop, if there is one */ readonly quickLoopInfo: BlueprintQuickLookInfo | null; /** * Data fetching */ /** Get a PartInstance which can be modified */ getPartInstance(part: 'current' | 'next'): Promise; /** Get the PieceInstances for a modifiable PartInstance */ getPieceInstances(part: 'current' | 'next'): Promise; /** Get the resolved PieceInstances for a modifiable PartInstance */ getResolvedPieceInstances(part: 'current' | 'next'): Promise; /** Get the last active piece on given layer */ findLastPieceOnLayer(sourceLayerId: string | string[], options?: { excludeCurrentPart?: boolean; originalOnly?: boolean; piecePrivateDataFilter?: any; }): Promise; /** Get the previous scripted piece on a given layer, looking backwards from the current part. */ findLastScriptedPieceOnLayer(sourceLayerId: string | string[], options?: { excludeCurrentPart?: boolean; piecePrivateDataFilter?: any; }): Promise; /** Gets the PartInstance for a PieceInstance retrieved from findLastPieceOnLayer. This primarily allows for accessing metadata of the PartInstance */ getPartInstanceForPreviousPiece(piece: IBlueprintPieceInstance): Promise; /** Gets the Part for a Piece retrieved from findLastScriptedPieceOnLayer. This primarily allows for accessing metadata of the Part */ getPartForPreviousPiece(piece: IBlueprintPieceDB): Promise; /** * Creative actions */ /** Insert a pieceInstance. Returns id of new PieceInstance. Any timelineObjects will have their ids changed, so are not safe to reference from another piece */ insertPiece(part: 'next', piece: IBlueprintPiece): Promise; /** Update a piecesInstance from the partInstance being set as Next */ updatePieceInstance(pieceInstanceId: string, piece: Partial): Promise; /** Update a partInstance */ updatePartInstance(part: 'current' | 'next', props: Partial): Promise; /** * Destructive actions */ /** Remove piecesInstances by id. Returns ids of piecesInstances that were removed. */ removePieceInstances(part: 'current' | 'next', pieceInstanceIds: string[]): Promise; /** * Move the next part through the rundown. Can move by either a number of parts, or segments in either direction. * This will result in the `onSetAsNext` callback being called again following the current call, with the new PartInstance. * Multiple calls of this inside one call to `onSetAsNext` will replace earlier calls. * @returns Whether a new Part was found using the provided offset */ moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickLoop?: boolean): Promise; } //# sourceMappingURL=onSetAsNextContext.d.ts.map