File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,15 @@ interface EffectScope<EffectModel> extends ng.IScope {
33 [ x : string ] : unknown ;
44}
55
6+ type EffectTriggerResponse = {
7+ success : boolean ;
8+ //outputs: Record<string, unknown>;
9+ execution ?: {
10+ stop : boolean ;
11+ bubbleStop : boolean ;
12+ }
13+ }
14+
615export namespace Effects {
716 type TriggerType =
817 | "command"
@@ -14,6 +23,7 @@ export namespace Effects {
1423 | "timer"
1524 | "counter"
1625 | "preset"
26+ | "quick_action"
1727 | "manual" ;
1828
1929 type Trigger = {
@@ -69,7 +79,7 @@ export namespace Effects {
6979 [ x : string ] : unknown ;
7080 } ;
7181
72- type EffectType < EffectModel > = {
82+ type EffectType < EffectModel , OverlayData = unknown > = {
7383 definition : {
7484 id : string ;
7585 name : string ;
@@ -82,21 +92,23 @@ export namespace Effects {
8292 optionsTemplate : string ;
8393 optionsController ?: (
8494 $scope : EffectScope < EffectModel > ,
85- ...args : any [ ]
95+ ...args : unknown [ ]
8696 ) => void ;
8797 optionsValidator ?: ( effect : EffectModel ) => string [ ] ;
8898 onTriggerEvent : ( event : {
8999 effect : EffectModel ;
90100 trigger : Trigger ;
91- } ) => Promise < boolean > ;
101+ sendDataToOverlay : ( data : OverlayData , overlayInstance ?: string ) => void
102+ } ) => Promise < void | boolean | EffectTriggerResponse > ;
92103 overlayExtension ?: {
93- dependencies : {
94- css : string [ ] ;
95- js : string [ ] ;
104+ dependencies ?: {
105+ globalStyles ?: string ;
106+ css ?: string [ ] ;
107+ js ?: string [ ] ;
96108 } ;
97109 event : {
98110 name : string ;
99- onOverlayEvent : ( data : any ) => void ;
111+ onOverlayEvent : ( data : OverlayData ) => void ;
100112 } ;
101113 } ;
102114 } ;
You can’t perform that action at this time.
0 commit comments