@aimee-blue/ab-service-kit
Version:
Aimee Blue Service Template
21 lines (16 loc) • 464 B
text/typescript
import { localNow } from '../time';
import { fromEventBus } from '../eventBus';
import { ofType } from '../ofType';
export const LOGGING_AUDIT = 'LOGGING/AUDIT';
export interface ILoggingAuditAction {
type: typeof LOGGING_AUDIT;
timestamp: number;
}
export function loggingAudit() {
return {
type: LOGGING_AUDIT,
timestamp: localNow(),
};
}
export const onLoggingAudit = () =>
fromEventBus().pipe(ofType<ILoggingAuditAction>(LOGGING_AUDIT));