import type { AuthEnvelope } from "../../authProfileLayer/authEnvelope.js";
export declare const OPENAI_V1_IMAGES_GENERATIONS_ENDPOINT: "/v1/images/generations";
export declare const DEFAULT_OPENAI_V1_IMAGES_GENERATIONS_BASE_URL: "https://api.openai.com";
export type OpenAIV1ImagesGenerationsBoundary = "input" | "contract" | "governance" | "auth" | "scope" | "provider" | "response";
export type OpenAIV1ImagesGenerationsErrorCode = "MISSING_BODY" | "MISSING_RUNTIME_ID" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "AUTH_REJECTED" | "CALLER_REQUIRED" | "PROVIDER_AUTH_FAILED" | "PROVIDER_RATE_LIMITED" | "PROVIDER_TIMEOUT" | "PROVIDER_UNAVAILABLE" | "RESPONSE_FORMAT_DRIFT" | "CALLER_FAILED";
export type OpenAIV1ImagesGenerationsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1ImagesGenerationsRuntimeContext = {
    runtimeId?: string;
    invocationId?: string;
    traceId?: string;
    callerId?: string;
};
export type OpenAIV1ImagesGenerationsAuthEnvelope = {
    kind: "bearer" | "api-key" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1ImagesGenerationsRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_IMAGES_GENERATIONS_ENDPOINT;
    operation: "create-image";
    method: "POST";
    url: string;
    headers: Readonly<Record<string, string>>;
    body: unknown;
    runtime: Required<OpenAIV1ImagesGenerationsRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    providerCallPlanned: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1ImagesGenerationsProviderCaller = (envelope: OpenAIV1ImagesGenerationsRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1ImagesGenerationsInvocationRequest = {
    body?: unknown;
    baseUrl?: string;
    headers?: Readonly<Record<string, string | undefined>>;
    auth?: OpenAIV1ImagesGenerationsAuthEnvelope | AuthEnvelope;
    runtime?: OpenAIV1ImagesGenerationsRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1ImagesGenerationsGate;
    governance?: OpenAIV1ImagesGenerationsGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectImageListResponse?: boolean;
    caller?: OpenAIV1ImagesGenerationsProviderCaller;
};
export type OpenAIV1ImagesGenerationsResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_IMAGES_GENERATIONS_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1ImagesGenerationsCapabilitySignal = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_IMAGES_GENERATIONS_ENDPOINT;
    operation: "create-image";
    rawShape: "image-list" | "mock" | "dry-run";
};
export type OpenAIV1ImagesGenerationsError = {
    code: OpenAIV1ImagesGenerationsErrorCode;
    message: string;
    boundary: OpenAIV1ImagesGenerationsBoundary;
    retryable: boolean;
};
export type OpenAIV1ImagesGenerationsResult = {
    ok: true;
    request: OpenAIV1ImagesGenerationsRequestEnvelope;
    response: OpenAIV1ImagesGenerationsResponseEnvelope;
    capability: OpenAIV1ImagesGenerationsCapabilitySignal;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1ImagesGenerationsError;
    request?: OpenAIV1ImagesGenerationsRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1ImagesGenerationsProviderError(error: unknown): OpenAIV1ImagesGenerationsErrorCode;
export declare function invokeOpenAIV1ImagesGenerations(input?: OpenAIV1ImagesGenerationsInvocationRequest): Promise<OpenAIV1ImagesGenerationsResult>;
