1 | import { SdmContext } from "../context/SdmContext";
|
2 | import { Goals } from "../goal/Goals";
|
3 | import { PushListenerInvocation } from "../listener/PushListener";
|
4 | import { GoalSettingStructure } from "../mapping/GoalSetter";
|
5 | import { Mapping } from "../mapping/Mapping";
|
6 | import { Predicated } from "../mapping/PredicateMapping";
|
7 | import { GoalComponent } from "./GoalComponent";
|
8 | export interface GoalContribution<F> extends Mapping<F, GoalComponent>, Predicated<F> {
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export interface StatefulInvocation<S> extends SdmContext {
|
15 | facts?: S;
|
16 | }
|
17 | export declare type DefaultFacts = Record<string, any>;
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | export interface StatefulPushListenerInvocation<S = DefaultFacts> extends PushListenerInvocation, StatefulInvocation<S> {
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export declare function attachFacts<FACT, F extends SdmContext = PushListenerInvocation>(compute: (f: F) => Promise<FACT>): GoalContribution<F>;
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare function goalContributors<F extends SdmContext = StatefulPushListenerInvocation<any>>(contributor: GoalContribution<F>, ...contributors: Array<GoalContribution<F>>): Mapping<F, Goals>;
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | export declare function enrichGoalSetters<F extends SdmContext = StatefulPushListenerInvocation<any>>(mapping: GoalContribution<F>, contributor: GoalContribution<F>, ...contributors: Array<GoalContribution<F>>): Mapping<F, Goals> & GoalSettingStructure<F, Goals>;
|
51 |
|
\ | No newline at end of file |