export declare const OPENAI_V1_MODERATIONS_ENDPOINT: "/v1/moderations";
export declare const DEFAULT_OPENAI_V1_MODERATIONS_BASE_URL: "https://api.openai.com";
export type OpenAIV1ModerationsBoundary = "input" | "contract" | "governance" | "auth" | "scope" | "provider" | "response";
export type OpenAIV1ModerationsErrorCode = "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 OpenAIV1ModerationsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1ModerationsRuntimeContext = {
    runtimeId?: string;
    invocationId?: string;
    traceId?: string;
    callerId?: string;
};
export type OpenAIV1ModerationsAuthEnvelope = {
    kind: "bearer" | "api-key" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1ModerationsRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_MODERATIONS_ENDPOINT;
    operation: "create-moderation";
    method: "POST";
    url: string;
    headers: Readonly<Record<string, string>>;
    body: unknown;
    runtime: Required<OpenAIV1ModerationsRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    providerCallPlanned: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1ModerationsProviderCaller = (envelope: OpenAIV1ModerationsRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1ModerationsInvocationRequest = {
    body?: unknown;
    baseUrl?: string;
    headers?: Readonly<Record<string, string | undefined>>;
    auth?: OpenAIV1ModerationsAuthEnvelope;
    runtime?: OpenAIV1ModerationsRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1ModerationsGate;
    governance?: OpenAIV1ModerationsGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectResponseObject?: boolean;
    caller?: OpenAIV1ModerationsProviderCaller;
};
export type OpenAIV1ModerationsResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_MODERATIONS_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1ModerationsCapabilitySignal = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_MODERATIONS_ENDPOINT;
    operation: "create-moderation";
    rawShape: "moderation-result" | "mock" | "dry-run";
};
export type OpenAIV1ModerationsError = {
    code: OpenAIV1ModerationsErrorCode;
    message: string;
    boundary: OpenAIV1ModerationsBoundary;
    retryable: boolean;
};
export type OpenAIV1ModerationsResult = {
    ok: true;
    request: OpenAIV1ModerationsRequestEnvelope;
    response: OpenAIV1ModerationsResponseEnvelope;
    capability: OpenAIV1ModerationsCapabilitySignal;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1ModerationsError;
    request?: OpenAIV1ModerationsRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1ModerationsProviderError(error: unknown): OpenAIV1ModerationsErrorCode;
export declare function invokeOpenAIV1Moderations(input?: OpenAIV1ModerationsInvocationRequest): Promise<OpenAIV1ModerationsResult>;
