import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue.cjs';
import { Logger } from '@graphql-hive/logger';
import { HttpCallConfig } from './http-client.cjs';
import { type PersistedDocumentsConfiguration } from './types.cjs';
type HeadersObject = {
    get(name: string): string | null;
};
/**
 * The app deployment manifest as registered in Hive, containing metadata
 * and the full list of persisted document hashes for a specific app version.
 */
export interface PersistedDocumentsManifest {
    /** Unique identifier of the manifest. */
    id: string;
    /** Name of the app this manifest belongs to. */
    appName: string;
    /** Version of the app this manifest belongs to. */
    appVersion: string;
    /** Whether this app version is published/active in Hive. */
    isActive: boolean;
    /** All persisted document hashes registered for this app version. */
    documentHashes: string[];
}
export type PersistedDocuments = {
    manifest(deployment: {
        appName: string;
        appVersion: string;
    }, context?: {
        waitUntil?: (promise: Promise<void> | void) => void;
    }): PromiseOrValue<PersistedDocumentsManifest | null>;
    resolve(documentId: string, context?: {
        waitUntil?: (promise: Promise<void> | void) => void;
    }): PromiseOrValue<string | null>;
    allowArbitraryDocuments(context: {
        headers?: HeadersObject;
    }): PromiseOrValue<boolean>;
    dispose: () => void;
};
export declare function createPersistedDocuments(config: PersistedDocumentsConfiguration & {
    logger: Logger;
    fetch?: typeof fetch;
    retry?: HttpCallConfig['retry'];
    timeout?: HttpCallConfig['retry'];
}): PersistedDocuments;
export {};
//# sourceMappingURL=persisted-documents.d.ts.map