-
Notifications
You must be signed in to change notification settings - Fork 70
/
keys.ts
60 lines (56 loc) · 1.69 KB
/
keys.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright (c) 2023 Sourcefuse Technologies
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import {BindingKey} from '@loopback/core';
import {
AuditLogExportFn,
ColumnBuilderFn,
ExportHandlerFn,
ExportToCsvFn,
IAuditServiceConfig,
QuerySelectedFilesFn,
} from './types';
import {BINDING_PREFIX} from '@sourceloop/core';
import {S3ClientConfig} from '@aws-sdk/client-s3';
export namespace AWSS3Bindings {
export const Config = BindingKey.create<AwsS3Config>(
`${BINDING_PREFIX}.audit.s3.config`,
);
}
export interface AwsS3Config extends S3ClientConfig {
accessKeyId: string;
secretAccessKey: string;
region?: string;
}
export namespace AuditServiceBindings {
export const Config = BindingKey.create<IAuditServiceConfig | null>(
`${BINDING_PREFIX}.audit.config`,
);
}
export namespace QuerySelectedFilesServiceBindings {
export const QUERY_ARCHIVED_LOGS =
BindingKey.create<QuerySelectedFilesFn | null>(
`${BINDING_PREFIX}.audit.queryArchivedLogs`,
);
}
export namespace ExportToCsvServiceBindings {
export const EXPORT_LOGS = BindingKey.create<ExportToCsvFn | null>(
`${BINDING_PREFIX}.audit.archiveLogs`,
);
}
export namespace AuditLogExportServiceBindings {
export const EXPORT_AUDIT_LOGS = BindingKey.create<AuditLogExportFn>(
`${BINDING_PREFIX}.audit.exportAuditLogs`,
);
}
export namespace ExportHandlerServiceBindings {
export const PROCESS_FILE = BindingKey.create<ExportHandlerFn>(
`${BINDING_PREFIX}.audit.processFile`,
);
}
export namespace ColumnBuilderServiceBindings {
export const COLUMN_BUILDER = BindingKey.create<ColumnBuilderFn>(
`${BINDING_PREFIX}.audit.columnBuilder`,
);
}