RegenerateResult
type RegenerateResult = | { kind: "image"; newVariants: AssetDTO[]; ok: true; sourceUsed: AssetDTO | "raw"; variants: AssetDTO[];} | { dispatch: unknown; kind: "video"; ok: true; regenerated: string[] | "default";};Defined in: packages/sdk/src/index.ts:353
Returned by aq.assets.regenerate(...). The shape varies by kind —
images return immediately with the merged variant list; videos
return a dispatch handle (the actual transcode runs in a Cloud Run
Job and finishes async).
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "image"; newVariants: AssetDTO[]; ok: true; sourceUsed: AssetDTO | "raw"; variants: AssetDTO[];}kind: "image";newVariants
Section titled “newVariants”newVariants: AssetDTO[];Presets newly written this run. Useful for showing “added X”.
ok: true;sourceUsed
Section titled “sourceUsed”sourceUsed: AssetDTO | "raw";Which source the server read to derive the new variants:
"original"/"raw"→ lossless source bytes (best)"xl"/"lg"/"md"/"sm"/"thumb"→ a previously encoded WebP variant was used as the source. Output is re-encoded WebP — fine for thumb/sm from lg, lossier when working from already-small sources.
The no-upscale clamp still applies: deriving lg (1920) from
a 640 sm source produces a 640-side lg variant, not a
stretched 1920.
variants
Section titled “variants”variants: AssetDTO[];Full variant set after the merge.
Type Literal
Section titled “Type Literal”{ dispatch: unknown; kind: "video"; ok: true; regenerated: string[] | "default";}