index.ts 929 Bytes
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
19
20
21
/**
 * @description Record to be stored in the database
 * @note Must be fullfiled completely, even if it is empty
 */
export type AuditRecord = {
    auditUnit?: string, // name of the institution calling the internet service
    auditTransactionId?: string, // a/a call of the application
    auditProtocol?: string, // protocol number
    auditTransactionDate?: string, // the date & time of the call
    auditUserIp?: string,  // the IP address of the end user
    auditUserId?: string, // end user ID
};

/**
 * @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  {
    put: (record:AuditRecord) => AuditRecord | null;
    get: (auditTransactionId:string) => AuditRecord | null;
22
23
24
25
26
}

export type FS_ERROR = {
    code: string,
    message: string
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
27
}