@meterapp/car-image-sdk 1.40.1 → 1.42.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/README.md +8 -7
- package/dist/client.d.ts +13 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +49 -16
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +60 -7
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +105 -68
- package/dist/mcp/index.js.map +1 -1
- package/dist/packs.d.ts +10 -0
- package/dist/packs.d.ts.map +1 -1
- package/dist/params.d.ts +5 -0
- package/dist/params.d.ts.map +1 -1
- package/dist/params.js +17 -1
- package/dist/params.js.map +1 -1
- package/dist/signed-url.d.ts.map +1 -1
- package/dist/signed-url.js +2 -0
- package/dist/signed-url.js.map +1 -1
- package/dist/types.d.ts +142 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -8
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @meterapp/car-image-sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the **Car Image API** by Meter — studio-quality, transparent-background renders of any vehicle in the open [`@meterapp/vehicle-db`](https://github.com/MeterApp/vehicle-db) catalog (1,608 makes, 42,
|
|
3
|
+
TypeScript SDK for the **Car Image API** by Meter — studio-quality, transparent-background renders of any vehicle in the open [`@meterapp/vehicle-db`](https://github.com/MeterApp/vehicle-db) catalog (1,608 makes, 42,347 models, model years 1990–2027, each with a page at [carimage.dev/cars](https://carimage.dev/cars?ref=npm-sdk)), in nine camera views and any paint color; plus stable vehicle ids, free VIN decoding and textured 3D models.
|
|
4
4
|
|
|
5
5
|
- Zero runtime dependencies. Works in Node 20+, Vercel/Cloudflare edge runtimes, Deno, Bun and browsers.
|
|
6
6
|
- Typed parameters and responses for every endpoint.
|
|
@@ -18,7 +18,7 @@ For vehicle images in chat, resolve the vehicle and call `get_car_image` with it
|
|
|
18
18
|
|
|
19
19
|
## Pricing in one line
|
|
20
20
|
|
|
21
|
-
Plans meter **vehicle images**: one vehicle (make, model, year) in one color from one angle, counted once per UTC month and delivered as often as you like, at any size and in any format (bytes, signed URLs, their renewals and every load included). An angle the catalog has not prepared yet counts the same: we prepare it so it can be shown in any color, which takes a little time the first time. **Free**: $0, no card,
|
|
21
|
+
Plans meter **vehicle images**: one vehicle (make, model, year) in one color from one angle, counted once per UTC month and delivered as often as you like, at any size and in any format (bytes, signed URLs, their renewals and every load included). An angle the catalog has not prepared yet counts the same: we prepare it so it can be shown in any color, which takes a little time the first time. **Free**: $0, no card, 30 vehicle images per account, not per month (plus 30 more as a one-time courtesy once they run out), 100 credits once at signup, evaluation and personal projects. **Pro**: $49/month ($490/year), 2,500 vehicle images a month, 1,000 credits a month, commercial license while subscribed. **Business**: $99/month ($990/year), 10,000 vehicle images a month, 4,000 credits a month, 600 requests a minute per key, 25 keys. **Enterprise**: custom. There is no overage: past an allowance, new images answer `402` (`plan_image_limit`, nothing charged) until the 1st (UTC), or on Free for good (`resets_at: null`), while images already received keep serving. Images cost no credits; credits are no longer sold and pay only for 3D models (**100 credits** once per vehicle and color), make logos (1 credit each) and quality upgrades (20 credits). A one-time [Image Pack](https://carimage.dev/docs/packs?ref=npm-sdk) buys a set of images to keep and self-host for good. VIN decoding, catalog lookups, availability checks, polling and downloads are free. `client.account()` returns the plan in force as `data.plan` (with `meter`) and this month's counts in `data.limits_usage`; `client.pricing()` is the live price list.
|
|
22
22
|
|
|
23
23
|
License: on Pro and Business, commercial use while subscribed, including copies on your own servers and CDN; within 30 days after the plan ends, delete stored copies. Image Pack images may be self-hosted forever. Accounts that paid before 2026-10-25 keep their old terms and credit meter (1 credit per image) until the cutover date in their notice. Terms: <https://carimage.dev/terms?ref=npm-sdk#license>.
|
|
24
24
|
|
|
@@ -90,7 +90,7 @@ for (const result of data.results) {
|
|
|
90
90
|
}
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Every entry is read exactly as `getImage` would read it, so a `match` renders and anything else would have been a `404`. `result.vehicle.match` names the rule that read your spelling (`exact`, `alias`, `trim`, `fuzzy`…). Pass `{ batchSize, onProgress }` to report progress on a long list; an account can run 10 checks a minute, and `checkVehicles` waits out the minute when a long list reaches that. Pass `{ views: true }` for a manifest of which vehicles have every angle ready: each match also carries `views` (`prepared`, 0 to 9,
|
|
93
|
+
Every entry is read exactly as `getImage` would read it, so a `match` renders and anything else would have been a `404`. `result.vehicle.match` names the rule that read your spelling (`exact`, `alias`, `trim`, `fuzzy`…). Pass `{ batchSize, onProgress }` to report progress on a long list; an account can run 10 checks a minute, and `checkVehicles` waits out the minute when a long list reaches that. Pass `{ views: true }` for a manifest of which vehicles have every angle ready: each match also carries `views` (`prepared`, 0 to 9, the `missing` view names and the `verified` ones) and `summary.views_complete` counts the vehicles with all nine, `summary.views_verified` those whose every prepared view is verified; still free, 100 entries a request. The CLI does the same for a CSV: `car-image check inventory.csv --out inventory-checked.csv` (add `--views` for the view columns).
|
|
94
94
|
|
|
95
95
|
## VIN decoding
|
|
96
96
|
|
|
@@ -120,9 +120,9 @@ if (data.vehicle) {
|
|
|
120
120
|
}
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
`getImageAvailability({ vehicle, view, color })` checks one vehicle's prepared/cached views, quality (`standard`, `enhanced`, `premium`, or null), paint generation (`paint_generation` against `latest_paint_generation`), upgrade state (`upgradable` with `upgrade_reason`: `paint_generation` or `quality`; an upgrade redraws the view with the latest paint generation at enhanced quality and stores the new version) and render estimates through free `GET /api/v1/images/availability`. Omit `view` for all nine. Prepared means ready to serve quickly from storage without waiting for a new render. The equivalent MCP tool is `get_image_availability`, available in both core and all toolsets. Neither call generates, queues or counts image usage.
|
|
123
|
+
`getImageAvailability({ vehicle, view, color })` checks one vehicle's prepared/cached views, whether each is verified (`verified`: the image served for the view was compared, at full size and together with the vehicle's other views, with the manufacturer's own material for that model year, and matched; most views are not verified yet, and `false` says only that), quality (`standard`, `enhanced`, `premium`, or null), paint generation (`paint_generation` against `latest_paint_generation`), upgrade state (`upgradable` with `upgrade_reason`: `paint_generation` or `quality`; an upgrade redraws the view with the latest paint generation at enhanced quality and stores the new version) and render estimates through free `GET /api/v1/images/availability`. Omit `view` for all nine. Prepared means ready to serve quickly from storage without waiting for a new render. The equivalent MCP tool is `get_image_availability`, available in both core and all toolsets. Neither call generates, queues or counts image usage.
|
|
124
124
|
|
|
125
|
-
`checkAvailability(images)` checks up to 200 images at once before you ask for them, free and read-only (`POST /api/v1/images/availability`): whether each vehicle view is prepared, whether it would count a vehicle image this month (a view not prepared yet counts as one like any other), and whether the whole list fits the plan:
|
|
125
|
+
`checkAvailability(images)` checks up to 200 images at once before you ask for them, free and read-only (`POST /api/v1/images/availability`): whether each vehicle view is prepared and verified, whether it would count a vehicle image this month (a view not prepared yet counts as one like any other), and whether the whole list fits the plan:
|
|
126
126
|
|
|
127
127
|
```ts
|
|
128
128
|
const { data } = await client.checkAvailability(rows.map((row) => ({ vehicle: row.id, view: "front-3-4", color: row.paint })));
|
|
@@ -235,6 +235,7 @@ await client.getImage({
|
|
|
235
235
|
| `trim` | `true` | Crops to the car's alpha bounds before sizing so it fills the box instead of floating in the square source frame. Recommended for non-square layouts. |
|
|
236
236
|
| `padding` | 0–50 | Margin around a trimmed car, as a percentage of its longer side. Only with `trim`. |
|
|
237
237
|
| `shadow` | `true` | A soft, neutral ground shadow under the car, drawn from its own cut-out at delivery: semi-transparent on a transparent image, grey on a `background`. Same vehicle image, nothing extra; car images only, not `getMakeLogo`. |
|
|
238
|
+
| `market` | `"AU"`, `"GB"`, `"US"`… | The market of sale, an ISO 3166-1 alpha-2 country code, for model years that look different in different markets. Optional: an account can keep a default (`default_market` on `account()`), and an explicit market always wins. Today every market gets the default appearance, and the answer says which was served: `ImageResult.appearance`, and `appearance` on signed URLs, availability, `resolve` and `checkVehicles` answers (`{ market, scope: "default" }`). Never part of the image: the same vehicle, color and view is one image and one counted vehicle image under any market. |
|
|
238
239
|
| `format` | `png` (default) · `webp` · `jpg` · `auto` | `auto` picks WebP for clients whose `Accept` header lists it and PNG otherwise (`Vary: Accept`); a signed URL created with `auto` negotiates on every load. |
|
|
239
240
|
|
|
240
241
|
The same parameters apply to `getImageUrl` and to every entry of `createImageUrls`; the returned `vehicle` echoes `vehicle_id`, `color`, `fit`, `background`, `trim`, `padding` and `shadow` back. `assertImageParams` (and therefore every call) rejects a `size` beside `aspectRatio` or `resolution`, a `framing` beside `trim` or `padding`, a dimension that is not a whole number of pixels from 1, a color that is neither a preset, a CSS color name nor a hex, and a request that names neither a vehicle id nor all of make, model and year, before anything is sent. A size above 1024 is sent as given, for the server to clamp.
|
|
@@ -309,7 +310,7 @@ try {
|
|
|
309
310
|
if (error instanceof CarImageError) {
|
|
310
311
|
error.status; // 400 | 401 | 402 | 404 | 409 | 422 | 429 | 502 | 503 | 408 (wait3dModel timeout) | 0 (network)
|
|
311
312
|
error.title; // "Plan limit reached"
|
|
312
|
-
error.detail; // "The Free plan
|
|
313
|
+
error.detail; // "The Free plan includes 30 free vehicle images per account plus a one-time courtesy of 30 … Nothing was charged."
|
|
313
314
|
error.requestId; // "0d1e…" — quote this when contacting support
|
|
314
315
|
error.problem; // the raw application/problem+json body (a 402 carries code "plan_image_limit" with plan, used, included, requested, resets_at, pack_url and checkout_url; "subscription_required_for_credits" with balance and required_credits when a 3D model, logo or upgrade needs more credits than the account holds; "plan_vehicle_limit" on the legacy credit meter; a vehicle 404 includes suggestions: real catalog vehicles with ids to retry with, see /docs/vehicles#missing; a 400 for a query name the endpoint does not read includes parameter and allowed)
|
|
315
316
|
error.retryAfterSeconds; // set on 429, on a 409 (Idempotency-Key conflict, or a 3D file requested before the model is ready) and on a 503
|
|
@@ -337,7 +338,7 @@ import {
|
|
|
337
338
|
|
|
338
339
|
Register a tool's input as `readingTextArguments(MCP_TOOLS[name].inputSchema)`, as both servers do. A host that holds no typed schema for a tool sends every argument as text, and the wrapper reads `"true"`, `"960"` and the JSON of a list as the type the schema advertises before zod validates them; the JSON Schema it advertises is the zod schema's own. The shared `MAX_MCP_TOOL_INPUT_ELEMENTS` limit bounds combined array elements and object members to 10,000 before validation, including JSON values decoded from text; pass it as the MCP server’s `maxToolInputElements` option too.
|
|
339
340
|
|
|
340
|
-
Tools come in two sets. `MCP_TOOLSETS.core` (`DEFAULT_MCP_TOOLSET`, `"core"`) is the twelve core tools an agent needs to look a vehicle up, render it and watch the month's usage: `resolve_vehicle`, `search_vehicles`, `decode_vin`, `check_vehicles`, `get_car_image`, `create_car_image_urls`, `get_account`, `request_feature`, `report_issue`, `upvote_feedback`, `submit_review`. `MCP_TOOLSETS.all` (forty-one in total) adds `MCP_DOCUMENTED_EXTRAS`, the twenty-one more with `?toolset=all` that the reference documents, for make logos, 3D models, image options, the API reference, pricing, help and billing links: `list_feedback`, `get_feedback`, `list_my_feedback`, `remove_feedback_vote`, `comment_on_feedback`, `list_reviews`, `get_make_logo`, `create_3d_model`, `get_3d_model`, `publish_3d_model`, `list_image_options`, `describe_api`, `get_pricing`, `search_help`, `create_checkout_link`, `get_billing_link`, `purchase_plan`, `pay_invoice`, `checkout_status`, `list_members`, `list_webhooks`; and `MCP_UNLISTED_TOOLS`, tools both servers serve on `all` that the public reference leaves out. The hosted server
|
|
341
|
+
Tools come in two sets. `MCP_TOOLSETS.core` (`DEFAULT_MCP_TOOLSET`, `"core"`) is the twelve core tools an agent needs to look a vehicle up, render it and watch the month's usage: `resolve_vehicle`, `search_vehicles`, `decode_vin`, `check_vehicles`, `get_car_image`, `create_car_image_urls`, `get_account`, `request_feature`, `report_issue`, `upvote_feedback`, `submit_review`. `MCP_TOOLSETS.all` (forty-one in total) adds `MCP_DOCUMENTED_EXTRAS`, the twenty-one more with `?toolset=all` that the reference documents, for make logos, 3D models, image options, the API reference, pricing, help and billing links: `list_feedback`, `get_feedback`, `list_my_feedback`, `remove_feedback_vote`, `comment_on_feedback`, `list_reviews`, `get_make_logo`, `create_3d_model`, `get_3d_model`, `publish_3d_model`, `list_image_options`, `describe_api`, `get_pricing`, `search_help`, `create_checkout_link`, `get_billing_link`, `purchase_plan`, `pay_invoice`, `checkout_status`, `list_members`, `list_webhooks`; and `MCP_UNLISTED_TOOLS`, tools both servers serve on `all` that the public reference leaves out. The hosted server defaults to `all` at `https://carimage.dev/api/mcp` and takes `?toolset=core` for the core set. The stdio server defaults to `core` and takes `car-image mcp --toolset all` for the full set. `mcpInstructions(toolset)` returns the matching server instructions (`MCP_INSTRUCTIONS` is the `all` text) and `isMcpToolset(value)` validates a name from a URL or a flag. The instructions open with `mcpInstructionsHead(toolset)`: what an agent must know to use the tools well and safely (look the vehicle up with `resolve_vehicle`, then render by the `vehicle` id; what it costs; stop on a `402`), kept under `MCP_INSTRUCTIONS_HEAD_LIMIT` (2,048 characters) because some hosts pass a model only that much of a server's instructions. Tool descriptions explain individual operations.
|
|
341
342
|
|
|
342
343
|
`get_car_image`, each `create_car_image_urls` entry and `create_3d_model` name the vehicle by make, model and year or by `vehicle` (a stable id) and take `color` as a preset, a CSS color name or a hex; the image tools also take `fit`, `background`, `trim`, `padding` and `shadow` alongside view, size and format (`auto` included; `inlineImageFormat` is what both servers deliver an inline image as for it: png), and `create_car_image_urls` honors `renew` and `renew_days` and takes `idempotency_key` (`IDEMPOTENCY_KEY_PATTERN`), which the stdio server forwards as the `Idempotency-Key` header. `create_3d_model` costs 100 credits, and its description and the server instructions tell the agent to confirm with the human first. Every tool but `describe_api`, whose result is the reference prose itself, advertises an `outputSchema` and returns `structuredContent` that matches it, so a host can hand the model typed data instead of re-parsing the text block. The schemas allow unknown fields: the payloads mirror the REST API and gain fields as it grows. The input bounds are the REST API's: `max_uses` 0–1000 and a search `limit` of 1–25; `width` and `height` have no upper bound in the schema because the server clamps a size above 1024. Numeric inputs are coerced, so a host that sends `"960"` for `960` is understood; the advertised JSON Schema still says integer, and flags such as `trim` stay strict booleans.
|
|
343
344
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentLimitResponse, AgentPurchaseResponse, CheckoutLinkInput, BillingLinkResponse, CheckoutStatusResponse, HelpResponse, PricingResponse, PurchasePlanInput } from "./support.js";
|
|
2
2
|
import type { CreatedPackBatchResponse, PackBatchInput, PackBatchItemInput, PackBatchResponse, PackExportInput, PackExportResponse, PackImageOptions, PackImageResult, PackListResponse, PackManifestResponse, PackQuality, PackQuoteResponse, PackResponse, PackUnit } from "./packs.js";
|
|
3
|
-
import { type AccountResponse, type MembersResponse, type BuildingResponse, type PlanCheckoutResponse, type PlanInterval, type CreateImageUrlsOptions, type CreateImageUrlsResponse, type AvailabilityCheckResponse, type ImageAvailabilityParams, type ImageAvailabilityResponse, type ImageUsage, type CreateModel3dOptions, type CreateModel3dResponse, type CreateRequestInput, type FiledFeedbackResponse, type ListReviewsParams, type ReportIssueInput, type RequestFeatureInput, type ReviewInput, type ReviewListResponse, type ReviewResponse, type CreateRequestResponse, type DecodeVinOptions, type DeviceCodeResponse, type DeviceTokenResult, type FeedbackInput, type FeedbackResponse, type FetchLike, type HealthResponse, type ImageParams, type MakeLogoParams, type ImageResult, type ImageUrlResponse, type ListRequestsParams, type Model3d, type Model3dFileKind, type Model3dFileResult, type Model3dListResponse, type Model3dResponse, type OpenApiDocument, type OptionsResponse, type PortalResponse, type ReferralResponse, type ReferralSource, type RequestCommentResponse, type RequestCommentsResponse, type RequestDetailResponse, type RequestListResponse, type RequestResponse, type ResolveResponse, type TelemetryEvent, type VehicleCheckEntry, type VehicleCheckResponse, type VehicleMakeModelsResponse, type VehicleMakesResponse, type VehicleModelLookupResponse, type VehicleModelsResponse, type VehicleResponse, type VehicleSearchResponse, type VehicleSelector, type VehicleYearsResponse, type VinResponse, type WaitModel3dOptions } from "./types.js";
|
|
3
|
+
import { type AccountResponse, type MembersResponse, type BuildingResponse, type PlanCheckoutResponse, type PlanInterval, type CreateImageUrlsOptions, type CreateImageUrlsResponse, type AvailabilityCheckResponse, type ImageAvailabilityParams, type ImageAvailabilityResponse, type ImageUsage, type CreateModel3dOptions, type CreateModel3dResponse, type CreateRequestInput, type FiledFeedbackResponse, type ListReviewsParams, type ReportIssueInput, type RequestFeatureInput, type ReviewInput, type ReviewListResponse, type ReviewResponse, type CreateRequestResponse, type DecodeVinOptions, type DeviceCodeResponse, type DeviceTokenResult, type FeedbackInput, type FeedbackResponse, type FetchLike, type HealthResponse, type ImageParams, type MakeLogoParams, type ImageResult, type ImageUrlResponse, type ListRequestsParams, type Model3d, type Model3dFileKind, type Model3dFileResult, type Model3dListResponse, type Model3dResponse, type OpenApiDocument, type OptionsResponse, type PortalResponse, type ReferralResponse, type ReferralSource, type RequestCommentResponse, type RequestCommentsResponse, type RequestDetailResponse, type RequestListResponse, type RequestResponse, type ResolveResponse, type TelemetryEvent, type VehicleCheckEntry, type VehicleCheckResponse, type VehicleMakeModelsResponse, type VehicleMakesResponse, type VehicleModelLookupResponse, type VehicleModelsResponse, type VehicleResponse, type VehicleSearchResponse, type VehicleSelector, type VehicleYearsResponse, type VinResponse, type WaitModel3dOptions, type Market, type MarketOption } from "./types.js";
|
|
4
4
|
import type { CreatedWebhookResponse, CreateWebhookInput, DeletedWebhookResponse, EventListResponse, ListEventsParams, UpdateWebhookInput, WebhookDeliveriesResponse, WebhookListResponse, WebhookResponse, WebhookTestResponse } from "./webhooks.js";
|
|
5
5
|
export interface CarImageClientOptions {
|
|
6
6
|
/** `cimg_…` key. Falls back to `process.env.CAR_IMAGE_API_KEY` when running on a server. */
|
|
@@ -34,9 +34,12 @@ export interface RequestOptions {
|
|
|
34
34
|
}
|
|
35
35
|
/** Options for `checkVehicles`. */
|
|
36
36
|
export interface CheckVehiclesOptions extends RequestOptions {
|
|
37
|
+
/** The market of sale the list is for; an entry may name its own (`market`). Omit for the account default, or none. */
|
|
38
|
+
market?: Market;
|
|
37
39
|
/**
|
|
38
40
|
* Also say which of each matched vehicle's nine views are prepared
|
|
39
|
-
* (`views` on each match, `views_complete`
|
|
41
|
+
* and which of those are verified (`views` on each match, `views_complete`
|
|
42
|
+
* and `views_verified` in the summary). Still free;
|
|
40
43
|
* 100 entries a request instead of 2,000.
|
|
41
44
|
*/
|
|
42
45
|
views?: boolean;
|
|
@@ -123,21 +126,22 @@ export declare class CarImageClient {
|
|
|
123
126
|
* credit per URL at creation and one per renewed window.
|
|
124
127
|
*/
|
|
125
128
|
createImageUrls(images: ImageParams | ImageParams[], options?: CreateImageUrlsOptions & RequestOptions): Promise<CreateImageUrlsResponse>;
|
|
126
|
-
/** GET /api/v1/images/availability — cached/prepared views, quality and wait estimates; never renders or bills. */
|
|
129
|
+
/** GET /api/v1/images/availability — cached/prepared views, which of them are verified, quality and wait estimates; never renders or bills. */
|
|
127
130
|
getImageAvailability(params: ImageAvailabilityParams, options?: RequestOptions): Promise<ImageAvailabilityResponse>;
|
|
128
131
|
/**
|
|
129
132
|
* POST /api/v1/images/availability — free and read-only (renders, queues and
|
|
130
133
|
* counts nothing). For up to 200 images (the image objects
|
|
131
134
|
* `createImageUrls` takes), whether each vehicle view is prepared (so every
|
|
132
|
-
* color of it serves now), whether
|
|
135
|
+
* color of it serves now), whether the prepared image is verified (`false`
|
|
136
|
+
* says only that it has not been verified yet), whether asking for it would count a vehicle
|
|
133
137
|
* image this month (a view not prepared yet counts as one like any other),
|
|
134
138
|
* and whether the whole list fits the plan's allowance. Check a catalog here before importing it.
|
|
135
139
|
*/
|
|
136
|
-
checkAvailability(images: ImageParams | ImageParams[], options?: RequestOptions): Promise<AvailabilityCheckResponse>;
|
|
140
|
+
checkAvailability(images: ImageParams | ImageParams[], options?: MarketOption & RequestOptions): Promise<AvailabilityCheckResponse>;
|
|
137
141
|
/** GET /api/v1/images/options — public; views, colors, sizes, formats, pricing, catalog. */
|
|
138
142
|
options(options?: RequestOptions): Promise<OptionsResponse>;
|
|
139
143
|
/** POST /api/v1/images/resolve — free; turns "red 2024 porsche 911 side view" into parameters. */
|
|
140
|
-
resolve(query: string, options?: RequestOptions): Promise<ResolveResponse>;
|
|
144
|
+
resolve(query: string, options?: MarketOption & RequestOptions): Promise<ResolveResponse>;
|
|
141
145
|
/**
|
|
142
146
|
* GET /api/v1/vehicles — public. No filter: years; `year`: makes; `year`+`makeId`:
|
|
143
147
|
* models (each with its vehicle id); `make` slug: that make's models; `make`+`model`
|
|
@@ -175,7 +179,7 @@ export declare class CarImageClient {
|
|
|
175
179
|
* most three times, never with retries off), so the list finishes; a single
|
|
176
180
|
* request answers the 429 at once.
|
|
177
181
|
* With `views`, each match also says how many of its nine views are
|
|
178
|
-
* prepared and which are
|
|
182
|
+
* prepared, which are missing and which of the prepared ones are verified.
|
|
179
183
|
*/
|
|
180
184
|
checkVehicles(vehicles: readonly VehicleCheckEntry[], options?: CheckVehiclesOptions): Promise<VehicleCheckResponse>;
|
|
181
185
|
/**
|
|
@@ -317,7 +321,7 @@ export declare class CarImageClient {
|
|
|
317
321
|
/** POST /api/v1/packs/quote — free; how many images are stored, how many need drawing, the wait, and the smallest pack that holds them (`unit: "vehicle"` quotes a Vehicle Pack: every view of each vehicle). */
|
|
318
322
|
quotePack(items: PackBatchItemInput[], quality?: PackQuality, options?: {
|
|
319
323
|
unit?: PackUnit;
|
|
320
|
-
} & RequestOptions): Promise<PackQuoteResponse>;
|
|
324
|
+
} & MarketOption & RequestOptions): Promise<PackQuoteResponse>;
|
|
321
325
|
/**
|
|
322
326
|
* POST /api/v1/packs/{id}/batches — free; each new vehicle view uses one of
|
|
323
327
|
* the pack's images. Every vehicle is resolved first; any the catalog lacks
|
|
@@ -334,7 +338,7 @@ export declare class CarImageClient {
|
|
|
334
338
|
limit?: number;
|
|
335
339
|
after?: number;
|
|
336
340
|
} & RequestOptions): Promise<PackBatchResponse>;
|
|
337
|
-
/** GET /api/v1/packs/{id}/manifest — free; every delivered image, with the SHA-256 of its bytes
|
|
341
|
+
/** GET /api/v1/packs/{id}/manifest — free; every delivered image, with the SHA-256 of its bytes, its download URL and whether those bytes are verified. */
|
|
338
342
|
getPackManifest(packId: string, options?: RequestOptions): Promise<PackManifestResponse>;
|
|
339
343
|
/** GET /api/v1/packs/{id}/manifest?format=csv — free; the same as CSV text. */
|
|
340
344
|
getPackManifestCsv(packId: string, options?: RequestOptions): Promise<string>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEhM,OAAO,KAAK,EACV,wBAAwB,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EACtI,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAChH,MAAM,YAAY,CAAC;AAGpB,OAAO,EAQL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,kBAAkB,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AAC,cAAc,CAAC,CAGlE;IAED,4DAA4D;IACtD,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CAGpE;IAED,0EAA0E;IACpE,gBAAgB,CACpB,KAAK,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAO,EACnC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAQ7B;IAED,iGAAiG;IAC3F,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA6BlG;IAED,wEAAwE;IAClE,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CASvF;IAED;;;;OAIG;IACG,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAQxE;IAID,OAAO,CAAC,GAAG;IAKX,OAAO,CAAC,UAAU;IAQlB,sFAAsF;YACxE,kBAAkB;YAelB,IAAI;IAIlB,OAAO,CAAC,SAAS;IAWjB,gEAAgE;YAClD,IAAI;IAkBlB,8EAA8E;YAChE,OAAO;CAmEtB"}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CarImageError } from "./errors.js";
|
|
2
|
-
import { imageRequestBody, imageSearchParams, makeLogoSearchParams, isColor, normalizeYear, vehicleRequestBody } from "./params.js";
|
|
2
|
+
import { imageRequestBody, imageSearchParams, makeLogoSearchParams, isColor, normalizeMarket, normalizeYear, vehicleRequestBody } from "./params.js";
|
|
3
3
|
import { RETRYABLE_STATUSES, backoffDelayMs, retryDelayMs } from "./retry.js";
|
|
4
4
|
import { COLORS, DEFAULT_BASE_URL, MAX_CHECK_VEHICLES, MAX_CHECK_VIEWS_VEHICLES, MODEL_3D_FILE_KINDS, REFERRAL_SOURCES, VEHICLE_ID_PATTERN, } from "./types.js";
|
|
5
5
|
import { SDK_VERSION } from "./version.js";
|
|
@@ -33,6 +33,17 @@ function sourceHeader(headers) {
|
|
|
33
33
|
const raw = headers.get("x-image-source");
|
|
34
34
|
return raw === "cache" || raw === "generated" ? raw : null;
|
|
35
35
|
}
|
|
36
|
+
/** `X-Vehicle-Appearance`: `default`, or `default; market=AU`. */
|
|
37
|
+
function appearanceHeader(headers) {
|
|
38
|
+
const raw = headers.get("x-vehicle-appearance");
|
|
39
|
+
if (raw === null)
|
|
40
|
+
return null;
|
|
41
|
+
const [scope, ...members] = raw.split(";").map((part) => part.trim());
|
|
42
|
+
if (scope !== "default" && scope !== "market")
|
|
43
|
+
return null;
|
|
44
|
+
const market = members.map((member) => /^market=([A-Za-z]{2})$/.exec(member)?.[1]).find((value) => value !== undefined);
|
|
45
|
+
return { market: market ? market.toUpperCase() : null, scope };
|
|
46
|
+
}
|
|
36
47
|
function vehicleIdHeader(headers) {
|
|
37
48
|
const raw = headers.get("x-vehicle-id");
|
|
38
49
|
return raw !== null && VEHICLE_ID_PATTERN.test(raw) ? raw : null;
|
|
@@ -136,6 +147,7 @@ export class CarImageClient {
|
|
|
136
147
|
etag: response.headers.get("etag"),
|
|
137
148
|
requestId: response.headers.get("x-request-id"),
|
|
138
149
|
vehicleId: vehicleIdHeader(response.headers),
|
|
150
|
+
appearance: appearanceHeader(response.headers),
|
|
139
151
|
};
|
|
140
152
|
}
|
|
141
153
|
/** GET /api/v1/images/logo — 1 credit. Third-party trademarks; no license granted. */
|
|
@@ -157,6 +169,7 @@ export class CarImageClient {
|
|
|
157
169
|
etag: response.headers.get("etag"),
|
|
158
170
|
requestId: response.headers.get("x-request-id"),
|
|
159
171
|
vehicleId: vehicleIdHeader(response.headers),
|
|
172
|
+
appearance: null,
|
|
160
173
|
};
|
|
161
174
|
}
|
|
162
175
|
/** GET /api/v1/images/car with `Accept: application/json` — a signed URL; counts the vehicle image like `getImage` (1 credit on the legacy credit meter). */
|
|
@@ -177,6 +190,8 @@ export class CarImageClient {
|
|
|
177
190
|
*/
|
|
178
191
|
cachedImageUrl(params) {
|
|
179
192
|
const search = imageSearchParams(params);
|
|
193
|
+
// One URL per image: a market is not part of what a cached image is.
|
|
194
|
+
search.delete("market");
|
|
180
195
|
search.set("mode", "cached");
|
|
181
196
|
return `${this.baseUrl}/images/car.png?${search}`;
|
|
182
197
|
}
|
|
@@ -226,8 +241,10 @@ export class CarImageClient {
|
|
|
226
241
|
if (list.length < 1 || list.length > 50) {
|
|
227
242
|
throw new RangeError(`createImageUrls accepts 1 to 50 images (received ${list.length})`);
|
|
228
243
|
}
|
|
229
|
-
const { ttlSeconds, maxUses, renew, renewDays, idempotencyKey, ...request } = options;
|
|
244
|
+
const { ttlSeconds, maxUses, renew, renewDays, idempotencyKey, market, ...request } = options;
|
|
230
245
|
const body = { images: list.map(imageRequestBody) };
|
|
246
|
+
if (market !== undefined)
|
|
247
|
+
body.market = normalizeMarket(market);
|
|
231
248
|
if (ttlSeconds !== undefined)
|
|
232
249
|
body.ttl_seconds = ttlSeconds;
|
|
233
250
|
if (maxUses !== undefined)
|
|
@@ -255,7 +272,7 @@ export class CarImageClient {
|
|
|
255
272
|
result.idempotent_replayed = true;
|
|
256
273
|
return result;
|
|
257
274
|
}
|
|
258
|
-
/** GET /api/v1/images/availability — cached/prepared views, quality and wait estimates; never renders or bills. */
|
|
275
|
+
/** GET /api/v1/images/availability — cached/prepared views, which of them are verified, quality and wait estimates; never renders or bills. */
|
|
259
276
|
async getImageAvailability(params, options = {}) {
|
|
260
277
|
const query = imageSearchParams(params);
|
|
261
278
|
const response = await this.send(`/api/v1/images/availability?${query}`, options);
|
|
@@ -265,7 +282,8 @@ export class CarImageClient {
|
|
|
265
282
|
* POST /api/v1/images/availability — free and read-only (renders, queues and
|
|
266
283
|
* counts nothing). For up to 200 images (the image objects
|
|
267
284
|
* `createImageUrls` takes), whether each vehicle view is prepared (so every
|
|
268
|
-
* color of it serves now), whether
|
|
285
|
+
* color of it serves now), whether the prepared image is verified (`false`
|
|
286
|
+
* says only that it has not been verified yet), whether asking for it would count a vehicle
|
|
269
287
|
* image this month (a view not prepared yet counts as one like any other),
|
|
270
288
|
* and whether the whole list fits the plan's allowance. Check a catalog here before importing it.
|
|
271
289
|
*/
|
|
@@ -274,10 +292,11 @@ export class CarImageClient {
|
|
|
274
292
|
if (list.length < 1 || list.length > 200) {
|
|
275
293
|
throw new RangeError(`checkAvailability accepts 1 to 200 images (received ${list.length})`);
|
|
276
294
|
}
|
|
295
|
+
const { market, ...request } = options;
|
|
277
296
|
const response = await this.send("/api/v1/images/availability", {
|
|
278
|
-
...
|
|
297
|
+
...request,
|
|
279
298
|
method: "POST",
|
|
280
|
-
body: JSON.stringify({ images: list.map(imageRequestBody) }),
|
|
299
|
+
body: JSON.stringify({ images: list.map(imageRequestBody), ...(market === undefined ? {} : { market: normalizeMarket(market) }) }),
|
|
281
300
|
});
|
|
282
301
|
return this.json(response);
|
|
283
302
|
}
|
|
@@ -290,10 +309,11 @@ export class CarImageClient {
|
|
|
290
309
|
async resolve(query, options = {}) {
|
|
291
310
|
if (typeof query !== "string" || !query.trim())
|
|
292
311
|
throw new TypeError("query is required");
|
|
312
|
+
const { market, ...request } = options;
|
|
293
313
|
const response = await this.send("/api/v1/images/resolve", {
|
|
294
|
-
...
|
|
314
|
+
...request,
|
|
295
315
|
method: "POST",
|
|
296
|
-
body: JSON.stringify({ query: query.trim() }),
|
|
316
|
+
body: JSON.stringify({ query: query.trim(), ...(market === undefined ? {} : { market: normalizeMarket(market) }) }),
|
|
297
317
|
});
|
|
298
318
|
return this.json(response);
|
|
299
319
|
}
|
|
@@ -331,12 +351,13 @@ export class CarImageClient {
|
|
|
331
351
|
* most three times, never with retries off), so the list finishes; a single
|
|
332
352
|
* request answers the 429 at once.
|
|
333
353
|
* With `views`, each match also says how many of its nine views are
|
|
334
|
-
* prepared and which are
|
|
354
|
+
* prepared, which are missing and which of the prepared ones are verified.
|
|
335
355
|
*/
|
|
336
356
|
async checkVehicles(vehicles, options = {}) {
|
|
337
357
|
if (!Array.isArray(vehicles) || vehicles.length === 0)
|
|
338
358
|
throw new TypeError("vehicles must be a non-empty array");
|
|
339
|
-
const { views = false, onProgress, ...rest } = options;
|
|
359
|
+
const { views = false, onProgress, market: listMarket, ...rest } = options;
|
|
360
|
+
const market = listMarket === undefined ? undefined : normalizeMarket(listMarket);
|
|
340
361
|
const most = views ? MAX_CHECK_VIEWS_VEHICLES : MAX_CHECK_VEHICLES;
|
|
341
362
|
const { batchSize = most, ...request } = rest;
|
|
342
363
|
const retries = request.retries ?? this.maxRetries;
|
|
@@ -347,9 +368,11 @@ export class CarImageClient {
|
|
|
347
368
|
const results = [];
|
|
348
369
|
const matched = new Set();
|
|
349
370
|
const complete = new Set();
|
|
371
|
+
const verified = new Set();
|
|
350
372
|
let requestId = "";
|
|
373
|
+
let appearance;
|
|
351
374
|
for (let start = 0; start < vehicles.length; start += batchSize) {
|
|
352
|
-
const body = JSON.stringify({ vehicles: vehicles.slice(start, start + batchSize), ...(views ? { views: true } : {}) });
|
|
375
|
+
const body = JSON.stringify({ vehicles: vehicles.slice(start, start + batchSize), ...(views ? { views: true } : {}), ...(market ? { market } : {}) });
|
|
353
376
|
let page;
|
|
354
377
|
for (let waits = 0;; waits += 1) {
|
|
355
378
|
try {
|
|
@@ -372,14 +395,20 @@ export class CarImageClient {
|
|
|
372
395
|
matched.add(result.vehicle.id);
|
|
373
396
|
if (result.vehicle && result.views?.missing.length === 0)
|
|
374
397
|
complete.add(result.vehicle.id);
|
|
398
|
+
// Every prepared view verified; a server that predates the field says nothing, so nothing counts.
|
|
399
|
+
if (result.vehicle && result.views && result.views.prepared > 0 && result.views.verified?.length === result.views.prepared)
|
|
400
|
+
verified.add(result.vehicle.id);
|
|
375
401
|
}
|
|
376
402
|
requestId = page.request_id;
|
|
403
|
+
appearance = page.data.appearance ?? appearance;
|
|
377
404
|
onProgress?.(Math.min(start + batchSize, vehicles.length), vehicles.length);
|
|
378
405
|
}
|
|
379
406
|
summary.distinct_vehicles = matched.size;
|
|
380
|
-
if (views)
|
|
407
|
+
if (views) {
|
|
381
408
|
summary.views_complete = complete.size;
|
|
382
|
-
|
|
409
|
+
summary.views_verified = verified.size;
|
|
410
|
+
}
|
|
411
|
+
return { data: { ...(appearance ? { appearance } : {}), summary, results }, request_id: requestId };
|
|
383
412
|
}
|
|
384
413
|
// ------------------------------------------------------------------ VIN
|
|
385
414
|
/**
|
|
@@ -625,6 +654,8 @@ export class CarImageClient {
|
|
|
625
654
|
body.model = model;
|
|
626
655
|
if (input.year !== undefined && input.year !== "")
|
|
627
656
|
body.year = normalizeYear(input.year);
|
|
657
|
+
if (input.market !== undefined)
|
|
658
|
+
body.market = normalizeMarket(input.market);
|
|
628
659
|
}
|
|
629
660
|
else if (input.kind === "feature") {
|
|
630
661
|
const title = input.title?.trim();
|
|
@@ -899,8 +930,8 @@ export class CarImageClient {
|
|
|
899
930
|
}
|
|
900
931
|
/** POST /api/v1/packs/quote — free; how many images are stored, how many need drawing, the wait, and the smallest pack that holds them (`unit: "vehicle"` quotes a Vehicle Pack: every view of each vehicle). */
|
|
901
932
|
async quotePack(items, quality, options = {}) {
|
|
902
|
-
const { unit, ...request } = options;
|
|
903
|
-
const body = { items, ...(quality ? { quality } : {}), ...(unit ? { unit } : {}) };
|
|
933
|
+
const { unit, market, ...request } = options;
|
|
934
|
+
const body = { items, ...(quality ? { quality } : {}), ...(unit ? { unit } : {}), ...(market === undefined ? {} : { market: normalizeMarket(market) }) };
|
|
904
935
|
return this.json(await this.send("/api/v1/packs/quote", { ...request, method: "POST", body: JSON.stringify(body) }));
|
|
905
936
|
}
|
|
906
937
|
/**
|
|
@@ -916,6 +947,8 @@ export class CarImageClient {
|
|
|
916
947
|
const body = { items: input.items };
|
|
917
948
|
if (input.quality)
|
|
918
949
|
body.quality = input.quality;
|
|
950
|
+
if (input.market !== undefined)
|
|
951
|
+
body.market = normalizeMarket(input.market);
|
|
919
952
|
if (input.webhookUrl !== undefined)
|
|
920
953
|
body.webhook_url = input.webhookUrl;
|
|
921
954
|
if (input.webhookSecret !== undefined)
|
|
@@ -938,7 +971,7 @@ export class CarImageClient {
|
|
|
938
971
|
const query = search.size ? `?${search}` : "";
|
|
939
972
|
return this.json(await this.send(`/api/v1/packs/${requestPath(packId)}/batches/${requestPath(batchId)}${query}`, request));
|
|
940
973
|
}
|
|
941
|
-
/** GET /api/v1/packs/{id}/manifest — free; every delivered image, with the SHA-256 of its bytes
|
|
974
|
+
/** GET /api/v1/packs/{id}/manifest — free; every delivered image, with the SHA-256 of its bytes, its download URL and whether those bytes are verified. */
|
|
942
975
|
async getPackManifest(packId, options = {}) {
|
|
943
976
|
return this.json(await this.send(`/api/v1/packs/${requestPath(packId)}/manifest`, options));
|
|
944
977
|
}
|