Interface: GenerationMediaLike
Defined in: src/batteries/generation/_shared/index.ts:35
Structural duck-type of core Media: the exact shape a generation adapter reads off a media value it was handed as edit input — its declared MIME type, and an async accessor for its raw bytes.
Remarks
A real @nhtio/adk Media instance satisfies this interface structurally (it has both a mimeType string property and an asBytes(): Promise<Uint8Array> method), so callers can pass a Media straight through without the generation domain ever importing the class. See the module remarks for why this is a deliberate decoupling choice (CONTRIBUTING.md Design Decision #13, tier 2).
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
mimeType | string | The media's declared MIME type, e.g. 'image/png' or 'image/jpeg'. | src/batteries/generation/_shared/index.ts:37 |
Methods
asBytes()
ts
asBytes(): Promise<Uint8Array<ArrayBufferLike>>;Defined in: src/batteries/generation/_shared/index.ts:39
Resolves the media's raw bytes.
Returns
Promise<Uint8Array<ArrayBufferLike>>