@webilix/nestjs-helper
Version:
Helper library for NestJS
54 lines • 1.27 kB
TypeScript
import * as excelJS from 'exceljs';
import { ExportColumn } from './export.type';
export interface IExport {
path: string;
mime: string;
size: number;
}
export interface IExportConfig {
path: string;
fontFA: string;
fontEN: string;
backgroundColor: string;
foregroundColor: string;
textColor: string;
logo?: string;
gotenberg?: string;
}
export interface IExportHeader {
title: string;
value: string;
english?: boolean;
}
export interface IExportColumn {
id: string;
title: string;
hideOn?: () => boolean;
}
export interface IExportTable {
title: string;
description?: string;
headers?: IExportHeader[];
columns: ExportColumn[];
rows: {
[key: string]: any;
}[];
}
export interface IExportOptions {
name?: string;
hideDate?: boolean;
}
export interface IExportMethod<C, V> {
xlsx: {
format: string;
english: (column: C) => boolean;
value: (value: V, column: C) => excelJS.CellValue;
};
docx: {
english: (column: C) => boolean;
value: (value: V, column: C) => string;
};
validate: (value: V, column: C) => boolean;
width: (value: V, column: C) => number;
}
//# sourceMappingURL=export.interface.d.ts.map