Skip to content

Commit bc84346

Browse files
Merge pull request #2 from makegov/issue-1327/vehicles-idvs
[SDK: Node] Add Vehicles endpoints/interface
2 parents 0b1792e + 52cd0a2 commit bc84346

10 files changed

Lines changed: 1404 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ This project follows [Semantic Versioning](https://semver.org/).
88

99
### Added
1010

11+
- Vehicles endpoints: `listVehicles`, `getVehicle`, and `listVehicleAwardees` (supports shaping + flattening). (refs `makegov/tango#1327`)
12+
- IDV endpoints: `listIdvs`, `getIdv`, `listIdvAwards`, `listIdvChildIdvs`, `listIdvTransactions`, `getIdvSummary`, `listIdvSummaryAwards`. (refs `makegov/tango#1327`)
1113
- Webhooks v2 client support: event type discovery, subscription CRUD, endpoint management, test delivery, and sample payload helpers. (refs `makegov/tango#1275`)
1214

1315
### Changed
1416

1517
- HTTP client now supports PATCH/PUT/DELETE for non-GET endpoints.
18+
- `joiner` is now respected when unflattening `flat=true` responses on supported endpoints.
1619

1720
## [0.1.0] - 2025-11-21
1821

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A modern Node.js SDK for the [Tango API](https://tango.makegov.com), featuring d
88

99
- **Dynamic Response Shaping** – Ask Tango for exactly the fields you want using a simple shape syntax.
1010
- **Type-Safe by Design** – Shape strings are validated against Tango schemas and mapped to generated TypeScript types.
11-
- **Comprehensive API Coverage** – Agencies, business types, entities, contracts, forecasts, opportunities, notices, grants, and webhooks.
11+
- **Comprehensive API Coverage** – Agencies, business types, entities, contracts, vehicles, IDVs, forecasts, opportunities, notices, grants, and webhooks.
1212
- **Flexible Data Access** – Plain JavaScript objects backed by runtime validation and parsing, materialized via the dynamic model pipeline.
1313
- **Modern Node** – Built for Node 18+ with native `fetch` and ESM-first design.
1414
- **Tested Against the Real API** – Integration tests (mirroring the Python SDK) keep behavior aligned.

docs/API_REFERENCE.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,106 @@ limit: number
115115

116116
---
117117

118+
## Vehicles
119+
120+
Vehicles provide a solicitation-centric grouping of related IDVs.
121+
122+
### `listVehicles(options)`
123+
124+
```ts
125+
const resp = await client.listVehicles({
126+
search: "GSA schedule",
127+
shape: ShapeConfig.VEHICLES_MINIMAL,
128+
page: 1,
129+
limit: 25,
130+
});
131+
```
132+
133+
Supported parameters:
134+
135+
- `search` (vehicle-level full-text search)
136+
- `page`, `limit` (max 100)
137+
- `shape`, `flat`, `flatLists`
138+
139+
### `getVehicle(uuid, options?)`
140+
141+
```ts
142+
const vehicle = await client.getVehicle("00000000-0000-0000-0000-000000000001", {
143+
shape: ShapeConfig.VEHICLES_COMPREHENSIVE,
144+
});
145+
```
146+
147+
Notes:
148+
149+
- On vehicle detail, `search` filters expanded `awardees(...)` when included in your `shape` (it does not filter the vehicle itself).
150+
- When using `flat: true`, you can override the joiner with `joiner` (default `"."`).
151+
152+
### `listVehicleAwardees(uuid, options?)`
153+
154+
```ts
155+
const awardees = await client.listVehicleAwardees("00000000-0000-0000-0000-000000000001", {
156+
shape: ShapeConfig.VEHICLE_AWARDEES_MINIMAL,
157+
});
158+
```
159+
160+
---
161+
162+
## IDVs
163+
164+
IDVs (indefinite delivery vehicles) are the parent “vehicle award” records that can have child awards/orders under them.
165+
166+
### `listIdvs(options)`
167+
168+
```ts
169+
const idvs = await client.listIdvs({
170+
limit: 25,
171+
cursor: null,
172+
shape: ShapeConfig.IDVS_MINIMAL,
173+
awarding_agency: "4700",
174+
});
175+
```
176+
177+
Notes:
178+
179+
- This endpoint uses **keyset pagination** (`cursor` + `limit`) rather than `page`.
180+
181+
### `getIdv(key, options?)`
182+
183+
```ts
184+
const idv = await client.getIdv("SOME_IDV_KEY", {
185+
shape: ShapeConfig.IDVS_COMPREHENSIVE,
186+
});
187+
```
188+
189+
### `listIdvAwards(key, options?)`
190+
191+
Lists child awards (contracts) under an IDV.
192+
193+
```ts
194+
const awards = await client.listIdvAwards("SOME_IDV_KEY", { limit: 25 });
195+
```
196+
197+
### `listIdvChildIdvs({ key, ...options })`
198+
199+
```ts
200+
const children = await client.listIdvChildIdvs({ key: "SOME_IDV_KEY", limit: 25 });
201+
```
202+
203+
### `listIdvTransactions(key, options?)`
204+
205+
```ts
206+
const tx = await client.listIdvTransactions("SOME_IDV_KEY", { limit: 100 });
207+
```
208+
209+
### `getIdvSummary(identifier)` / `listIdvSummaryAwards(identifier, options?)`
210+
211+
```ts
212+
const summary = await client.getIdvSummary("SOLICITATION_IDENTIFIER");
213+
const awards = await client.listIdvSummaryAwards("SOLICITATION_IDENTIFIER", { limit: 25 });
214+
```
215+
216+
---
217+
118218
## Entities
119219

120220
### `listEntities(options)`

0 commit comments

Comments
 (0)