@codeplaydata/datasus
Version:
This application decompress the datasus micro data and serve as a gateway class.
27 lines (26 loc) • 941 B
TypeScript
/**
* Minimal FTP client contract used by the infrastructure layer.
*
* Any implementation (e.g., based on basic-ftp) must provide methods to:
* - list directory entries on the remote server;
* - download a file from the remote server to a local destination;
* - close the connection/resources.
*/
export interface FTPClient {
/**
* Lists entries from a remote path.
* @param params Implementation‑specific parameters (e.g., path: string = '/').
* @returns A list/array as returned by the concrete FTP client.
*/
list(...params: any[]): any;
/**
* Downloads a remote file to a local destination.
* @param params Implementation‑specific parameters (e.g., dest: string, from: string).
* @returns A promise or result provided by the concrete client.
*/
download(...params: any[]): any;
/**
* Closes the FTP connection and frees resources.
*/
close(): void;
}