/**
 * Zod schemas for TinyCloud storage session and configuration types.
 *
 * These schemas provide runtime validation for session configuration,
 * active sessions, and host configuration. Types are derived from
 * schemas using z.infer<>.
 *
 * @packageDocumentation
 */
import { z } from "zod";
/**
 * Configuration object for starting a TinyCloud session.
 */
export declare const SessionConfigSchema: z.ZodObject<{
    /** Actions that the session key will be permitted to perform, organized by service and path */
    actions: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
    /** Ethereum address. */
    address: z.ZodString;
    /** Chain ID. */
    chainId: z.ZodNumber;
    /** Domain of the webpage. */
    domain: z.ZodString;
    /** Current time for SIWE message (ISO 8601 format). */
    issuedAt: z.ZodString;
    /** The space that is the target resource of the delegation. */
    spaceId: z.ZodString;
    /** The earliest time that the session will be valid from. */
    notBefore: z.ZodOptional<z.ZodString>;
    /** The latest time that the session will be valid until. */
    expirationTime: z.ZodString;
    /** Optional parent delegations to inherit and attenuate */
    parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    /** Optional jwk to delegate to */
    jwk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    domain?: string;
    actions?: Record<string, Record<string, string[]>>;
    spaceId?: string;
    address?: string;
    chainId?: number;
    issuedAt?: string;
    notBefore?: string;
    expirationTime?: string;
    parents?: string[];
    jwk?: Record<string, unknown>;
}, {
    domain?: string;
    actions?: Record<string, Record<string, string[]>>;
    spaceId?: string;
    address?: string;
    chainId?: number;
    issuedAt?: string;
    notBefore?: string;
    expirationTime?: string;
    parents?: string[];
    jwk?: Record<string, unknown>;
}>;
export type SessionConfig = z.infer<typeof SessionConfigSchema>;
/**
 * A TinyCloud session.
 */
export declare const SessionSchema: z.ZodObject<{
    /** The delegation from the user to the session key. */
    delegationHeader: z.ZodObject<{
        Authorization: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        Authorization?: string;
    }, {
        Authorization?: string;
    }>;
    /** The delegation reference from the user to the session key. */
    delegationCid: z.ZodString;
    /** The session key (JWK format). */
    jwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    /** The space that the session key is permitted to perform actions against. */
    spaceId: z.ZodString;
    /** The verification method of the session key. */
    verificationMethod: z.ZodString;
}, "strip", z.ZodTypeAny, {
    spaceId?: string;
    jwk?: Record<string, unknown>;
    delegationHeader?: {
        Authorization?: string;
    };
    delegationCid?: string;
    verificationMethod?: string;
}, {
    spaceId?: string;
    jwk?: Record<string, unknown>;
    delegationHeader?: {
        Authorization?: string;
    };
    delegationCid?: string;
    verificationMethod?: string;
}>;
export type Session = z.infer<typeof SessionSchema>;
/**
 * Configuration object for generating a Space Host Delegation SIWE message.
 */
export declare const HostConfigSchema: z.ZodObject<{
    /** Ethereum address. */
    address: z.ZodString;
    /** Chain ID. */
    chainId: z.ZodNumber;
    /** Domain of the webpage. */
    domain: z.ZodString;
    /** Current time for SIWE message (ISO 8601 format). */
    issuedAt: z.ZodString;
    /** The space that is the target resource of the delegation. */
    spaceId: z.ZodString;
    /** The peer that is the target/invoker in the delegation. */
    peerId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    domain?: string;
    spaceId?: string;
    address?: string;
    chainId?: number;
    issuedAt?: string;
    peerId?: string;
}, {
    domain?: string;
    spaceId?: string;
    address?: string;
    chainId?: number;
    issuedAt?: string;
    peerId?: string;
}>;
export type HostConfig = z.infer<typeof HostConfigSchema>;
/**
 * Validation error type.
 */
export interface ValidationError {
    code: string;
    message: string;
    issues?: unknown[];
}
/**
 * Result type for validation operations.
 */
export type ValidationResult<T> = {
    ok: true;
    data: T;
} | {
    ok: false;
    error: ValidationError;
};
/**
 * Validates SessionConfig.
 */
export declare function validateSessionConfig(data: unknown): ValidationResult<SessionConfig>;
/**
 * Validates Session.
 */
export declare function validateSession(data: unknown): ValidationResult<Session>;
/**
 * Validates HostConfig.
 */
export declare function validateHostConfig(data: unknown): ValidationResult<HostConfig>;
//# sourceMappingURL=types.schema.d.ts.map