@dypai-ai/client-sdk - v1.12.0
    Preparing search index...

    Interface DypaiConfig

    interface DypaiConfig {
        apiKey?: string;
        auth?: AuthClientOptions;
        baseUrl: string;
        global?: GlobalClientOptions;
        redirects?: AuthRedirects;
        serviceRoleKey?: string;
        storageKey?: string;
    }
    Index

    Properties

    apiKey?: string

    DYPAI API Key pública. Opcional si todas las llamadas son autenticadas con JWT

    Opciones de autenticación

    baseUrl: string

    URL base de la API (ej: 'http://localhost:8000') - Debe apuntar al Gateway unificado

    Opciones globales (fetch, headers)

    redirects?: AuthRedirects

    Auto-redirect after auth callbacks (recovery, invite, sign in). The SDK detects the callback type from the URL hash and redirects automatically.

    Example:

    createClient(url, {
    redirects: {
    passwordRecovery: '/set-password',
    signIn: '/dashboard',
    }
    });
    serviceRoleKey?: string

    Service role key for direct database access (admin-level). When provided, enables client.db.direct for CRUD and raw SQL without creating endpoints or workflows.

    WARNING: Server-side only. Never expose this key in browser code. For end-user data access, use endpoints with client.db.from() or client.api.

    storageKey?: string

    Opcional: ID para aislar localStorage entre múltiples clientes