-
Notifications
You must be signed in to change notification settings - Fork 70
/
types.ts
36 lines (31 loc) · 1.13 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2023 Sourcefuse Technologies
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MITimport {BindingTemplate, extensionFor} from '@loopback/core';
import {AuditDbSourceName} from '@sourceloop/audit-log';
import {IServiceConfig} from '@sourceloop/core';
import {AuditLog} from './models';
import {AnyObject, Filter} from '@loopback/repository';
// sonarignore:start
export interface IAuditServiceConfig extends IServiceConfig {
//do nothing
}
export type QuerySelectedFilesFn = (
fileName: string,
filter: Filter<AuditLog>,
) => Promise<AuditLog[]>;
export type ExportToCsvFn = (selectedAuditLogs: AuditLog[]) => Promise<string>;
export type ExportHandlerFn = (fileBuffer: Buffer) => Promise<void>;
export type AuditLogExportFn = (data: AnyObject[]) => Promise<void>;
export type ColumnBuilderFn = (auditLogs: AuditLog[]) => Promise<AnyObject[]>;
export interface ArchiveOutput {
message: string;
numberOfEntriesArchived: number;
key: string;
}
export interface ExportResponse {
jobId?: string;
message?: string;
}
// sonarignore:end
export const AuditSourceName = AuditDbSourceName;