db.d.ts 1.14 KB
Newer Older
1
import { AuditRecord, AuditEngine } from '../interfaces/index.js';
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
2
3
4
5
6
7
8
9
10
/**
 * @description AuditEngine implementation
 * @note This class uses AuditEngine implemetations, look at FileEngine.ts for an example
 * @class db
 * @param {AuditEngine} engine - AuditEngine implementation
 */
export declare class db {
    engine: AuditEngine;
    constructor(engine: AuditEngine);
Panagiotis Skarvelis's avatar
cleanup    
Panagiotis Skarvelis committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    /**
     * @description Store a record in the database
     * @param record
     * @returns AuditRecord
     * @memberof db
     * @method put
     */
    put(record: AuditRecord): AuditRecord;
    /**
     * @description Get a record from the database
     * @param auditTransactionId
     * @returns AuditRecord
     * @memberof db
     * @method get
     */
    get(auditTransactionId: string): AuditRecord;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    /**
     * @description Generate a new sequence number
     * @param path
     * @returns number
     * @memberof db
     * @method seq
     */
    seq(path?: string): number;
    /**
     * @description Generate a new protocol string
     * @param path
     * @returns string
     * @memberof db
     * @method pn
     */
    pn(path?: string): string;
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
43
44
}
export default db;