Sporades SDK API
    Preparing search index...

    Type Alias CapsuleContext<Schema>

    Runtime-owned context passed to queries, mutations, endpoints, messages, middleware, and hooks.

    type CapsuleContext<Schema extends SchemaDefinition = SchemaDefinition> = {
        auth: AuthContext;
        db: DatabaseFromSchema<Schema>;
        env: Record<string, string>;
        jobs: JobApi;
        log: Logger;
        mail: MailApi;
        messages: MessageApi;
        privileged: PrivilegedApi<Schema>;
        serverAuth: ServerAuthApi;
        teams: CurrentUserTeamsApi;
    }

    Type Parameters

    Index
    env: Record<string, string>
    jobs: JobApi

    Server-only current-user durable Job Queue.

    log: Logger
    mail: MailApi

    Server-only SMTP delivery. Present even when mail is disabled.

    messages: MessageApi
    privileged: PrivilegedApi<Schema>
    serverAuth: ServerAuthApi

    Server-only auth management (e.g. password reset).

    Runtime-owned current-user Teams with normal linked-user authorization.