import { type ProvenanceIssue } from './audioProvenance'; import { type BytesFetch, type Json } from './platform'; export declare const VEHICLE_ROOT_MEDIA_TYPE = "application/vnd.helix.vehicle-package+json;version=2"; export declare const VEHICLE_MODEL_ROLE = "vehicle.model.web.medium"; export declare const VEHICLE_AUDIO_ROLE = "vehicle.audio.bank.sample"; /** One model file in the directory, and the served rendition it is for (`model-.glb`), when it names one. */ export interface VehicleModelFile { file: string; renditionId?: string; } export interface VehicleDir { dir: string; packageFile: string; /** The drawn model: the primary rendition's file (see `models`). */ glbFile: string; /** * Every model the car draws, primary first. A car whose root declares more than one SERVED rendition (a web tier * plus a mobile tier, say — the live Subaru is two) is sealed with one model per rendition: `model.glb` for the * rendition the highest tier draws and `model-.glb` for each other. A one-rendition car is one file. */ models: VehicleModelFile[]; thumbnailFile?: string; publish: { title?: string; description?: string; tags?: string[]; slug?: string; version?: string; provenance?: { kind?: string; source?: string; }; }; pkg: Json; } /** The served renditions the engine draws from: every rendition with bytes, `source`-with-none kept as a description. */ export declare function servedRenditionIds(pkg: Json): string[]; /** Find the pieces of a vehicle package directory. Throws with what is missing. */ export declare function readVehicleDir(dirArg: string, overrides?: { glb?: string; thumbnail?: string; }): VehicleDir; export interface UploadedAudio { name: string; file: string; sha: string; bytes: number; url: string; } /** * Vehicle audio is never synthesised: the provenance errors that refuse a publish (AUDIO_SYNTHESISED, * AUDIO_ENGINE_UNSOURCED, AUDIO_SLOT_UNSOURCED, AUDIO_PROVENANCE_MISSING, AUDIO_SLOT_FITMENT_MISMATCH). `vehicle publish` * already refuses on any audio-check error before uploading; this is the same rule at the upload boundary, so nothing * that calls `attachAudioUrls` can seal synthesised or unsourced audio either. */ export declare function audioSourcingErrors(pkg: unknown): ProvenanceIssue[]; export declare function assertAudioSourced(pkg: unknown): void; /** The slice of the Continuum client this command uses — the specs fake it. */ export interface ContinuumObjects { putObjectFromFile(input: { path: string; filename: string; mediaType: string; audience?: 'private' | 'public'; }): Promise<{ cid: string; bytes: number; mediaType: string; }>; } /** The local WAVs a publish WOULD upload (same rows, same dedupe by sha as `attachAudioUrls`), without uploading. */ export declare function plannedAudioUploads(pkg: Json, dir: string): Array<{ name: string; file: string; sha: string; bytes: number; }>; /** * Upload every local WAV the package will play and return the package with each row's url/checksum/bytes/cid filled. * Rows that already carry a url and have no local file are left alone (platform generic samples); `checkAudioLocal` * has already fetched and verified them. */ export declare function attachAudioUrls(pkg: Json, dir: string, deps: { objects: ContinuumObjects; apiUrl: string; fetchBytes?: BytesFetch; origins?: string[]; onProgress?: (m: string) => void; }): Promise<{ pkg: Json; uploaded: UploadedAudio[]; }>;