Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ dist/
coverage/
.build/
.tmp/
.npm-cache/
node_modules/

# Editor / OS
.DS_Store
Expand All @@ -26,3 +28,4 @@ coverage/

# Other
ROADMAP.md
/yoni
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to `@makegov/tango-node` will be documented in this file.

This project follows [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Added
- Vehicles endpoints: `listVehicles`, `getVehicle`, and `listVehicleAwardees` (supports shaping + flattening). (refs `makegov/tango#1327`)
- IDV endpoints: `listIdvs`, `getIdv`, `listIdvAwards`, `listIdvChildIdvs`, `listIdvTransactions`, `getIdvSummary`, `listIdvSummaryAwards`. (refs `makegov/tango#1327`)

### Changed
- `joiner` is now respected when unflattening `flat=true` responses on supported endpoints.

## [0.1.0] - 2025-11-21

- Initial Node.js port of the Tango Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A modern Node.js SDK for the [Tango API](https://tango.makegov.com), featuring d

- **Dynamic Response Shaping** – Ask Tango for exactly the fields you want using a simple shape syntax.
- **Type-Safe by Design** – Shape strings are validated against Tango schemas and mapped to generated TypeScript types.
- **Comprehensive API Coverage** – Agencies, business types, entities, contracts, forecasts, opportunities, notices, and grants.
- **Comprehensive API Coverage** – Agencies, business types, entities, contracts, vehicles, forecasts, opportunities, notices, and grants.
- **Flexible Data Access** – Plain JavaScript objects backed by runtime validation and parsing, materialized via the dynamic model pipeline.
- **Modern Node** – Built for Node 18+ with native `fetch` and ESM-first design.
- **Tested Against the Real API** – Integration tests (mirroring the Python SDK) keep behavior aligned.
Expand Down
100 changes: 100 additions & 0 deletions docs/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,106 @@ limit: number

---

## Vehicles

Vehicles provide a solicitation-centric grouping of related IDVs.

### `listVehicles(options)`

```ts
const resp = await client.listVehicles({
search: "GSA schedule",
shape: ShapeConfig.VEHICLES_MINIMAL,
page: 1,
limit: 25,
});
```

Supported parameters:

- `search` (vehicle-level full-text search)
- `page`, `limit` (max 100)
- `shape`, `flat`, `flatLists`

### `getVehicle(uuid, options?)`

```ts
const vehicle = await client.getVehicle("00000000-0000-0000-0000-000000000001", {
shape: ShapeConfig.VEHICLES_COMPREHENSIVE,
});
```

Notes:

- On vehicle detail, `search` filters expanded `awardees(...)` when included in your `shape` (it does not filter the vehicle itself).
- When using `flat: true`, you can override the joiner with `joiner` (default `"."`).

### `listVehicleAwardees(uuid, options?)`

```ts
const awardees = await client.listVehicleAwardees("00000000-0000-0000-0000-000000000001", {
shape: ShapeConfig.VEHICLE_AWARDEES_MINIMAL,
});
```

---

## IDVs

IDVs (indefinite delivery vehicles) are the parent “vehicle award” records that can have child awards/orders under them.

### `listIdvs(options)`

```ts
const idvs = await client.listIdvs({
limit: 25,
cursor: null,
shape: ShapeConfig.IDVS_MINIMAL,
awarding_agency: "4700",
});
```

Notes:

- This endpoint uses **keyset pagination** (`cursor` + `limit`) rather than `page`.

### `getIdv(key, options?)`

```ts
const idv = await client.getIdv("SOME_IDV_KEY", {
shape: ShapeConfig.IDVS_COMPREHENSIVE,
});
```

### `listIdvAwards(key, options?)`

Lists child awards (contracts) under an IDV.

```ts
const awards = await client.listIdvAwards("SOME_IDV_KEY", { limit: 25 });
```

### `listIdvChildIdvs({ key, ...options })`

```ts
const children = await client.listIdvChildIdvs({ key: "SOME_IDV_KEY", limit: 25 });
```

### `listIdvTransactions(key, options?)`

```ts
const tx = await client.listIdvTransactions("SOME_IDV_KEY", { limit: 100 });
```

### `getIdvSummary(identifier)` / `listIdvSummaryAwards(identifier, options?)`

```ts
const summary = await client.getIdvSummary("SOLICITATION_IDENTIFIER");
const awards = await client.listIdvSummaryAwards("SOLICITATION_IDENTIFIER", { limit: 25 });
```

---

## Entities

### `listEntities(options)`
Expand Down
Loading