/
TriggeredActions.ts
48 lines (34 loc) · 1.77 KB
/
TriggeredActions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { ITranslatableMessage, SomeAction, SomeBlueprintTrigger } from '@sofie-automation/blueprints-integration'
import { ShowStyleBaseId, TriggeredActionId } from '@sofie-automation/corelib/dist/dataModel/Ids'
import { ObjectWithOverrides } from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
export type DBBlueprintTrigger = SomeBlueprintTrigger
export interface UITriggeredActionsObj {
_id: TriggeredActionId
/** Rank number for visually ordering the hotkeys */
_rank: number
/** Optional label to specify what this triggered action is supposed to do, a comment basically */
name?: ITranslatableMessage | string
/** Id of parent ShowStyleBase. If null, this is a system-wide triggered action */
showStyleBaseId: ShowStyleBaseId | null
/** Triggers, with attached device info alongside */
triggers: Record<string, DBBlueprintTrigger>
/** A list of actions to execute */
actions: Record<string, SomeAction>
}
export interface DBTriggeredActions {
_id: TriggeredActionId
/** Rank number for visually ordering the hotkeys */
_rank: number
/** Optional label to specify what this triggered action is supposed to do, a comment basically */
name?: ITranslatableMessage | string
/** Id of parent ShowStyleBase. If null, this is a system-wide triggered action */
showStyleBaseId: ShowStyleBaseId | null
/** Identifier given by the blueprints for this document. Set to null if owned by the user */
blueprintUniqueId: string | null
/** Triggers, with attached device info alongside */
triggersWithOverrides: ObjectWithOverrides<Record<string, DBBlueprintTrigger>>
/** A list of actions to execute */
actionsWithOverrides: ObjectWithOverrides<Record<string, SomeAction>>
}
/** Note: Use DBTriggeredActions instead */
export type TriggeredActionsObj = DBTriggeredActions