REQUESTABLE_PRESETS
const REQUESTABLE_PRESETS: readonly ["aiproxy", "lg", "md", "original", "poster", "probe", "sm", "thumb", "video", "xl"];Defined in: packages/asset-client/dist/index.d.ts:795
What you may ASK the server to produce.
NOT the same set as VariantPreset, and conflating the two is the single most expensive type error this package has shipped. Three unknown agents evaluating the SDK all hit it, independently, in the same afternoon:
regenerate(id, { presets: [“hls”] }) // compiled → HTTP 400 upload(file, { presets: [“mp3”] }) // compiled → HTTP 400
Both symbols are perfectly real — they are things a variant CAN BE. Neither
is something you can ASK FOR. hls is built by the video pipeline when a
video is transcoded; mp3 is emitted automatically alongside any audio
original so iOS Safari can play it. You do not order either one.
And it was wrong in the other direction too, which nobody had noticed:
probe is requestable and was not on VariantPreset at all, so the type
forbade a request the server has always accepted.
Generated from the Elysia schemas of all four write routes — /assets/process,
the presign route, /assets/:id/regenerate and both multipart routes —
by scripts/gen-docs.ts (doc derivar WS-4). bun run gen:docs rewrites it;
--check fails the build if a route’s schema drifts and nobody reran it.
probe is still frames at evenly spaced offsets, stored under indexed keys
(-pr0.jpg, -pr1.jpg, …) — requestable, and deliberately absent from the
compact presets wire string, so it is here and not on VariantPreset.