import { ODataVersionV4 } from "@odata2ts/odata-core"; import { QueryObjectModel } from "@odata2ts/odata-query-objects"; import { EntityTypeServiceV4 } from "./EntityTypeServiceV4"; import { SubtypeOptions } from "./ServiceStateHelperV4.js"; import { StreamServiceV4 } from "./StreamServiceV4"; /** * Service for a media entity, i.e. an entity type declared `HasStream="true"`: the entity's own * representation *is* binary content, addressed by appending `$value` to its URL. * Spec: {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_ManagingMediaEntities} * * Everything an ordinary entity service does stays available - the media entity still has regular * properties, which are read and written as JSON; only its content is separate. */ export declare class MediaEntityServiceV4 extends EntityTypeServiceV4 { private _content?; /** * The entity's content as its own service, bound to the `$value` URL. * * On a subtype service the type cast segment is left out by default, mirroring the other operations: * `$value` addresses the entity itself, which its key already identifies. Servers reject the * combination - `…/Media()/Namespace.EBook/$value` answers 404 while `…/Media()/$value` * serves the content. Note the difference to a *stream property* declared on a derived type: that one * can only be reached *through* the cast, since it does not exist on the base type. * * @param subtypeOptions opt the cast path segment back in */ content(subtypeOptions?: SubtypeOptions): StreamServiceV4; /** * Read the entity's binary content. Shortcut for `content().getBlob()`. */ getBlob(): import("..").BlobGetRequestCmd; /** * Replace the entity's binary content. Shortcut for `content().updateBlob(...)`. * * @param data the binary content * @param mimeType overrides the blob's own type */ updateBlob(data: Blob, mimeType?: string): import("..").BlobUpdateRequestCmd; /** * Read the entity's binary content as a stream. Shortcut for `content().getStream()`. */ getStream(): import("..").StreamGetRequestCmd; /** * Replace the entity's binary content from a stream. Shortcut for `content().updateStream(...)`. * * @param data the binary content * @param mimeType the content's MIME type */ updateStream(data: ReadableStream, mimeType?: string): import("..").StreamUpdateRequestCmd; /** * Delete the entity's binary content, leaving the entity itself in place. Shortcut for * `content().deleteBlob()`. */ deleteBlob(): import("..").UrlRequestCmd; }