# types/operation.types.ts

> 20 lines of code and 4 definitions.

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

Listed in [types](https://banes-lab.com/api/source/patterns/types.md), after [types/information.types.ts](https://banes-lab.com/source/patterns/types/information.types.ts.md) and before [types/package.types.ts](https://banes-lab.com/source/patterns/types/package.types.ts.md).

## Definitions

- `Intervention` (interface_declaration, line 3, exported)
- `InterventionResult` (interface_declaration, line 10, exported)
- `BridgeConfig` (interface_declaration, line 16, exported)
- `InterventionBridge` (interface_declaration, line 21, exported)

## Contained in

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

## Source

```typescript
import type { Finding } from "#types/finding.types";

export interface Intervention {
    field: string;
    finding: string;
    action: string;
    rationale: string;
}

export interface InterventionResult {
    intervention: Intervention;
    applied: boolean;
    detail: string;
}

export interface BridgeConfig {
    propose?: (finding: Finding) => Intervention | null;
    apply?: (intervention: Intervention) => Promise<InterventionResult>;
}

export interface InterventionBridge {
    propose: (findings: readonly Finding[]) => Intervention[];
    apply: (interventions: readonly Intervention[]) => Promise<InterventionResult[]>;
}
```
