import { PromiseObject, ErrorResponse, TransferSpec, TransferSpecPath, FeatureFlags } from '../models/models'; /** * Generates promise object that can be resolved or rejected via functions * * @returns an object containing the promise, the resolver and rejecter */ export declare const generatePromiseObjects: () => PromiseObject; /** * Log errors from HTTP Gateway SDK * * @param message the message indicating the error encountered * @param debugData the data with useful debugging information */ export declare const errorLog: (message: string, debugData?: any) => void; /** * Generate error object for rejecter responses * * @param message the message indicating the error encountered * @param debugData the data with useful debugging information * * @returns object containing standardized error response */ export declare const generateErrorBody: (message: string, debugData?: any) => ErrorResponse; /** * Validate if URL is valid URL * * @param serverUrl the url to test * * @returns boolean indicating whether supplied url is valid */ export declare const isValidUrl: (url: any) => boolean; /** * Validate if transferSpec is valid for server communication * * @param transferSpec the transferSpec to test * * @returns boolean indicating whether supplied transferSpec is valid */ export declare const isValidTransferSpec: (transferSpec: TransferSpec) => boolean; /** * Get files from a form * * @param children form children list * * @returns an array of Files pulled from an HTML form */ export declare const checkChildrenForFiles: (children: NodeList) => File[]; /** * Validate if form has required items * * @param form HTML form element */ export declare const isValidForm: (form: HTMLFormElement) => boolean; /** * Take a list of files and match them to a provided transferSpec to find only files to use * * @param files list of files in JavaScript memory * @param transferSpec the transferSpec to compare to for what files to use */ export declare const parseFilesFromSpec: (files: File[], transferSpec: TransferSpec) => File[]; /** * Take a transferSpec and find folders being used in the form and explode for uploading and explode transferSpec to know all files in folder * * @param formId the form item to use for parsing * @param transferSpec he transfer spec to test with for file list * * @returns object with files to add to upload and a new transferSpec Path array to use with exploded files */ export declare const folderTransferSpecExplode: (formId: string, transferSpec: TransferSpec) => { files: File[]; newPath: TransferSpecPath[]; }; /** * Return array of File items to use for transfer * * @param formId the form item to use for parsing * @param transferSpec the transfer spec to test with for file list * * @returns the array of Files to use */ export declare const getFilesForTransfer: (formId: string, transferSpec: TransferSpec) => Array; /** * Convert an irritable into an array. This is useful for taking Maps and making Arrays (Map.values() Map.keys()) * * @param iterable - an iterable to take and convert to an array * * @returns an array containing the iterable values */ export declare const iterableToArray: (iterable: IterableIterator) => any[]; /** * Figure out which feature to use based on current version of system. * * @param featureFlag - name of the feature flag to test * * @returns indicator if feature should be used */ export declare const getFeatureFlag: (featureFlag: FeatureFlags) => boolean; /** * Returns a string indicating the websocket URL to use for talking to the server * * @returns a string of the full Websocket URL */ export declare const getWebsocketUrl: (serverUrl: string, protocol: string) => string; declare const _default: { generatePromiseObjects: () => PromiseObject; errorLog: (message: string, debugData?: any) => void; generateErrorBody: (message: string, debugData?: any) => ErrorResponse; isValidUrl: (url: any) => boolean; isValidTransferSpec: (transferSpec: TransferSpec) => boolean; checkChildrenForFiles: (children: NodeList) => File[]; isValidForm: (form: HTMLFormElement) => boolean; getFilesForTransfer: (formId: string, transferSpec: TransferSpec) => File[]; folderTransferSpecExplode: (formId: string, transferSpec: TransferSpec) => { files: File[]; newPath: TransferSpecPath[]; }; parseFilesFromSpec: (files: File[], transferSpec: TransferSpec) => File[]; iterableToArray: (iterable: IterableIterator) => any[]; getFeatureFlag: (featureFlag: "noBase64Encoding") => boolean; }; export default _default;