Skip to content

Audit Log Typings - #611

Open
lillithrosepup wants to merge 12 commits into
vrchatapi:mainfrom
lillithrosepup:feat/audit-log-types
Open

lillithrosepup wants to merge 12 commits into
vrchatapi:mainfrom
lillithrosepup:feat/audit-log-types

Conversation

@lillithrosepup

@lillithrosepup lillithrosepup commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes # No issue submitted, discussed in discord

Evidence

  • Every property, type and example comes from a captured response
    • Pulled latest entry from each audit type my bot has captured. Can provide on request
  • pnpm lint passes
  • pnpm test -w session -w <workflow> passes

@lillithrosepup lillithrosepup changed the title Draft: Audit Log Typings DRAFT: Audit Log Typings Sep 30, 2026
@lillithrosepup
lillithrosepup marked this pull request as draft September 30, 2026 15:11
@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/vrchatapi/specification/vrchat@6c32f5e

commit: 6c32f5e

@lillithrosepup

lillithrosepup commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

TODO:

  • different union fallback
  • check GroupAuditLogEntryDataGroupMemberUserUpdate
  • finish GroupAuditLogEntryDataGroupRoleUpdate
  • finish GroupAuditLogEntryDataGroupUpdate
  • arrazzo tests

Comment thread openapi/components/schemas/GroupAuditLogEntry.yaml
@ariesclark
ariesclark marked this pull request as ready for review October 2, 2026 05:56
Copilot AI balanced review requested due to automatic review settings October 2, 2026 05:56
@ariesclark
ariesclark enabled auto-merge October 2, 2026 05:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It is a DRAFT adding 56 reverse-engineered schemas with new discriminator/allOf patterns and no accompanying test workflow or completed test run, so it needs human verification against captured traffic.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

This PR replaces the previously free-form GroupAuditLogEntry.data (type: object with an inline example) with a fully-typed, discriminated model of VRChat's group audit log. GroupAuditLogEntry is now allOf: [GroupAuditLogEntryBase, GroupAuditLogEntryEvent], where GroupAuditLogEntryEvent is a oneOf keyed by a discriminator on eventType (with a 3.2.1 defaultMapping catch-all to GroupAuditLogEntryUnknown). Each of the 32 known eventTypes gets its own entry schema plus a dedicated data payload schema, with shared primitives (StringChange, BooleanChange, StringListChange, UserIdChange, DataEmpty, DataUnknown) and allOf reuse between create/delete payload pairs. This is a documentation-only change that strengthens generated client typings for the group audit log endpoints. The PR is explicitly marked DRAFT, with the pnpm test -w session -w <workflow> evidence checkbox left unchecked.

Changes:

  • Split GroupAuditLogEntry into a shared base + a discriminated oneOf of 32 event types plus an Unknown fallback.
  • Added per-event data payload schemas, reusing shared change-wrapper and base payload schemas via $ref/allOf.
  • Removed the old inline data/targetId definitions and example from GroupAuditLogEntry.yaml.
File Description
GroupAuditLogEntry.yaml Reworked to allOf of base + event discriminator; drops inline data/targetId/example.
GroupAuditLogEntryBase.yaml New shared fields (actorId, created_at, eventType, groupId, id, etc.).
GroupAuditLogEntryEvent.yaml discriminator + defaultMapping + oneOf over all 32 event schemas and Unknown.
GroupAuditLogEntryUnknown.yaml Catch-all event using eventType with not: enum of the known types.
GroupAuditLogEntryGroup*.yaml (32 files) One wrapper per eventType binding a const eventType, targetId, and a data $ref.
GroupAuditLogEntryDataGroup*.yaml (data payloads) Per-event payload shapes; create/delete pairs share a base via allOf.
GroupAuditLogEntryDataEmpty.yaml /​ DataUnknown.yaml Closed empty payload / open (additionalProperties: true) payload.
GroupAuditLogEntry{String,Boolean,StringList,UserId}Change.yaml Reusable before/after change wrappers for update payloads.

Observations from review: All $ref targets resolve, the discriminator mapping/oneOf/Unknown-not-enum sets are internally consistent, defaultMapping is valid in the 3.2.1 source and stripped by the downlevel plugin for 3.1/3.0 bundles, and the newly introduced allOf composition is handled correctly by close-schemas (unevaluatedProperties). The main substantive issue is inconsistent targetId typing (see inline comment). Per the repo's evidence conventions, the new schemas are not yet backed by any test/arazzo.yaml workflow, and the test checkbox is unchecked.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread openapi/components/schemas/GroupAuditLogEntryGroupUserUnban.yaml Outdated
auto-merge was automatically disabled October 4, 2026 15:31

Head branch was pushed to by a user without write access

Pulled from an active group's logs, a test group's, and some inferred (iconId, nameplateId)
@lillithrosepup

Copy link
Copy Markdown
Contributor Author

@ariesclark re-requesting review, ive double checked everything & implemented the group.(role|member)?.update? log types
Only thing left is arazzo but it would be a whole other task to automate this

@lillithrosepup lillithrosepup changed the title DRAFT: Audit Log Typings Audit Log Typings Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants