1 import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
2 import { LogLevel } from '../../models/server/log-level.type'
3 import { AbstractCommand, OverrideCommandOptions } from '../shared'
5 export class LogsCommand extends AbstractCommand {
7 getLogs (options: OverrideCommandOptions & {
12 const { startDate, endDate, level } = options
13 const path = '/api/v1/server/logs'
15 return this.getRequestBody({
19 query: { startDate, endDate, level },
21 defaultExpectedStatus: HttpStatusCode.OK_200
25 getAuditLogs (options: OverrideCommandOptions & {
29 const { startDate, endDate } = options
31 const path = '/api/v1/server/audit-logs'
33 return this.getRequestBody({
37 query: { startDate, endDate },
39 defaultExpectedStatus: HttpStatusCode.OK_200