/** * Typed errors for the Direct Data Controller flow. * * @remarks * These extend {@link VanaError} so direct-controller callers can branch on the * structured `code` field. The messages map to the failure modes documented in * the builder guide ("Common Errors"). * * @category Direct * @module direct/errors */ import { VanaError } from "../errors.js"; /** Thrown when configuration passed to {@link createDirectDataController} is invalid. */ export declare class DirectConfigError extends VanaError { readonly details?: Record | undefined; constructor(message: string, details?: Record | undefined); } /** * Thrown when {@link DirectDataController.readApprovedData} is called for a * request that is not yet approved (missing grantId, scope, or personalServerUrl). */ export declare class AccessNotApprovedError extends VanaError { readonly details?: Record | undefined; constructor(message?: string, details?: Record | undefined); } /** * Thrown when a caller asks {@link DirectDataController.readApprovedData} for a * scope the user did not approve on this request. * * @remarks * Raised before any network call, so an unapproved scope never reaches the * Personal Server and never settles a fee. `details` carries the requested * scope and the scopes actually approved. */ export declare class ScopeNotApprovedError extends VanaError { readonly details?: Record | undefined; constructor(message: string, details?: Record | undefined); } /** Thrown when the Personal Server cannot be reached or returns an error. */ export declare class PersonalServerReadError extends VanaError { readonly status?: number | undefined; readonly details?: Record | undefined; constructor(message: string, status?: number | undefined, details?: Record | undefined); } /** * Thrown when a Personal Server requires payment (HTTP 402) but no escrow config * is set, or the read still requires payment after escrow settlement. * * @remarks * `details` carries structured debug data (`scope`, `grantId`, `asset`, * `amount`, and — after a settlement attempt — the `payment` receipt) so callers * can see exactly what was owed. */ export declare class PaymentRequiredError extends VanaError { readonly details?: Record | undefined; constructor(message: string, details?: Record | undefined); }