import type { BlueprintResource } from '@sanity/blueprints';
import type { AuthParams, InstallerType, PrepAssetFn } from '../../utils/types.js';
export declare const assetCheckUrl: string;
export declare const assetStashUrl: string;
export type StashAssetResult = {
    success: true;
    /** The id of the asset that was found or stashed */
    assetId: string;
    /** The parameter where the asset id should be stored in the resource */
    assetParameter: string;
    /** Whether the asset was already in the stash */
    exists: boolean;
    /** The asset hash for later lookup */
    hash: string;
    /** Facts learned about the resource while preparing its asset */
    metadata?: Record<string, unknown>;
} | {
    success: false;
    error: string;
};
export declare function stashAsset<R extends BlueprintResource>({ resource, prepAsset, auth, blueprintFileDir, fetchFn, installer, }: {
    resource: R;
    prepAsset: PrepAssetFn<R>;
    auth: AuthParams;
    blueprintFileDir: string;
    fetchFn: typeof fetch;
    installer?: InstallerType;
}): Promise<StashAssetResult>;
export declare function hashBuffer(buffer: Buffer): string;
