import { ImportConfigFields } from './MainElement'; export interface AppTransformRequest { prompt: string; columns: string[]; } export interface AppMappingRequest { fields: string[] | ImportConfigFields; headers: string[]; } export interface AppTransformResponse { code: string; } export interface AppMappingResponse { mapping: { [field: string]: string; }; } /** * Singleton client for handling all API communications with the ImportOK backend. * Centralizes token management and API calls for transformations and mappings. */ export declare class AppClient { private readonly token; private static instance; private static readonly TRANSFORM_ENDPOINT; private static readonly MAPPING_ENDPOINT; private appUrl; private constructor(); /** * Initialize the AppClient singleton with a token. * Must be called before using getInstance(). */ static initialize(token: string): AppClient; /** * Get the singleton instance of AppClient. * Must call initialize() first. */ static getInstance(): AppClient; /** * Reset the singleton instance (mainly for testing purposes). */ static reset(): void; /** * Call the AI API to get transformation code */ getTransformation(request: AppTransformRequest): Promise; /** * Call the App API to get field mappings */ getMapping(request: AppMappingRequest): Promise; }