wenmar-open 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -62,7 +62,8 @@ export class WenmarOpen {
62
62
  details: { field: "vins", max: MAX_BATCH, received: vins.length },
63
63
  });
64
64
  }
65
- return this.#request("POST", "/v1/vin/batch", { vins }, options);
65
+ const path = `/v1/vin/batch${queryString({ include: options.include })}`;
66
+ return this.#request("POST", path, { vins }, options);
66
67
  }
67
68
  /** Model years, newest first. */
68
69
  async years(query = {}, options = {}) {
@@ -96,6 +97,237 @@ export class WenmarOpen {
96
97
  async vehicle(id, options = {}) {
97
98
  return this.#request("GET", `/v1/vehicles/${segment("id", id)}`, undefined, options);
98
99
  }
100
+ /**
101
+ * NHTSA's crash test ratings for a model year, by its id such as
102
+ * `2018_ford_f-150`. NHTSA rates by body style and drive, so `ratings`
103
+ * often has several entries: each names the vehicle it is for.
104
+ */
105
+ async safety(id, options = {}) {
106
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/safety`, undefined, options);
107
+ }
108
+ /**
109
+ * What owners reported to NHTSA about a model year, as counts by
110
+ * component. These are owners' reports: not verified, and not a rate.
111
+ */
112
+ async complaints(id, options = {}) {
113
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/complaints`, undefined, options);
114
+ }
115
+ /**
116
+ * One generic trouble code, such as `P0420`, described in this project's
117
+ * own words. A manufacturer-specific code has no description: the call
118
+ * fails with `not_found`.
119
+ */
120
+ async code(code, options = {}) {
121
+ return this.#request("GET", `/v1/codes/${segment("code", code)}`, undefined, options);
122
+ }
123
+ /** The trouble codes that are described, by code, narrowed by text or system. */
124
+ async codes(query = {}, options = {}) {
125
+ return this.#request("GET", `/v1/codes${queryString(query)}`, undefined, options);
126
+ }
127
+ /**
128
+ * A trouble code on one model year: its description, the bulletins of
129
+ * that model year that name it, and the bulletins and recalls about the
130
+ * same components. Any code answers, a manufacturer-specific one too.
131
+ */
132
+ async vehicleCode(id, code, options = {}) {
133
+ const path = `/v1/vehicles/${segment("id", id)}/codes/${segment("code", code)}`;
134
+ return this.#request("GET", path, undefined, options);
135
+ }
136
+ /** The repair jobs a labour estimate can be about. A job's id never changes. */
137
+ async jobs(options = {}) {
138
+ return this.#request("GET", "/v1/jobs", undefined, options);
139
+ }
140
+ /** One repair job: what it covers, and what it typically takes by class of vehicle. */
141
+ async job(job, options = {}) {
142
+ return this.#request("GET", `/v1/jobs/${segment("job", job)}`, undefined, options);
143
+ }
144
+ /**
145
+ * Wenmar's labour estimates for a model year, or for one `job` of it:
146
+ * for each job, the hours of the narrowest scope that has a figure, and
147
+ * which scope that was. An estimate, not a quote. Credit it as
148
+ * `attribution` says.
149
+ */
150
+ async labor(id, job, options = {}) {
151
+ const narrowed = job === undefined ? "" : `/${segment("job", job)}`;
152
+ const path = `/v1/vehicles/${segment("id", id)}/labor${narrowed}`;
153
+ return this.#request("GET", path, undefined, options);
154
+ }
155
+ /** Labour estimates for the vehicle a VIN decodes to, or for one `job` of it. */
156
+ async vinLabor(vin, job, options = {}) {
157
+ const narrowed = job === undefined ? "" : `/${segment("job", job)}`;
158
+ const path = `/v1/vin/${segment("vin", vin)}/labor${narrowed}${queryString({ year: options.year })}`;
159
+ return this.#request("GET", path, undefined, options);
160
+ }
161
+ /**
162
+ * The income tax, CPP, CPP2 and EI on one regular pay in Ontario, by
163
+ * CRA's T4127 formulas, with the net pay, the employer's share and every
164
+ * factor used. Claims left out are the basic personal amounts (claim
165
+ * code 1). An estimate: the employer remains liable to CRA; check with
166
+ * CRA's PDOC at `pdoc_url`. Not available offline.
167
+ */
168
+ async payrollDeductions(query, options = {}) {
169
+ return this.#request("GET", `/v1/payroll/deductions${queryString(query)}`, undefined, options);
170
+ }
171
+ /** One make by its id, name or alias, such as `honda`, with the maker's own links. */
172
+ async make(make, options = {}) {
173
+ return this.#request("GET", `/v1/makes/${segment("make", make)}`, undefined, options);
174
+ }
175
+ /**
176
+ * Recalls that may apply to a model year, by its id such as
177
+ * `2018_ford_f-150`. The list is for the year, make and model: it is not
178
+ * a lookup by VIN, and `lookup` says where one vehicle can be checked.
179
+ */
180
+ async recalls(id, query = {}, options = {}) {
181
+ const path = `/v1/vehicles/${segment("id", id)}/recalls${queryString(query)}`;
182
+ return this.#request("GET", path, undefined, options);
183
+ }
184
+ /**
185
+ * Recalls that may apply to the model year a VIN decodes to. The VIN only
186
+ * names the model year: no public data says a recall applies to one VIN.
187
+ */
188
+ async vinRecalls(vin, query = {}, options = {}) {
189
+ const path = `/v1/vin/${segment("vin", vin)}/recalls${queryString(query)}`;
190
+ return this.#request("GET", path, undefined, options);
191
+ }
192
+ /** One recall campaign: `source` is `nhtsa` or `tc`. */
193
+ async recall(source, campaign, options = {}) {
194
+ const path = `/v1/recalls/${segment("source", source)}/${segment("campaign", campaign)}`;
195
+ return this.#request("GET", path, undefined, options);
196
+ }
197
+ /** Recall campaigns, newest first, narrowed by what is given. */
198
+ async searchRecalls(query = {}, options = {}) {
199
+ return this.#request("GET", `/v1/recalls${queryString(query)}`, undefined, options);
200
+ }
201
+ /**
202
+ * Manufacturer communications that list a model year: service bulletins,
203
+ * service campaigns, warranty extensions and over-the-air updates, one
204
+ * page, newest first. `counts` says how many there are of each kind.
205
+ */
206
+ async bulletins(id, query = {}, options = {}) {
207
+ const path = `/v1/vehicles/${segment("id", id)}/bulletins${queryString(query)}`;
208
+ return this.#request("GET", path, undefined, options);
209
+ }
210
+ /** Manufacturer communications for the model year a VIN decodes to. */
211
+ async vinBulletins(vin, query = {}, options = {}) {
212
+ const path = `/v1/vin/${segment("vin", vin)}/bulletins${queryString(query)}`;
213
+ return this.#request("GET", path, undefined, options);
214
+ }
215
+ /** One manufacturer communication, by NHTSA's id number. */
216
+ async bulletin(nhtsaId, options = {}) {
217
+ const path = `/v1/bulletins/${segment("nhtsa_id", String(nhtsaId))}`;
218
+ return this.#request("GET", path, undefined, options);
219
+ }
220
+ /** Manufacturer communications, newest first, narrowed by what is given. */
221
+ async searchBulletins(query = {}, options = {}) {
222
+ return this.#request("GET", `/v1/bulletins${queryString(query)}`, undefined, options);
223
+ }
224
+ /**
225
+ * Fuel consumption ratings of a model year, from EPA and Natural Resources
226
+ * Canada. Each rating says how far it was matched in `confidence`, and
227
+ * names a catalog engine only when the match settled one.
228
+ */
229
+ async fuel(id, query = {}, options = {}) {
230
+ const path = `/v1/vehicles/${segment("id", id)}/fuel${queryString(query)}`;
231
+ return this.#request("GET", path, undefined, options);
232
+ }
233
+ /**
234
+ * Fuel consumption ratings for the vehicle a VIN decodes to: narrowed to
235
+ * its engine when `engine_settled` is `true`, the model year's otherwise.
236
+ */
237
+ async vinFuel(vin, query = {}, options = {}) {
238
+ const path = `/v1/vin/${segment("vin", vin)}/fuel${queryString(query)}`;
239
+ return this.#request("GET", path, undefined, options);
240
+ }
241
+ /** Specifications of a model year from EPA's files, one entry per rating. */
242
+ async specs(id, options = {}) {
243
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/specs`, undefined, options);
244
+ }
245
+ /** Specifications for the vehicle a VIN decodes to. */
246
+ async vinSpecs(vin, query = {}, options = {}) {
247
+ const path = `/v1/vin/${segment("vin", vin)}/specs${queryString(query)}`;
248
+ return this.#request("GET", path, undefined, options);
249
+ }
250
+ /**
251
+ * Fluids of a model year: the engine oil viscosity grade the maker
252
+ * certified each engine with, per EPA, and the records a person read from
253
+ * the maker's own documents, each with its source and the day it was checked.
254
+ */
255
+ async fluids(id, options = {}) {
256
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/fluids`, undefined, options);
257
+ }
258
+ /** Fluids for the vehicle a VIN decodes to: one engine's when the decode settles it. */
259
+ async vinFluids(vin, query = {}, options = {}) {
260
+ const path = `/v1/vin/${segment("vin", vin)}/fluids${queryString(query)}`;
261
+ return this.#request("GET", path, undefined, options);
262
+ }
263
+ /**
264
+ * Original-equipment tire fitments of a model year, read by a person from
265
+ * the door placard or the owner's manual. Every size on record is listed
266
+ * with the trims it covers; none is picked.
267
+ */
268
+ async tires(id, options = {}) {
269
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/tires`, undefined, options);
270
+ }
271
+ /** Tire fitments of the model year a VIN decodes to. Never narrowed: a VIN does not name the wheels. */
272
+ async vinTires(vin, query = {}, options = {}) {
273
+ const path = `/v1/vin/${segment("vin", vin)}/tires${queryString(query)}`;
274
+ return this.#request("GET", path, undefined, options);
275
+ }
276
+ /**
277
+ * The parts-ordering card for a VIN: what a parts counter asks for, each
278
+ * line with where it came from. `text` is the card ready to paste.
279
+ */
280
+ async partsCard(vin, query = {}, options = {}) {
281
+ const path = `/v1/vin/${segment("vin", vin)}/parts-card${queryString(query)}`;
282
+ return this.#request("GET", path, undefined, options);
283
+ }
284
+ /**
285
+ * Everything held for a model year in one answer, by its id such as
286
+ * `2018_ford_f-150`. A block the server has no data for is `null`.
287
+ * `recalls` counts the campaigns that may apply to the year, make and
288
+ * model: it is not a lookup by VIN.
289
+ */
290
+ async overview(id, options = {}) {
291
+ return this.#request("GET", `/v1/vehicles/${segment("id", id)}/overview`, undefined, options);
292
+ }
293
+ /**
294
+ * The overview of the model year a VIN decodes to, with `decode`. The VIN
295
+ * only names the model year: no public data says a recall applies to one
296
+ * VIN.
297
+ */
298
+ async vinOverview(vin, options = {}) {
299
+ const path = `/v1/vin/${segment("vin", vin)}/overview${queryString({ year: options.year })}`;
300
+ return this.#request("GET", path, undefined, options);
301
+ }
302
+ /**
303
+ * Every model year of one model, newest first, each with its vehicle id
304
+ * and the number of recall campaigns that may apply to it.
305
+ */
306
+ async modelYears(make, model, options = {}) {
307
+ const path = `/v1/models/${segment("make", make)}/${segment("model", model)}`;
308
+ return this.#request("GET", path, undefined, options);
309
+ }
310
+ /**
311
+ * Recall campaigns reported on or after `since` (a day such as
312
+ * `2026-09-01`), newest first, each with the vehicles it may apply to.
313
+ */
314
+ async recentRecalls(query, options = {}) {
315
+ return this.#request("GET", `/v1/recalls/recent${queryString(query)}`, undefined, options);
316
+ }
317
+ /**
318
+ * The open NHTSA investigations that list a model year, by its id such as
319
+ * `2019_ram_1500`; `{ status: "all" }` adds the closed ones. An
320
+ * investigation is not a finding that a defect exists: show `note`.
321
+ */
322
+ async investigations(id, query = {}, options = {}) {
323
+ const path = `/v1/vehicles/${segment("id", id)}/investigations${queryString(query)}`;
324
+ return this.#request("GET", path, undefined, options);
325
+ }
326
+ /** The NHTSA investigations that led to a recall campaign: `source` is `nhtsa` or `tc`. */
327
+ async recallInvestigations(source, campaign, options = {}) {
328
+ const path = `/v1/recalls/${segment("source", source)}/${segment("campaign", campaign)}/investigations`;
329
+ return this.#request("GET", path, undefined, options);
330
+ }
99
331
  /** The data version, the vPIC release it came from, and the build time. */
100
332
  async meta(options = {}) {
101
333
  return this.#request("GET", "/v1/meta", undefined, options);
package/dist/errors.d.ts CHANGED
@@ -1,5 +1,12 @@
1
- /** The codes the API answers with. */
2
- export type ApiErrorCode = "invalid_vin" | "validation_failed" | "not_found" | "method_not_allowed" | "payload_too_large" | "uri_too_long" | "rate_limited" | "unavailable" | "internal_error";
1
+ /**
2
+ * The codes the API answers with.
3
+ *
4
+ * `dataset_unavailable` is a `404` from a method that reads a dataset the
5
+ * server does not hold, such as recalls: `details.dataset` names it, as
6
+ * `recalls_us` or `recalls_ca`. It is not `not_found`: the vehicle may well
7
+ * exist, and another server, or the same one later, may hold the data.
8
+ */
9
+ export type ApiErrorCode = "invalid_vin" | "validation_failed" | "not_found" | "dataset_unavailable" | "method_not_allowed" | "payload_too_large" | "uri_too_long" | "rate_limited" | "unavailable" | "internal_error";
3
10
  /**
4
11
  * The codes this client adds for failures that never reached the API or
5
12
  * did not come from it.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { MAX_BATCH, isBatchError } from "./batch.js";
2
2
  export { DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, WenmarOpen } from "./client.js";
3
- export type { ClientOptions, DecodeOptions, FetchInit, FetchLike, FetchResponse, RequestOptions, } from "./client.js";
3
+ export type { BatchOptions, ClientOptions, DecodeOptions, FetchInit, FetchLike, FetchResponse, RequestOptions, } from "./client.js";
4
4
  export { WenmarOpenError } from "./errors.js";
5
5
  export type { ApiErrorCode, ClientErrorCode, ErrorCode, OfflineErrorCode, WenmarOpenErrorInit, } from "./errors.js";
6
- export type { BatchItem, CheckDigit, Engine, EngineOption, EnginesQuery, Entry, ErrorBody, Make, MakesQuery, Manufacturer, Meta, Model, ModelsQuery, Plant, Safety, SearchQuery, Selection, Submodel, SubmodelsQuery, VinDecode, Warning, YearsQuery, } from "./types.js";
6
+ export type { BatchItem, Bulletin, BulletinCounts, BulletinDetail, BulletinDocument, BulletinFilterQuery, BulletinList, BulletinSearchQuery, Code, CodeLink, CodeList, CodeSearchQuery, CheckDigit, Engine, EngineOil, FluidRecord, EngineOption, EnginesQuery, Entry, ErrorBody, FuelRating, Investigation, Make, MakeDetail, MakesQuery, Manufacturer, Meta, Model, ModelYears, ModelsQuery, Overview, OverviewBulletins, OverviewRecalls, PayrollDeductions, PayrollDeductionsQuery, PayrollFactor, PartsCard, PartsCardLine, Plant, Recall, RecallCampaign, RecallCompletion, RecallCount, RecallInvestigations, RecallList, RecallLookup, RecallSearchQuery, RecentRecalls, RecentRecallsQuery, Safety, SafetyRating, SearchQuery, Selection, Spec, Submodel, SubmodelsQuery, TireFitment, JobDetail, JobList, LaborFigure, VehicleLabor, VinLabor, VehicleBulletins, VehicleCode, VehicleComplaints, VehicleFluids, VehicleFuel, VehicleFuelQuery, VehicleInvestigations, VehicleInvestigationsQuery, VehicleRecalls, VehicleRecallsQuery, VehicleSafety, VehicleSpecs, VehicleTires, VinBulletins, VinBulletinsQuery, VinDecode, VinFluids, VinFuel, VinFuelQuery, VinRecallCount, VinRecalls, VinRecallsQuery, VinSpecs, VinTires, VinYearQuery, Warning, YearsQuery, } from "./types.js";
7
7
  export type { components, operations, paths } from "./schema.js";
@@ -1,5 +1,5 @@
1
1
  import type { DecodeOptions, RequestOptions } from "../client.js";
2
- import type { BatchItem, EngineOption, EnginesQuery, Entry, Make, MakesQuery, Meta, Model, ModelsQuery, SearchQuery, Submodel, SubmodelsQuery, VinDecode, YearsQuery } from "../types.js";
2
+ import type { BatchItem, EngineOption, EnginesQuery, Entry, Make, MakesQuery, Meta, Model, ModelsQuery, Code, CodeList, CodeSearchQuery, JobDetail, JobList, ModelYears, Overview, RecallCampaign, RecallList, RecallSearchQuery, RecentRecalls, RecentRecallsQuery, SearchQuery, Submodel, SubmodelsQuery, VehicleFluids, VehicleFuel, VehicleComplaints, VehicleFuelQuery, VehicleRecalls, VehicleRecallsQuery, VehicleCode, VehicleLabor, VehicleSafety, VehicleSpecs, VehicleTires, VinDecode, VinLabor, VinFluids, VinFuel, VinFuelQuery, VinRecalls, VinRecallsQuery, VinSpecs, VinTires, VinYearQuery, YearsQuery } from "../types.js";
3
3
  import type { WasmSource } from "./engine.js";
4
4
  import type { Store } from "./store.js";
5
5
  /**
@@ -11,6 +11,13 @@ export declare const MAX_STEPS = 32;
11
11
  export interface OfflineOptions {
12
12
  /** Where the data is: `syncStore(...)`, `d1Store(...)`, or your own. */
13
13
  store: Store;
14
+ /**
15
+ * Where the shop file is: a second database, which holds the recalls.
16
+ * It must be the shop file that was built against the data file in
17
+ * `store`. Leave it out and the recall methods fail with
18
+ * `dataset_unavailable`; everything else works.
19
+ */
20
+ shop?: Store;
14
21
  /**
15
22
  * The decoder. Leave it out everywhere but Cloudflare Workers, where it
16
23
  * is the module `import wasm from "wenmar-open/offline.wasm"` gives.
@@ -60,11 +67,124 @@ export declare class WenmarOpenOffline {
60
67
  search(query: SearchQuery, options?: RequestOptions): Promise<Entry[]>;
61
68
  /** One catalog entry by its id, such as `2019_honda_civic_si`. */
62
69
  vehicle(id: string, options?: RequestOptions): Promise<Entry>;
70
+ /**
71
+ * NHTSA's crash test ratings for a model year, by its id such as
72
+ * `2018_ford_f-150`. NHTSA rates by body style and drive, so `ratings`
73
+ * often has several entries: each names the vehicle it is for. Needs a
74
+ * shop file that holds the ratings: without one it fails with
75
+ * `dataset_unavailable`.
76
+ */
77
+ safety(id: string, options?: RequestOptions): Promise<VehicleSafety>;
78
+ /**
79
+ * What owners reported to NHTSA about a model year, as counts by component
80
+ * with the median mileage they gave. Without a shop file that holds the
81
+ * complaints it fails with `dataset_unavailable`.
82
+ */
83
+ complaints(id: string, options?: RequestOptions): Promise<VehicleComplaints>;
84
+ /**
85
+ * Fuel consumption ratings of a model year, from EPA and Natural
86
+ * Resources Canada. Each says in `confidence` how far it was matched:
87
+ * `model`, `engine` or `submodel`. Needs a shop file that holds them:
88
+ * without one it fails with `dataset_unavailable`.
89
+ */
90
+ fuel(id: string, query?: VehicleFuelQuery, options?: RequestOptions): Promise<VehicleFuel>;
91
+ /** Fuel ratings for the vehicle a VIN decodes to: one engine's when the decode settles it. */
92
+ vinFuel(vin: string, query?: VinFuelQuery, options?: RequestOptions): Promise<VinFuel>;
93
+ /** Specifications of a model year from EPA's files, one entry per EPA rating. */
94
+ specs(id: string, options?: RequestOptions): Promise<VehicleSpecs>;
95
+ /** Specifications for the vehicle a VIN decodes to: one engine's when the decode settles it. */
96
+ vinSpecs(vin: string, query?: VinYearQuery, options?: RequestOptions): Promise<VinSpecs>;
97
+ /**
98
+ * Fluids of a model year: the engine oil viscosity grade the maker
99
+ * certified each engine with, per EPA, and the records a person read from
100
+ * the maker's own documents, each with its source and the day it was checked.
101
+ */
102
+ fluids(id: string, options?: RequestOptions): Promise<VehicleFluids>;
103
+ /** Fluids for the vehicle a VIN decodes to: one engine's when the decode settles it. */
104
+ vinFluids(vin: string, query?: VinYearQuery, options?: RequestOptions): Promise<VinFluids>;
105
+ /**
106
+ * Original-equipment tire fitments of a model year. Every size on record
107
+ * is listed with the trims it covers; none is picked.
108
+ */
109
+ tires(id: string, options?: RequestOptions): Promise<VehicleTires>;
110
+ /** Tire fitments of the model year a VIN decodes to. Never narrowed: a VIN does not name the wheels. */
111
+ vinTires(vin: string, query?: VinYearQuery, options?: RequestOptions): Promise<VinTires>;
112
+ /** The repair jobs a labour estimate can be about. Needs a shop file that holds the job list. */
113
+ jobs(options?: RequestOptions): Promise<JobList>;
114
+ /** One repair job: what it covers, and what it typically takes by class of vehicle. */
115
+ job(job: string, options?: RequestOptions): Promise<JobDetail>;
116
+ /**
117
+ * Wenmar's labour estimates for a model year, or for one `job` of it.
118
+ * An estimate, not a quote; credit it as `attribution` says. Needs a
119
+ * shop file that holds the estimates.
120
+ */
121
+ labor(id: string, job?: string, options?: RequestOptions): Promise<VehicleLabor>;
122
+ /** Labour estimates for the vehicle a VIN decodes to, or for one `job` of it. */
123
+ vinLabor(vin: string, job?: string, options?: RequestOptions & {
124
+ year?: number;
125
+ }): Promise<VinLabor>;
126
+ /**
127
+ * One generic trouble code, such as `P0420`, described in this project's
128
+ * own words. Needs a shop file that holds the codes: without one it
129
+ * fails with `dataset_unavailable`.
130
+ */
131
+ code(code: string, options?: RequestOptions): Promise<Code>;
132
+ /** The trouble codes that are described, by code, narrowed by text or system. */
133
+ codes(query?: CodeSearchQuery, options?: RequestOptions): Promise<CodeList>;
134
+ /**
135
+ * A trouble code on one model year: its description and the recalls
136
+ * about the same components. `bulletins` and `related.bulletins` are
137
+ * always `null` offline: bulletins are on the hosted service only.
138
+ */
139
+ vehicleCode(id: string, code: string, options?: RequestOptions): Promise<VehicleCode>;
140
+ /**
141
+ * Recalls that may apply to a model year, by its id such as
142
+ * `2018_ford_f-150`. The list is for the year, make and model: it is not
143
+ * a lookup by VIN, and `lookup` says where one vehicle can be checked.
144
+ * Needs a shop file: without one it fails with `dataset_unavailable`.
145
+ */
146
+ recalls(id: string, query?: VehicleRecallsQuery, options?: RequestOptions): Promise<VehicleRecalls>;
147
+ /**
148
+ * Recalls that may apply to the model year a VIN decodes to. The VIN only
149
+ * names the model year: no public data says a recall applies to one VIN.
150
+ */
151
+ vinRecalls(vin: string, query?: VinRecallsQuery, options?: RequestOptions): Promise<VinRecalls>;
152
+ /** One recall campaign: `source` is `nhtsa` or `tc`. */
153
+ recall(source: string, campaign: string, options?: RequestOptions): Promise<RecallCampaign>;
154
+ /** Recall campaigns, newest first, narrowed by what is given. */
155
+ searchRecalls(query?: RecallSearchQuery, options?: RequestOptions): Promise<RecallList>;
156
+ /**
157
+ * Everything held for a model year in one answer, by its id such as
158
+ * `2018_ford_f-150`. A block the files do not hold is `null`. `recalls`
159
+ * counts the campaigns that may apply to the year, make and model: it is
160
+ * not a lookup by VIN. With no shop file `recalls` is `null`, and the
161
+ * method still answers.
162
+ */
163
+ overview(id: string, options?: RequestOptions): Promise<Overview>;
164
+ /**
165
+ * The overview of the model year a VIN decodes to, with `decode`. The VIN
166
+ * only names the model year: no public data says a recall applies to one
167
+ * VIN.
168
+ */
169
+ vinOverview(vin: string, options?: DecodeOptions): Promise<Overview>;
170
+ /**
171
+ * Every model year of one model, newest first, each with its vehicle id
172
+ * and the number of recall campaigns that may apply to it: `null` with no
173
+ * shop file.
174
+ */
175
+ modelYears(make: string, model: string, options?: RequestOptions): Promise<ModelYears>;
176
+ /**
177
+ * Recall campaigns reported on or after `since` (a day such as
178
+ * `2026-09-01`), newest first, each with the vehicles it may apply to.
179
+ * Needs a shop file: without one it fails with `dataset_unavailable`.
180
+ */
181
+ recentRecalls(query: RecentRecallsQuery, options?: RequestOptions): Promise<RecentRecalls>;
63
182
  /**
64
183
  * The data version, the vPIC release it came from, and the build time.
65
- * `server_version` is the version of this package.
184
+ * `server_version` is the version of this package. `datasets` lists what
185
+ * the shop file holds, and is empty when no shop store was given.
66
186
  */
67
187
  meta(options?: RequestOptions): Promise<Meta>;
68
- /** Closes the store, if the store was opened for this client. */
188
+ /** Closes the stores, if they were opened for this client. */
69
189
  close(): void;
70
190
  }