@cratis/event-models 0.269.2 → 0.270.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,5 +28,7 @@ export interface SpecificationEditing {
|
|
|
28
28
|
onThenNoEventsRemoved?: (sliceId: Guid, specificationId: Guid) => void;
|
|
29
29
|
onWhenEventRedelivered?: (sliceId: Guid, specificationId: Guid, givenEventId: Guid) => void;
|
|
30
30
|
onWhenRedeliveryRemoved?: (sliceId: Guid, specificationId: Guid) => void;
|
|
31
|
+
onWhenEventValuesSet?: (sliceId: Guid, specificationId: Guid, eventId: Guid, name: string, values: Record<string, unknown>, eventSourceId?: string) => void;
|
|
32
|
+
onWhenEventRemoved?: (sliceId: Guid, specificationId: Guid) => void;
|
|
31
33
|
onSpecificationItemOpened?: (item: SpecificationItemToOpen) => void;
|
|
32
34
|
}
|
|
@@ -7,8 +7,10 @@ export * from './specificationCollectionState';
|
|
|
7
7
|
export * from './SpecificationSection';
|
|
8
8
|
export * from './GivenSection';
|
|
9
9
|
export * from './OutcomeLines';
|
|
10
|
+
export * from './SpecificationDetails';
|
|
10
11
|
export * from './WhenSection';
|
|
11
12
|
export * from './ThenSection';
|
|
12
13
|
export * from './allowedThenKinds';
|
|
13
14
|
export * from './SpecificationAddGroup';
|
|
14
15
|
export * from './specificationValuesMemory';
|
|
16
|
+
export * from './whenEventEditing';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { SpecificationWhenEvent } from '../Model';
|
|
3
|
+
export interface EnteredWhenEvent {
|
|
4
|
+
from: string;
|
|
5
|
+
eventId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
values?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare const whenEventKey = "when-event";
|
|
10
|
+
export declare const appendedEventKey: (event: SpecificationWhenEvent | undefined) => string;
|
|
11
|
+
export declare const appendsEvent: (appended: Pick<SpecificationWhenEvent, 'eventId' | 'name'> | undefined, event: {
|
|
12
|
+
id: Guid;
|
|
13
|
+
name: string;
|
|
14
|
+
}) => boolean;
|
|
15
|
+
export declare const shownWhenEvent: (incoming: SpecificationWhenEvent | undefined, entered: EnteredWhenEvent | undefined) => SpecificationWhenEvent | undefined;
|
|
16
|
+
export declare const statesWhenEvent: (entered: Readonly<Record<string, unknown>>, alreadyAppended: boolean) => boolean;
|