import { OpenGeniApiError } from "@opengeni/sdk/browser"; import { type CreditRefusalKind } from "../../lib/format.js"; export declare function isPaymentRequiredError(error: unknown): error is OpenGeniApiError; /** A refusal one action fixes: Upgrade to Pro (own key on Free) or Add credits. */ export type PaymentRefusalCode = CreditRefusalKind; /** What a chat route keeps about a credit refusal of a Send, for its notice. */ export type CreditRefusalRecord = Scope & { model: string; message: string; code: PaymentRefusalCode | null; }; /** The notice record for a payment refusal of a Send, or null for any other error. */ export declare function creditRefusalRecord(error: unknown, scope: Scope, model: string): CreditRefusalRecord | null; /** Which credit a payment refusal needs, when it is more specific than "no credit". */ export declare function paymentRefusalCode(error: unknown): PaymentRefusalCode | null;