import { t as OutboundMediaAccess } from "./load-options-CQixiFLj.js"; import { t as WebMediaResult } from "./web-media-D1aVPCGn.js"; import { r as PluginStateKeyedStore } from "./plugin-state-store.types-Bm0_upwK.js"; //#region src/plugin-sdk/outbound-media.d.ts /** Media loading policy used before plugin media is handed to channel delivery. */ type OutboundMediaLoadOptions = { /** Maximum allowed media payload size before the load is rejected. */maxBytes?: number; /** Whether callers may load remote URLs, local files, or both. */ mediaAccess?: OutboundMediaAccess; /** Approved local roots for file/path media; `"any"` disables root restriction. */ mediaLocalRoots?: readonly string[] | "any"; /** Optional local file reader used by tests or plugin-specific filesystem adapters. */ mediaReadFile?: (filePath: string) => Promise; /** Workspace root used when resolving relative local media paths. */ workspaceDir?: string; /** Explicit proxy URL forwarded to shared outbound media loading policy. */ proxyUrl?: string; /** Fetch implementation for remote media loads. */ fetchImpl?: (input: RequestInfo | URL, init?: RequestInit) => Promise; /** Extra fetch options merged into remote media requests. */ requestInit?: RequestInit; /** Allows explicit proxy DNS behavior to be trusted by the media fetch guard. */ trustExplicitProxyDns?: boolean; }; /** Load outbound media from a remote URL or approved local path using the shared web-media policy. */ declare function loadOutboundMediaFromUrl(mediaUrl: string, options?: OutboundMediaLoadOptions): Promise; type HostedOutboundMediaMetadata = { routePath: string; token: string; contentType?: string; expiresAt: number; byteLength: number; }; type HostedOutboundMediaEntry = { metadata: HostedOutboundMediaMetadata; buffer: Buffer; }; type HostedOutboundMediaMetaRecord = HostedOutboundMediaMetadata & { id: string; chunkCount: number; }; type HostedOutboundMediaChunkRecord = { id: string; index: number; dataBase64: string; }; type HostedOutboundMediaStore = { prepareUrl: (params: { mediaUrl: string; routePath: string; publicBaseUrl: string; maxBytes: number; proxyUrl?: string; }) => Promise; read: (id: string, nowMs?: number) => Promise; delete: (id: string) => Promise; cleanupExpired: (nowMs?: number) => Promise; clear: () => Promise; }; type CreateHostedOutboundMediaStoreOptions = { metadataStore: PluginStateKeyedStore; chunkStore: PluginStateKeyedStore; ttlMs: number; resolveExpiresAtMs: (ttlMs: number) => number | undefined; createId?: () => string; createToken?: () => string; rawChunkBytes?: number; maxEntries?: number; maxChunkRows?: number; chunkRowsPerEntryBudget?: number; }; declare function createHostedOutboundMediaStore(options: CreateHostedOutboundMediaStoreOptions): HostedOutboundMediaStore; //#endregion export { CreateHostedOutboundMediaStoreOptions, HostedOutboundMediaChunkRecord, HostedOutboundMediaEntry, HostedOutboundMediaMetaRecord, HostedOutboundMediaMetadata, HostedOutboundMediaStore, OutboundMediaLoadOptions, createHostedOutboundMediaStore, loadOutboundMediaFromUrl };