Skip to content
1 min read · 231 words

Interface: ConvertOptions

Defined in: src/batteries/media/contracts.ts:245

The options bag carried by a ConvertRequest — one typed, augmentable interface merging every documented convention.

Remarks

Consumers add their own keys via declaration merging against this module:

ts
declare module "@nhtio/adk/batteries/media/contracts" {
  interface ConvertOptions {
    watermark?: { text: string };
  }
}

Typo'd keys become excess-property compile errors at literal call sites; the runtime stays open — engines must ignore keys they don't understand (multi-hop conversion forwards one bag to every hop). The namespace is flat and globally merged, so BYO keys should be named to avoid collisions (prefix by engine where ambiguous).

Extends

Properties

PropertyTypeDescriptionInherited fromDefined in
augmentedWatermark?{ text: string; }--tests/unit/batteries/media/convert_options_augmentation.cross.spec.ts:9
augmentedWatermark.textstring--tests/unit/batteries/media/convert_options_augmentation.cross.spec.ts:9
format?stringPreferred output encoding token (jpg, png, …). An extractor that can emit it natively should; outputs in other encodings are re-encoded downstream by the requesting step.ImagesConvertOptions.formatsrc/batteries/media/contracts.ts:222
lang?stringSource-language hint (BCP-47-ish).AsrConvertOptions.langsrc/batteries/media/contracts.ts:211
languages?readonly string[]Recognition language hints (e.g. ['eng','deu']).OcrConvertOptions.languagessrc/batteries/media/contracts.ts:205
translate?booleanTranslate the transcription to English.AsrConvertOptions.translatesrc/batteries/media/contracts.ts:213