@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
20 lines • 1.05 kB
TypeScript
import type { FileStat } from '../types.ts';
/**
* The stat a write's reply names for the stored item, or null.
*
* `statOf` is the backend's own stat parser, so the stat reads as its `stat`
* does. The write has landed by now, so a reply that is not an object, or
* that the parser cannot read, answers null instead of throwing. Mirrors
* python's `upload_stat`.
*/
export declare function uploadStat<T extends object>(item: T | null | undefined, statOf: (item: T) => FileStat, virtual: string): FileStat | null;
/**
* The token an upload reply names for the stored file, or null.
*
* `statOf` is the backend's own stat parser, so the write's token is the
* kind its `stat` reports. The upload has landed by now, so a reply that is
* not an object, or that the parser cannot read, answers null instead of
* throwing. Mirrors python's `upload_token`.
*/
export declare function uploadToken<T extends object>(item: T | null | undefined, statOf: (item: T) => FileStat, virtual: string): string | null;
//# sourceMappingURL=upload.d.ts.map