/** * Callback function type for generating responses to message bus requests. * * @typeParam T - The type of the incoming message body * @typeParam R - The type of the response data (defaults to Record) * @param messageBody - The parsed message body from the request * @param sender - The window that sent the request * @returns A promise resolving to the response data, or null to skip responding * * @see TectonMessageBus.sendResponse - Uses this callback type */ export type ResponseCallback> = (messageBody: T, sender?: Window) => Promise | null; /** * Union type representing either a successful or error response from the message bus. * * @typeParam T - The type of the value in a successful response */ export type TectonMessageResponse = TectonMessageSuccessResponse | TectonMessageErrorResponse; /** * Successful response from a message bus request. * Contains the parsed value and metadata about the message. * * @typeParam T - The type of the response value * * @see TectonMessageBus.sendRequest - Returns this type * @see TectonMessageBus.onMessage - Emits this type */ export interface TectonMessageSuccessResponse { status: 'success'; value: T; sender: Window; type: string; guid: number | null; } /** * Error response from a message bus request. * Contains the error message and metadata about the failed request. */ export interface TectonMessageErrorResponse { status: 'error'; message: string; sender: Window; type: string; guid: number | null; } /** * Standard response format from Tecton platform data requests. * Wraps HTTP responses with consistent status and response body access. * Used by both SDK and platform for platform data communication. * * @see requestPlatformData - Used as return type for platform data requests */ export interface TectonResponse { response: any; status: number; statusText: string; } /** * Outlet bounding box and dimension information. * Provides position and size data for outlet elements, matching DOMRect structure. * Returned by requestOutletInfo capability to give features their container dimensions. * * @see requestOutletInfo - Return type for outlet dimension queries */ export interface OutletInfo { bottom: number; height: number; left: number; right: number; top: number; width: number; x: number; y: number; } //# sourceMappingURL=response.d.ts.map