Skip to content

Commit 405e9b5

Browse files
committed
audit logs
1 parent 644a4e5 commit 405e9b5

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { fetchApi } from '../../utils/fetchApi.js';
2+
3+
export async function runAuditLogsSettings({ days, page, limit } = {}) {
4+
return fetchApi('/extension/account/audit/settings', 'POST', {
5+
days: days !== undefined ? Number(days) : 30,
6+
page: page !== undefined ? Number(page) : 1,
7+
limit: limit !== undefined ? Number(limit) : 50,
8+
});
9+
}

‎src/commands/settings/index.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { runAuditLogsSettings } from './audit-logs.js';
12
import { runBranchesAll, runBranchesDefault, runBranchesUpdateDefault } from './branches.js';
23
import { runFeatureFlagsGet, runFeatureFlagsUpdate } from './feature-flags.js';
34
import { runAnalysisFeatureFlagsGet, runAnalysisFeatureFlagsUpdate } from './analysis-feature-flags.js';
@@ -39,6 +40,15 @@ export default function registerSettingsCommands(program, { runCmd }) {
3940
.command('settings')
4041
.description('Manage CodeAnt AI settings');
4142

43+
// ── audit-logs settings ────────────────────────────────────────────────────
44+
settings
45+
.command('audit-logs')
46+
.description('List settings change audit logs for the org')
47+
.option('--days <n>', 'Number of days to look back', '30')
48+
.option('--page <n>', 'Page number', '1')
49+
.option('--limit <n>', 'Results per page (max 200)', '50')
50+
.action((opts) => runCmd(() => runAuditLogsSettings({ days: opts.days, page: opts.page, limit: opts.limit })));
51+
4252
// ── branches all ───────────────────────────────────────────────────────────
4353
settings
4454
.command('branches-all')

0 commit comments

Comments
 (0)