export declare const OPENAI_V1_FILES_ENDPOINT: "/v1/files";
export type OpenAIV1FilesMethod = "GET" | "POST" | "PATCH" | "DELETE";
export type OpenAIV1FilesGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1FilesRuntimeContext = {
    runtimeId?: string;
    correlationId?: string;
    callerId?: string;
};
export type OpenAIV1FilesAuthEnvelope = {
    kind: "api-key" | "bearer" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1FilesRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_FILES_ENDPOINT;
    operation: string;
    method: OpenAIV1FilesMethod;
    urlPath: string;
    query: Readonly<Record<string, string>>;
    headers: Readonly<Record<string, string>>;
    body?: unknown;
    runtime: Required<OpenAIV1FilesRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1FilesProviderCaller = (envelope: OpenAIV1FilesRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1FilesInvocationRequest = {
    operation?: string;
    method?: OpenAIV1FilesMethod;
    pathSuffix?: string;
    query?: Readonly<Record<string, string | number | boolean | undefined>>;
    headers?: Readonly<Record<string, string | undefined>>;
    body?: unknown;
    auth?: OpenAIV1FilesAuthEnvelope;
    runtime?: OpenAIV1FilesRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1FilesGate;
    governance?: OpenAIV1FilesGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectResponseObject?: boolean;
    caller?: OpenAIV1FilesProviderCaller;
};
export type OpenAIV1FilesErrorCode = "MISSING_OPERATION" | "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 OpenAIV1FilesError = {
    code: OpenAIV1FilesErrorCode;
    message: string;
    boundary: "input" | "contract" | "governance" | "auth" | "scope" | "provider";
    retryable: boolean;
};
export type OpenAIV1FilesProviderResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_FILES_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1FilesInvocationResult = {
    ok: true;
    request: OpenAIV1FilesRequestEnvelope;
    response: OpenAIV1FilesProviderResponseEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1FilesError;
    request?: OpenAIV1FilesRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1FilesProviderError(error: unknown): OpenAIV1FilesErrorCode;
export declare function invokeOpenAIV1Files(input?: OpenAIV1FilesInvocationRequest): Promise<OpenAIV1FilesInvocationResult>;
