import { type FluidWidgetsGlobalRegistryEvent, type FluidWidgetsGlobalUnsubscribe, type GlobalRegisteredWidget, type RegisteredWidget } from "@fluid-app/widget-runtime";
import type { WidgetPackageDescriptor } from "../types/widget-package-descriptor";
export { DEFAULT_WIDGET_PACKAGE_MANIFEST_URL } from "./widget-package-manifest-url";
export interface WidgetPackageLoadSummary {
    readonly registeredWidgets: readonly RegisteredWidget[];
    readonly hasFailures: boolean;
}
export interface LoadWidgetPackagesOptions {
    /**
     * Do not reuse packages that were already present on `window.FluidWidgets`
     * before this load began. Packages loaded by this portal instance may still
     * register the same packageId/version/type and be returned.
     */
    readonly ignoreExistingGlobalRegistrations?: boolean;
}
export interface WidgetPackageDescriptorFetchOptions {
    /** Additional trusted origins for fetched descriptor assets. */
    readonly allowedOrigins?: readonly string[];
    /** Credentials mode used for the descriptor catalog fetch. */
    readonly credentials?: RequestCredentials;
    /**
     * Trust catalog-authenticated runtime assets from the shared artifact bucket.
     * When enabled, descriptor/API-origin assets must still be listed explicitly
     * in allowedOrigins.
     */
    readonly trustCatalogAssetOrigins?: boolean;
}
export interface FluidWidgetsRegistrySubscription {
    readonly registeredWidgets: readonly GlobalRegisteredWidget[];
    readonly unsubscribe: FluidWidgetsGlobalUnsubscribe;
}
export type FluidWidgetsRegistryChangeListener = (registeredWidgets: readonly GlobalRegisteredWidget[], event: FluidWidgetsGlobalRegistryEvent) => void;
export declare function installAndReadFluidWidgetsRegistry(): readonly GlobalRegisteredWidget[];
export declare function subscribeToFluidWidgetsRegistry(listener: FluidWidgetsRegistryChangeListener): FluidWidgetsRegistrySubscription;
export declare function fetchWidgetPackageDescriptors(descriptorEndpointUrl?: string, options?: WidgetPackageDescriptorFetchOptions): Promise<WidgetPackageDescriptor[]>;
export declare function parseWidgetPackageDescriptorResponse(data: unknown, descriptorEndpointUrl?: string, options?: WidgetPackageDescriptorFetchOptions): WidgetPackageDescriptor[];
export declare function loadWidgetPackages(widgetPackages: readonly WidgetPackageDescriptor[], options?: LoadWidgetPackagesOptions): Promise<WidgetPackageLoadSummary>;
//# sourceMappingURL=load-widget-packages.d.ts.map