import type { PermissionDenial } from '../authorization/permission-denial.js'; import { QueryNode } from './base.js'; /** * A node which can never evaluate to any value and thus prevents a query from being executed */ export declare class UnknownValueQueryNode extends QueryNode { describe(): string; } /** * A node that evaluates to an error value (as defined by RuntimeErrorValue) but does not prevent the rest from the * query tree from being evaluated */ export declare class RuntimeErrorQueryNode extends QueryNode { readonly message: string; readonly code: string | undefined; /** * Set if this is a PERMISSION_DENIED error. Not reported to the client. */ readonly permissionDenial: PermissionDenial | undefined; constructor(message: string, args?: { readonly code?: string; readonly permissionDenial?: PermissionDenial; }); describe(): string; } export declare const PERMISSION_DENIED_ERROR = "PERMISSION_DENIED"; export declare const ATOMICITY_SKIP_ERROR = "ATOMICITY_SKIP"; export declare const INVALID_CURSOR_ERROR = "INVALID_CURSOR"; export declare const NOT_FOUND_ERROR = "NOT_FOUND"; export declare const FLEX_SEARCH_TOO_MANY_OBJECTS = "FLEX_SEARCH_TOO_MANY_OBJECTS"; export declare const BILLING_KEY_FIELD_NOT_FILLED_ERROR = "BILLING_KEY_FIELD_NOT_FILLED"; export declare const NOT_SUPPORTED_ERROR = "NOT_SUPPORTED"; export declare const ARGUMENT_OUT_OF_RANGE_ERROR = "ARGUMENT_OUT_OF_RANGE"; export declare const TOO_MANY_OBJECTS_ERROR = "TOO_MANY_OBJECTS"; export declare const RUNTIME_ERROR_TOKEN = "__cruddl_runtime_error"; export declare const RUNTIME_ERROR_CODE_PROPERTY = "__cruddl_runtime_error_code"; export declare const RUNTIME_ERROR_PERMISSION_DENIAL_PROPERTY = "__cruddl_runtime_error_permission_denial"; /** * The result value of a RuntimeErrorQueryNode */ export interface RuntimeErrorValue { /** * The error message */ readonly __cruddl_runtime_error: string; readonly __cruddl_runtime_error_code?: string; readonly __cruddl_runtime_error_permission_denial?: PermissionDenial; } /** * Determines if a value is the result of a RuntimeErrorQueryNode */ export declare function isRuntimeErrorValue(value: any): value is RuntimeErrorValue; /** * Converts a RuntimeErrorValue to a regular error that can be thrown */ export declare function extractRuntimeError(value: RuntimeErrorValue): RuntimeError; /** * An error that can be thrown for part of the GraphQL result */ export declare class RuntimeError extends Error { readonly code: string | undefined; /** * Extensions to be used when formatting this as a graphql error */ readonly extensions: Record | undefined; /** * Set if this is a PERMISSION_DENIED error. Not reported to the client. */ readonly permissionDenial: PermissionDenial | undefined; constructor(message: string, args?: { readonly code?: string; readonly permissionDenial?: PermissionDenial; }); } /** * Creates an instance of RuntimeErrorValue */ export declare function createRuntimeErrorValue(message: string): RuntimeErrorValue;