index.d.ts 884 Bytes
Newer Older
1
import { AuditRecord } from './interfaces/index.js';
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
2
3
4
5
6
7
8
/**
 * @description Use this on your app to generate and log the audit record
 * @coment This is the main function of the application
 * @comment The audit record is stored in the database,
 * @comment you can provide a custom audit record, or use the generated one
 * @param auditInit - The audit record to be stored, if is empty a new one will be generated
 * @param storagePath - The path where the audit record will be stored, default is the tmp directory
Panagiotis Skarvelis's avatar
cleanup    
Panagiotis Skarvelis committed
9
10
 * @env env.HOSTIP - useful to pass the IP address of the end user automatically on docker enviroments
 * @returns AuditRecord | null - The audit record generated or the one provided
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
11
 */
Panagiotis Skarvelis's avatar
cleanup    
Panagiotis Skarvelis committed
12
export declare const generateAuditRecord: (auditInit: AuditRecord | undefined, storagePath?: string) => AuditRecord | null;
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
13
export default generateAuditRecord;
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
14
export { AuditRecord };