# types/rate.types.ts

> 38 lines of code and 5 definitions.

Tree: Project Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/scripts#file-scripts-types-rate-types-ts
Source text: https://banes-lab.com/source/scripts/types/rate.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/scripts/types.md), after [types/nginx.types.ts](https://banes-lab.com/source/scripts/types/nginx.types.ts.md) and before [types/route.types.ts](https://banes-lab.com/source/scripts/types/route.types.ts.md).

## Definitions

- `RateRecord` (interface_declaration, line 1, exported)
- `PeerGroup` (interface_declaration, line 10, exported)
- `GroupSummary` (interface_declaration, line 16, exported)
- `RateOptions` (interface_declaration, line 27, exported)
- `RateReport` (interface_declaration, line 33, exported)

## Contained in

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

## Source

```typescript
export interface RateRecord {
    readonly id: string;
    readonly createdAt: number;
    readonly rate: number;
    readonly titles: readonly string[];
    readonly seniorities: readonly string[];
    readonly country: string;
}

export interface PeerGroup {
    readonly label: string;
    readonly titles: readonly string[];
    readonly seniorities: readonly string[];
}

export interface GroupSummary {
    readonly label: string;
    readonly count: number;
    readonly median: number;
    readonly p25: number;
    readonly p75: number;
    readonly p90: number;
    readonly highest: number;
    readonly below: number | null;
}

export interface RateOptions {
    readonly rate: number | null;
    readonly months: number;
    readonly out: string;
}

export interface RateReport {
    readonly fetchedOn: string;
    readonly statedUpdate: string;
    readonly statedCount: number | null;
    readonly records: readonly RateRecord[];
    readonly counted: readonly RateRecord[];
    readonly months: number;
    readonly rate: number | null;
    readonly groups: readonly GroupSummary[];
}
```
