import { type ContinuumCid, type ContinuumPackageVersion } from '@hypersoniclabs/helix-manifest'; import { ApiError } from './api'; import type { CliCredentials } from './config'; import { type SetItemVersionResult } from './itemSetVersion'; export type PublishItemVersionOptions = { reason: string; notes?: string; expectedCurrentVersionId?: string; updateId?: string; /** A `.source-images/` directory from `character import`: sealed as `source-image.` closure objects (invariant 20). */ sourceImagesDir?: string; /** `=` hints written to `extras.helixShading` of the GLB (only the JSON chunk changes). */ shader?: string[]; onProgress?: (message: string) => void; }; type PinRef = { packageId?: string; version?: string; } | null | undefined; /** * The item's current Package pin. The item row's pin column can be empty while the version history still names the * current pin, so fall back to `GET /universal-items/:id/versions` before refusing. */ export declare function currentItemPin(api: { request(method: 'GET', path: string): Promise; }, itemId: string, rowPin: PinRef): Promise; export type PublishItemVersionResult = { itemId: string; packageId: string; /** The Version just sealed (e.g. 1.0.6). */ version: string; previousVersion: string; manifestCid: string; /** Set when the move committed (an unlisted/exempt item). Null when the visual-QA gate refused it (listed item). */ move: SetItemVersionResult | null; /** The 422 the gate answered when `move` is null — render with `renderSetVersionError`. */ refusal?: ApiError; }; /** `1.0.5` -> `1.0.6`. Version names are `x.y.z` on the wire; anything else is refused rather than guessed. */ export declare function bumpVersionPatch(version: string): string; /** The web GLB object this Package Version resolves (the root for a prop/avatar, else the first GLB variant). */ export declare function webGlbObjectOf(manifest: Pick): { cid: ContinuumCid; bytes: number; } | null; /** Replace the old GLB cid (and byte count) with the new one, everywhere it appears in a definition document. */ export declare function replaceCidDeep(value: unknown, oldCid: string, newCid: string, newBytes: number): void; /** Re-serialize an add-on definition that now names the new GLB; the result is uploaded as a fresh root object. */ export declare function updateDefinitionRendition(definitionBytes: Uint8Array, oldGlbCid: string, newGlbCid: string, newGlbBytes: number): Uint8Array; /** The closure this manifest actually names: root + source + variant objects, deduplicated by cid. */ export declare function recomputeExpectedClosure(manifest: Pick): { objectCount: number; totalBytes: number; }; /** * Ship a corrected mesh onto an ALREADY-PUBLISHED GLB add-on / prop / avatar, in place: seal a new Version of the * item's own Continuum Package, then move the item pointer through `POST :id/versions`. The visual check never gates * the move; if the server refuses it (422: a technical failure or content safety) the seal stays behind and the caller * gets the refusal with its reason. */ export declare function publishItemVersion(itemId: string, file: string, options: PublishItemVersionOptions, credentials: CliCredentials): Promise; export {};