# types/record.types.ts

> 39 lines of code and 5 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-types-record-types-ts
Source text: https://banes-lab.com/source/build-scripts/types/record.types.ts.txt

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

## Definitions

- `RecordSources` (interface_declaration, line 6, exported)
- `RecordData` (interface_declaration, line 16, exported)
- `RecordPageInput` (interface_declaration, line 26, exported)
- `RecordLeaf` (interface_declaration, line 37, exported)
- `RecordSubjectCounts` (interface_declaration, line 41, exported)

## Contained in

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

## Source

```typescript
import type { Identity, Leaf, Link, Linker, Placed, PlacementOf, Relation } from "#types/catalog.types";
import type { ReferenceRecord, ReferenceRelation } from "@banes-lab/web/types/reference.types.js";
import type { GovlabContext } from "@govlab/context";
import type { RecordSubject } from "@banes-lab/web/types/page.types.js";

export interface RecordSources {
    readonly context: GovlabContext;
    readonly evidence: (ref: string) => readonly Link[];
    readonly inbound: (ref: string) => readonly ReferenceRelation[];
    readonly linkedBy: (ref: string) => readonly Link[];
    readonly placement: PlacementOf;
    readonly linker: Linker;
    readonly tabLabel: (path: string) => string;
}

export interface RecordData extends Placed {
    readonly href: string | null;
    readonly kind: string;
    readonly layer: Link | null;
    readonly name: string;
    readonly ref: string;
    readonly relations: readonly Relation[];
    readonly summary: string | null;
}

export interface RecordPageInput {
    readonly aliases: readonly string[];
    readonly data: RecordData;
    readonly identity: Identity;
    readonly layer: Link | null;
    readonly record: ReferenceRecord;
    readonly relations: readonly Relation[];
    readonly site: string;
    readonly tabLabel: (path: string) => string;
}

export interface RecordLeaf extends Leaf {
    readonly page: RecordSubject;
}

export interface RecordSubjectCounts {
    readonly descriptions: ReadonlyMap<string, number>;
    readonly titles: ReadonlyMap<string, number>;
}
```
