@bugbug-io/sdk
    Preparing search index...

    Interface BugBugConfig

    interface BugBugConfig {
        apiToken?: string;
        projectId?: string;
        verbose?: boolean;
        logLevel?: "debug" | "info" | "warn" | "error";
        timeout?: number;
        rateLimit?: RateLimitConfig;
        requestHeaders?: Record<string, string>;
        onBeforeRequest?: RequestHook;
        onAfterRequest?: RequestHook;
        onRequestError?: RequestErrorHook;
    }
    Index

    Properties

    apiToken?: string

    API token used for all requests. When omitted, the SDK resolves it from bugbug.yaml, .env, or BUGBUG_API_TOKEN (in that order). Throws a ConfigurationError at construction time if no token can be found.

    projectId?: string

    Active project id for organization/user tokens, threaded into project-scoped requests. When omitted, the SDK resolves it from BUGBUG_PROJECT_ID, bugbug.yaml, or the persisted current project. Project tokens ignore this — their project is implied by the token. Use BugBugSDK.setProject to change it at runtime.

    verbose?: boolean

    Enable detailed request/response debug logging. Default: false.

    logLevel?: "debug" | "info" | "warn" | "error"

    Lower bound on emitted log severity. Default: 'info'.

    timeout?: number

    Per-request timeout in milliseconds. Default: 30_000 (30s).

    rateLimit?: RateLimitConfig

    Client-side rate limiting and retry-on-429 behavior. See RateLimitConfig.

    requestHeaders?: Record<string, string>

    Extra HTTP headers added to every request. Caller-supplied Authorization is still ignored: the SDK's token always wins.

    onBeforeRequest?: RequestHook

    Hook invoked just before a request is dispatched.

    onAfterRequest?: RequestHook

    Hook invoked after a successful (non-error) response.

    onRequestError?: RequestErrorHook

    Hook invoked after a request errored. Receives the parsed Response and the underlying Error.