diff --git a/packages/mermaid/src/diagrams/sequence/types.ts b/packages/mermaid/src/diagrams/sequence/types.ts new file mode 100644 index 0000000000..83ef0fc67a --- /dev/null +++ b/packages/mermaid/src/diagrams/sequence/types.ts @@ -0,0 +1,85 @@ +export interface Box { + name: string; + wrap: boolean; + fill: string; + actorKeys: string[]; +} + +export interface Actor { + box?: Box; + name: string; + description: string; + wrap: boolean; + prevActor?: string; + nextActor?: string; + links: Record; + properties: Record; + actorCnt: number | null; + rectData: unknown; + type: string; +} + +export interface Message { + from?: { actor: string }; + to?: { actor: string }; + message: + | string + | { + start: number; + step: number; + visible: boolean; + }; + wrap: boolean; + answer?: unknown; + type?: number; + activate?: boolean; + placement?: string; +} + +export interface AddMessageParams { + from: string; + to: string; + msg: string; + signalType: number; + type: + | 'addMessage' + | 'sequenceIndex' + | 'addParticipant' + | 'createParticipant' + | 'destroyParticipant' + | 'activeStart' + | 'activeEnd' + | 'addNote' + | 'addLinks' + | 'addALink' + | 'addProperties' + | 'addDetails' + | 'boxStart' + | 'boxEnd' + | 'loopStart' + | 'loopEnd' + | 'rectStart' + | 'rectEnd' + | 'optStart' + | 'optEnd' + | 'altStart' + | 'else' + | 'altEnd' + | 'setAccTitle' + | 'parStart' + | 'parAnd' + | 'parEnd' + | 'and' + | 'criticalStart' + | 'criticalOption' + | 'option' + | 'criticalEnd' + | 'breakStart' + | 'breakEnd' + | 'parOverStart' + | 'parOverEnd' + | 'parOverAnd' + | 'parOverEnd'; + + activate: boolean; +}