xlport
Version:
26 lines • 1.24 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { AxiosInstance } from 'axios';
import { Stream } from 'stream';
import { Import } from './import.types';
import { Export } from './export.types';
export type ClientOptions = {
url?: string;
apiKey: string;
};
export type ExcelFileExtension = 'xls' | 'xlsx' | 'xlsm' | 'xlsb';
export type ExcelDefaultMimeType = 'application/vnd.ms-excel';
export type ExcelMimeType = ExcelDefaultMimeType | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel.sheet.binary.macroEnabled.12';
export declare const excelDefaultMimeType = "application/vnd.ms-excel";
export declare const mimeTypes: MimeTypes;
export type MimeTypes = Record<ExcelFileExtension, ExcelMimeType>;
export declare class Client {
private config;
private get authHeader();
axios: AxiosInstance;
constructor(config: ClientOptions);
importFromFile(file: string | Buffer, request?: Import.Request, filename?: string): Promise<Import.Response>;
exportToFile(body: Export.Body): Promise<Stream>;
private getExcelMimeType;
}
//# sourceMappingURL=client.d.ts.map