/** * Voxel Source (ex-Polymart) * * Fetches plugin information from Voxel (voxel.shop — Polymart rebranded; * polymart.org 301-redirects there). The PluginSourceType string stays * 'polymart' because Phase 2's IdentificationChannel already uses it and * embedded watermarks / registry data still carry polymart.org URLs; the * display name is Voxel. * * API docs: https://voxel.shop/wiki/api (live-verified June 9 2026, * research/premium-markets.md §2). This is the ONLY Minecraft marketplace * with an official, documented buyer-download API: * * - `getResourceInfo` (no auth) — title, price, owner, current version. * Unauthenticated version checking works for everyone. * - `getDownloadURL` (user token from the `authorizeUser` consent flow, * ~365-day validity) — "download a resource on behalf of a user", the * officially-blessed host/panel path. Works for free AND premium * resources the token's user owns on voxel.shop. * * Without a token the source degrades to version-check + store deep-link: * downloadUrl stays '' with manualDownloadReason 'premium' so the Phase 1 * manual-update routing engages. With a token, a real (time-limited) * download URL is returned and the normal download workflow proceeds. */ import type { PluginInfo, PluginSourceType } from '../types/index.js'; import { BasePluginSource, type BaseSourceOptions } from './base.js'; export interface VoxelSourceOptions extends BaseSourceOptions { /** * Buyer token from the Voxel `authorizeUser` consent flow (~365-day * validity). Optional: version checks are unauthenticated; the token only * unlocks `getDownloadURL` for resources the user owns on voxel.shop. */ userToken?: string; } export declare class VoxelSource extends BasePluginSource { readonly id = "polymart"; readonly name = "Voxel"; readonly type: PluginSourceType; private static readonly API_BASE; private static readonly STORE_BASE; private userToken; constructor(options?: VoxelSourceOptions); /** Set the buyer token after construction (factory/config wiring). */ setUserToken(token: string): void; /** Whether a buyer token is configured (download capability, not liveness). */ hasUserToken(): boolean; getPluginInfo(resourceId: string): Promise; searchPlugins(query: string, limit?: number): Promise; getLatestVersion(resourceId: string): Promise; supportsMinecraftVersion(_mcVersion: string): Promise; /** * `getDownloadURL` — official download-on-behalf-of-a-buyer endpoint. * POST keeps the user token out of URLs (and therefore out of logs). * Returns null on any failure: unowned resource, expired token, transport * error — the caller falls back to the manual premium flow. */ private requestDownloadUrl; private buildResourcePageUrl; private parseResource; } //# sourceMappingURL=voxel.d.ts.map