1 import { HttpStatusCode, LogLevel } from '@shared/models'
2 import { AbstractCommand, OverrideCommandOptions } from '../shared'
4 export class LogsCommand extends AbstractCommand {
6 getLogs (options: OverrideCommandOptions & {
12 const { startDate, endDate, tagsOneOf, level } = options
13 const path = '/api/v1/server/logs'
15 return this.getRequestBody<any[]>({
19 query: { startDate, endDate, level, tagsOneOf },
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