import { Schema } from "effect"; import type { Principal } from "./verify.ts"; declare const Unauthorized_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "Unauthorized"; } & Readonly; /** * The credential is missing, malformed, expired, revoked, or not this resource's: one cause, * so one message, `Authentication required`, unless another is given. */ export declare class Unauthorized extends Unauthorized_base<{ readonly message: string; }> { readonly cause?: unknown; constructor(options?: { readonly message?: string; readonly cause?: unknown; }); } declare const ProviderUnavailable_base: Schema.Class, import("effect/Cause").YieldableError & { readonly brand: unique symbol; }>; /** * The issuer could not be reached, so the credential could not be decided: a 503, not a * refusal. A resource's descriptor declares it, * `Authentication.make("notes.Login", CurrentPrincipal, { error: ProviderUnavailable })`. * Its public response is the schema. Diagnostic causes are internal, non-enumerable fields. */ export declare class ProviderUnavailable extends ProviderUnavailable_base { readonly cause?: unknown; static readonly of: (operation: string, cause: unknown) => ProviderUnavailable; } declare const InsufficientScope_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "InsufficientScope"; } & Readonly; /** * A verified credential lacks one of the verifier's `requiredScopes`, a resource's `required`: * the only check failing with it, as `requires`, `admitted`, `admit` and `watch` refuse with * `Action.Forbidden` directly. It names only the missing scope, so a refusal never enumerates * the resource's permissions, and the credential's `actor`, which decides whether the caller * can step up to it. */ export declare class InsufficientScope extends InsufficientScope_base<{ readonly scope: string; readonly actor: Principal["actor"]; }> { } declare const ConfigurationError_base: Schema.Class, import("effect/Cause").YieldableError & { readonly brand: unique symbol; }>; export declare class ConfigurationError extends ConfigurationError_base { } /** What verification fails with. */ export type AuthenticationError = Unauthorized | InsufficientScope | ProviderUnavailable; export {};