# types/system.types.ts

> 65 lines of code and 12 definitions.

Tree: GovLab Docs
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/docs#file-docs-types-system-types-ts
Source text: https://banes-lab.com/source/docs/types/system.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/docs/types.md), after [types/reference.types.ts](https://banes-lab.com/source/docs/types/reference.types.ts.md).

## Definitions

- `EntityRelationKind` (type_alias_declaration, line 1, exported)
- `SystemComponent` (interface_declaration, line 3, exported)
- `TrustBoundary` (interface_declaration, line 10, exported)
- `EntityField` (interface_declaration, line 16, exported)
- `Entity` (interface_declaration, line 20, exported)
- `EntityRelation` (interface_declaration, line 26, exported)
- `DeploymentService` (interface_declaration, line 33, exported)
- `DispatchEdge` (interface_declaration, line 40, exported)
- `MessageFlow` (interface_declaration, line 46, exported)
- `SecurityPoint` (interface_declaration, line 53, exported)
- `SystemModel` (interface_declaration, line 60, exported)
- `SystemSection` (interface_declaration, line 73, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/docs/folder-docs-types.md)

## Source

```typescript
export type EntityRelationKind = "aggregation" | "composition" | "dependency" | "realization";

export interface SystemComponent {
    id: string;
    label: string;
    kind?: string;
    boundary?: string;
}

export interface TrustBoundary {
    id: string;
    label: string;
    components: string[];
}

export interface EntityField {
    name: string;
}

export interface Entity {
    id: string;
    label: string;
    fields: EntityField[];
}

export interface EntityRelation {
    from: string;
    to: string;
    kind: EntityRelationKind;
    label?: string | undefined;
}

export interface DeploymentService {
    id: string;
    label: string;
    kind?: string;
    dependsOn?: string[];
}

export interface DispatchEdge {
    table: string;
    key: string;
    target: string;
}

export interface MessageFlow {
    from: string;
    to: string;
    name: string;
    direction?: string;
}

export interface SecurityPoint {
    id: string;
    label: string;
    decision: string;
    enforcedBy?: string;
}

export interface SystemModel {
    name: string;
    components?: SystemComponent[];
    trustBoundaries?: TrustBoundary[];
    entities?: Entity[];
    entityRelations?: EntityRelation[];
    deployment?: DeploymentService[];
    dispatch?: DispatchEdge[];
    messages?: MessageFlow[];
    security?: SecurityPoint[];
    runtimeDeferred?: readonly string[];
}

export interface SystemSection {
    heading: string;
    render: (model: SystemModel) => string | null;
}
```
