UNPKG

@tableau/taco-toolkit

Version:
49 lines (48 loc) 2.17 kB
/// <reference types="node" /> /// <reference types="node" /> import { StatusCodes } from 'http-status-codes'; import EventEmitter from 'node:events'; import { URL } from 'node:url'; import { ConnectionData } from '../../../../shared/types/connection-data'; import { EPSError } from '../../../types/eps-error'; import { type SecretsType } from '../../../../shared/types/secrets-type'; import { ExtractApiResponse } from '../../../types/extract-api-response'; import { ExtractorLaunchFailureOptions, ExtractorLaunchSuccessOptions } from '../../../types/extractor-launch-options'; import { I18nConfig } from '../../../types/i18n-config'; import { PositionSize } from '../../../types/position-size'; import { StaticServerOptions } from '../../../types/static-server-options'; export interface RouteLaunchConfig { browserWatcherPort: number; staticServerOptions: StaticServerOptions; epsApiPort: number; } export type LaunchHandlerRequest = { epsServiceInfo: EPSServiceInfo; launchUIOptions: LaunchUIOptions; }; export type LaunchHandlerResponse = { httpStatusCode: StatusCodes; response: ExtractApiResponse | EPSError; }; export declare function onLaunchExtracted(options: ExtractorLaunchSuccessOptions | ExtractorLaunchFailureOptions): LaunchHandlerResponse; export declare function handleLaunch(extractorLaunchedEvent: EventEmitter, launchHandlerRequest: LaunchHandlerRequest): Promise<LaunchHandlerResponse | undefined>; interface EPSServiceInfo { readonly callerId: string; readonly epsInstanceId: string; readonly epsApiPort: number; readonly staticServerId: string; readonly staticServerPort: number; readonly browserWatcherPort: number; } interface LaunchUIOptions { readonly connectorClass: string; readonly connectionId: string; readonly tacoPath: string; readonly parentPositionSize: PositionSize; readonly extractorMode: string; readonly connectionData?: ConnectionData; readonly secrets?: SecretsType; readonly i18n: I18nConfig; } export declare function getLaunchURL(distinctConnectorName: string, options: LaunchUIOptions, epsServiceInfo: EPSServiceInfo): URL; export {};