Skip to content

Commit

Permalink
chore: update type names
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Kong <frkong@redhat.com>
  • Loading branch information
Zaperex committed May 9, 2024
1 parent ce2f520 commit 535ad26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 2 additions & 8 deletions plugins/audit-log-common/src/DefaultAuditLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,16 @@ import {
AuditErrorLogOptions,
AuditLogDetailsOptions,
AuditLogger,
AuditLoggerOptions,
AuditLogOptions,
ScaffolderAuditLoggerOptions,
} from './types';

/**
* Generates the audit log details to place in the metadata argument of the logger
*
* Secrets in the body field should be redacted by the user before passing in the request object
* @public
*/
export class DefaultAuditLogger implements AuditLogger {
private readonly logger: LoggerService;
private readonly authService: AuthService;
private readonly httpAuthService: HttpAuthService;

constructor(options: ScaffolderAuditLoggerOptions) {
constructor(options: AuditLoggerOptions) {
this.logger = options.logger;
this.authService = options.authService;
this.httpAuthService = options.httpAuthService;
Expand Down
5 changes: 3 additions & 2 deletions plugins/audit-log-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export type AuditLogOptions = {

export type AuditErrorLogOptions = AuditLogOptions & { errors: ErrorLike[] };

export type ScaffolderAuditLoggerOptions = {
export type AuditLoggerOptions = {
logger: LoggerService;
authService: AuthService;
httpAuthService: HttpAuthService;
Expand All @@ -95,9 +95,10 @@ export interface AuditLogger {
getActorId(request?: Request): Promise<string | undefined>;

/**
* Generates the audit log details to place in the metadata argument of the logger
*
* Generates an AuditLogDetails object containing non-message details of the audit log
* Secrets in the request body field should be redacted by the user before passing in the request object
* @public
*/
createAuditLogDetails(
options: AuditLogDetailsOptions,
Expand Down

0 comments on commit 535ad26

Please sign in to comment.