/** * BuiltByBit Source (ex MC-Market) * * Version-check-only source for builtbybit.com using the official "Ultimate * API" v1 (https://builtbybit.com/wiki/ultimate-api/, api.builtbybit.com/v1). * * Capability facts (live-verified June 9 2026, research/premium-markets.md ยง1): * - API access is gated behind the paid Ultimate upgrade; a token is * user-supplied via SourceConfig.apiKey / BUILTBYBIT_TOKEN. * - Auth header form is `Authorization: Private ` (Private tokens * reach all public endpoints; Shared tokens are scoped to the creator's * own resources and are useless for checking arbitrary plugins). * - The API is METADATA-ONLY: there is no buyer file-download endpoint * (confirmed three ways, incl. the official js-api-wrapper source). All * PluginInfo results therefore carry downloadUrl '' + * manualDownloadReason 'premium' so the Phase 1 manual routing engages, * with the store page as the deep-link. * - Scraping builtbybit.com is both ToS-prohibited and Cloudflare-hostile โ€” * this source NEVER touches anything but the documented API. * * Without a token, every method answers its expected-absence value * (null / []) WITHOUT making network calls โ€” unlike the retired BukkitSource, * which burned requests it could never authenticate. Page deep-links for * registry entries don't depend on this source (see utils/page-url.ts). */ import type { PluginInfo, PluginSourceType } from '../types/index.js'; import { BasePluginSource, type BaseSourceOptions } from './base.js'; export interface BuiltByBitSourceOptions extends BaseSourceOptions { /** * Ultimate "Private" token. Without it the source is inert: every method * returns its expected-absence value without network calls. */ apiToken?: string; } export declare class BuiltByBitSource extends BasePluginSource { readonly id = "builtbybit"; readonly name = "BuiltByBit"; readonly type: PluginSourceType; private static readonly API_BASE; private static readonly STORE_BASE; private apiToken; constructor(options?: BuiltByBitSourceOptions); /** Set the Ultimate Private token after construction (factory/config wiring). */ setApiToken(token: string): void; /** * Whether this source can answer at all. The Ultimate API rejects every * unauthenticated request, so without a token the source short-circuits * to expected-absence values instead of burning doomed network calls. */ isAvailable(): boolean; getPluginInfo(resourceId: string): Promise; searchPlugins(_query: string, _limit?: number): Promise; getLatestVersion(resourceId: string): Promise; supportsMinecraftVersion(_mcVersion: string): Promise; /** * Authenticated GET returning the envelope's `data`, or null when the API * answers HTTP 200 with `result: 'error'` (expected absence / permission * miss โ€” transport failures still throw from fetchJson). */ private fetchAuthed; private buildResourcePageUrl; private parseResource; } //# sourceMappingURL=builtbybit.d.ts.map