index.d.ts 1.02 KB
Newer Older
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * @description Record to be stored in the database
 * @note Must be fullfiled completely, even if it is empty
 */
export declare type AuditRecord = {
    auditUnit?: string;
    auditTransactionId?: string;
    auditProtocol?: string;
    auditTransactionDate?: string;
    auditUserIp?: string;
    auditUserId?: string;
};
/**
 * @description AuditEngine interface
 * @note This interface is used to define the methods that must be implemented by the AuditEngine look at FileEngine.ts for an example
 * @interface AuditEngine
 */
export interface AuditEngine {
Panagiotis Skarvelis's avatar
cleanup    
Panagiotis Skarvelis committed
19
20
    put: (record: AuditRecord) => AuditRecord;
    get: (auditTransactionId: string) => AuditRecord;
21
22
    seq: (path?: string) => number;
    pn: (path?: string) => string;
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
23
}
Panagiotis Skarvelis's avatar
cleanup    
Panagiotis Skarvelis committed
24
25
26
/**
 * @description FileSystem errors
 */
27
28
29
30
export declare type FS_ERROR = {
    code: string;
    message: string;
};
31
32
33
34
35
36
37
/**
 * @description Schema to be used to store the audit records on real databases
 */
export declare type DatabaseSettings = {
    tableName?: string;
    columns?: AuditRecord;
};