import type { PluginIndex, PluginMetadata } from './types.js'; /** * Minimal response shape required by marketplace client. */ export interface PluginMarketplaceResponse { ok: boolean; status: number; json(): Promise; } /** * Fetch function used by marketplace client. */ export type PluginMarketplaceFetch = (input: string, init?: Record) => Promise; /** * Construction options for {@link PluginMarketplaceClient}. */ export interface PluginMarketplaceClientOptions { /** URL of marketplace index JSON file. */ indexUrl: string; /** Base URL used to resolve `${pluginId}.json` metadata files. */ baseUrl: string; /** Optional fetch implementation. Falls back to global `fetch`. */ fetchFn?: PluginMarketplaceFetch; } /** * Host-agnostic client for reading marketplace metadata. */ export declare class PluginMarketplaceClient { private readonly indexUrl; private readonly baseUrl; private readonly fetchFn?; constructor(options: PluginMarketplaceClientOptions); /** * Fetches and validates marketplace index. */ fetchIndex(): Promise; /** * Fetches and validates single plugin metadata entry. * * @param pluginId - Identifier referenced by marketplace index. */ fetchPlugin(pluginId: string): Promise; /** * Fetches full marketplace catalog. * * Entries that fail fetch or validation get skipped so host can still render * rest of catalog. */ fetchPlugins(): Promise; private buildMetadataUrl; private getFetchFn; } //# sourceMappingURL=PluginMarketplaceClient.d.ts.map