import { Maybe } from 'maybe-not'; import MessageBus from '../../utility/message-bus/messageBus'; import type { PlatformDataRequest, PlatformRequestBody } from 'q2-tecton-common/lib/types/request'; import type { TectonPlatformControls } from '../../types/setup'; import type { TectonResponse } from 'q2-tecton-common/lib/types/response'; /** * Sets up the `requestPlatformData` capability for making platform API requests. * Supports both v1 (normalized responses) and v2 (raw responses), plus form data requests. * * @param messageBus - The platform message bus for feature communication * @param platformControlBus - Platform control bus with handler implementations * @param capabilities - Set to populate with available capability names * @param teardowns - Array to collect cleanup functions for unsubscribing * * @internal */ export default function requestPlatformDataSetup(messageBus: MessageBus, platformControlBus: TectonPlatformControls, capabilities: Set, teardowns: (() => void)[]): void; /** * Type guard to check if a request is a data request with dataType. * * @param request - The platform request body to check * @returns True if the request contains a dataType property * * @internal */ export declare function isDataRequest(request: PlatformRequestBody): request is PlatformDataRequest; /** * Executes a platform data request, resolving data URLs and handling form data. * * @param platformControlBus - Platform control bus with handler implementations * @param request - The platform request body containing route, method, and body * @returns Promise resolving to the platform response * * @internal */ export declare function platformDataRequest(platformControlBus: TectonPlatformControls, request: PlatformRequestBody): Promise; /** * Resolves a data URL from a dataType identifier using the platform URL map. * Parses dataType format `category::type` and looks up the corresponding URL. * * @param platformControlBus - Platform control bus with handler implementations * @param dataType - Data type identifier in format `category::type` * @param dataIdM - Optional data ID to append to the URL path * @param params - Query parameters to append to the URL * @returns Promise resolving to the fully constructed URL string * @throws Error if dataType format is invalid or no URL map is found * * @internal */ export declare function resolveDataURL(platformControlBus: TectonPlatformControls, dataType: string, dataIdM: Maybe, params?: Record): Promise; //# sourceMappingURL=requestPlatformData-setup.d.ts.map