Title: docs(ee/audit): action type table is out of sync with code
The Audit action types table in docs/docs/configuration/audit-logs.mdx (lines 113-150) is missing 4 entries that the code actually writes, and has 1 stale entry that the code does not write.
Missing entries (in code, not in docs)
org.member_deactivated — packages/web/src/features/membership/membership.service.ts:305-310 (target type user)
org.member_reactivated — packages/web/src/features/membership/membership.service.ts:353-358 (target type user)
scim_token.created — packages/web/src/ee/features/scim/actions.ts:75-84 (target type scim_token, metadata { scim_token: <name> })
scim_token.deleted — packages/web/src/ee/features/scim/actions.ts:112-121 (target type scim_token, metadata { scim_token: <name> })
Stale entry (in docs, not in code)
user.delete (line 127) — no createAudit({ action: "user.delete", ... }) or createAudit({ action: "user.deleted", ... }) call exists in packages/. Closest active entry is user.read in the EE user GET handler.
Related gaps in the same file
- The
targetType enum in the response schema (line 197) is missing scim_token as a value.
- The query parameters (
since, until, page, perPage) and the response headers (X-Total-Count, Link) are documented in docs/api-reference/sourcebot-public.openapi.json and the corresponding publicApiDocument.ts registration, but not in the .mdx page. The page only shows a single unparameterised curl example.
- The
metadata schema (line 201-218) is missing scim_token as a known key (used by the two new scim_token.* actions).
Proposed fix
Update docs/docs/configuration/audit-logs.mdx so the action type table, the targetType enum, and the metadata schema all reflect the actual code. Remove the stale user.delete row. Add a short section documenting the four query parameters and the two response headers, with one curl example showing time-range filtering and one showing paginated traversal. No code or behaviour changes; no changelog entry needed (docs only).
Acceptance criteria
- The action type table in the
.mdx contains every action value that any createAudit / createAuditAction call writes, and contains no value the code never writes.
- The response schema
targetType enum includes scim_token.
- The
metadata schema includes scim_token as a known key.
- The page documents
since, until, page, and perPage as query parameters, and X-Total-Count and Link as response headers.
- The page still renders cleanly (Mintlify) and
yarn workspace @sourcebot/web openapi:generate is not affected (the openapi file already documents all of this).
Title: docs(ee/audit): action type table is out of sync with code
The
Audit action typestable indocs/docs/configuration/audit-logs.mdx(lines 113-150) is missing 4 entries that the code actually writes, and has 1 stale entry that the code does not write.Missing entries (in code, not in docs)
org.member_deactivated—packages/web/src/features/membership/membership.service.ts:305-310(target typeuser)org.member_reactivated—packages/web/src/features/membership/membership.service.ts:353-358(target typeuser)scim_token.created—packages/web/src/ee/features/scim/actions.ts:75-84(target typescim_token, metadata{ scim_token: <name> })scim_token.deleted—packages/web/src/ee/features/scim/actions.ts:112-121(target typescim_token, metadata{ scim_token: <name> })Stale entry (in docs, not in code)
user.delete(line 127) — nocreateAudit({ action: "user.delete", ... })orcreateAudit({ action: "user.deleted", ... })call exists inpackages/. Closest active entry isuser.readin the EE user GET handler.Related gaps in the same file
targetTypeenum in the response schema (line 197) is missingscim_tokenas a value.since,until,page,perPage) and the response headers (X-Total-Count,Link) are documented indocs/api-reference/sourcebot-public.openapi.jsonand the correspondingpublicApiDocument.tsregistration, but not in the.mdxpage. The page only shows a single unparameterisedcurlexample.metadataschema (line 201-218) is missingscim_tokenas a known key (used by the two newscim_token.*actions).Proposed fix
Update
docs/docs/configuration/audit-logs.mdxso the action type table, the targetType enum, and the metadata schema all reflect the actual code. Remove the staleuser.deleterow. Add a short section documenting the four query parameters and the two response headers, with onecurlexample showing time-range filtering and one showing paginated traversal. No code or behaviour changes; no changelog entry needed (docs only).Acceptance criteria
.mdxcontains everyactionvalue that anycreateAudit/createAuditActioncall writes, and contains no value the code never writes.targetTypeenum includesscim_token.metadataschema includesscim_tokenas a known key.since,until,page, andperPageas query parameters, andX-Total-CountandLinkas response headers.yarn workspace @sourcebot/web openapi:generateis not affected (the openapi file already documents all of this).