-
Notifications
You must be signed in to change notification settings - Fork 45
Audit Log Typings #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lillithrosepup
wants to merge
12
commits into
vrchatapi:main
Choose a base branch
from
lillithrosepup:feat/audit-log-types
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Audit Log Typings #611
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a997dc4
Initial impl for group audit log typings
lillithrosepup a9634f5
Fix linting
lillithrosepup 0fbcc29
created_at is snakecase
lillithrosepup ca49d57
Add a fallback for untyped group audit logs
lillithrosepup 6355aab
lint wants a newline
lillithrosepup 1c1301c
refactor(schemas): type GroupAuditLogEntry as a base plus a oneOf of …
ariesclark 00f3f14
refactor(schemas): share audit log payloads and type targetId per event
ariesclark 3d9a350
feat(schemas): fall back to GroupAuditLogEntryUnknown for unmapped ev…
ariesclark e450b3c
Fix loose targetId typings
lillithrosepup 1535289
add downlevel vendor extension
lillithrosepup b278a70
Type group.update fully
lillithrosepup 6c32f5e
Group role update
lillithrosepup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,5 @@ | ||
| title: GroupAuditLogEntry | ||
| type: object | ||
| properties: | ||
| actorDisplayName: | ||
| type: string | ||
| actorId: | ||
| $ref: ./UserID.yaml | ||
| created_at: | ||
| type: string | ||
| format: date-time | ||
| data: | ||
| type: object | ||
| description: The data associated with the event. The format of this data is dependent on the event type. | ||
| examples: | ||
| - description: | ||
| new: "My exciting new group. It's pretty nifty!" | ||
| old: "My exciting new group. It's pretty nifty!" | ||
| joinState: | ||
| new: request | ||
| old: closed | ||
| description: | ||
| type: string | ||
| description: A human-readable description of the event. | ||
| examples: | ||
| - Group role updated | ||
| eventType: | ||
| $ref: ./GroupAuditLogEntryType.yaml | ||
| groupId: | ||
| $ref: ./GroupID.yaml | ||
| id: | ||
| $ref: ./GroupAuditLogID.yaml | ||
| targetId: | ||
| type: string | ||
| description: Typically a UserID, GroupID, GroupRoleID, or Location, but could be other types of IDs. | ||
| description: A group audit log entry. The shape of `data` depends on `eventType`. | ||
| allOf: | ||
| - $ref: ./GroupAuditLogEntryBase.yaml | ||
| - $ref: ./GroupAuditLogEntryEvent.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| title: GroupAuditLogEntryBase | ||
| type: object | ||
| properties: | ||
| actorDisplayName: | ||
| type: string | ||
| description: The display name of the user who performed the action. | ||
| actorId: | ||
| $ref: ./UserID.yaml | ||
| description: The ID of the user who performed the action. | ||
| created_at: | ||
| type: string | ||
| description: When the action was performed. | ||
| format: date-time | ||
| description: | ||
| type: string | ||
| description: A human-readable description of the event. | ||
| eventType: | ||
| $ref: ./GroupAuditLogEntryType.yaml | ||
| description: The type of event that occurred. | ||
| groupId: | ||
| $ref: ./GroupID.yaml | ||
| description: The ID of the group the entry belongs to. | ||
| id: | ||
| $ref: ./GroupAuditLogID.yaml | ||
| description: The unique ID of this audit log entry. | ||
| required: | ||
| - actorDisplayName | ||
| - actorId | ||
| - created_at | ||
| - description | ||
| - eventType | ||
| - groupId | ||
| - id |
11 changes: 11 additions & 0 deletions
11
openapi/components/schemas/GroupAuditLogEntryBooleanChange.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| title: GroupAuditLogEntryBooleanChange | ||
| type: object | ||
| description: A boolean field's value before and after an update. | ||
| properties: | ||
| new: | ||
| type: boolean | ||
| old: | ||
| type: boolean | ||
| required: | ||
| - new | ||
| - old |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| title: GroupAuditLogEntryDataEmpty | ||
| type: object | ||
| additionalProperties: false | ||
| properties: {} |
26 changes: 26 additions & 0 deletions
26
openapi/components/schemas/GroupAuditLogEntryDataGroupAnnouncement.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| title: GroupAuditLogEntryDataGroupAnnouncement | ||
| type: object | ||
| properties: | ||
| authorId: | ||
| $ref: ./UserID.yaml | ||
| description: The ID of the announcement author. | ||
| imageId: | ||
| description: The image file ID attached to the announcement. | ||
| anyOf: | ||
| - $ref: ./FileID.yaml | ||
| - type: "null" | ||
| sendNotification: | ||
| type: boolean | ||
| description: Whether a notification was sent for this announcement. | ||
| text: | ||
| type: string | ||
| description: The text content of the announcement. | ||
| title: | ||
| type: string | ||
| description: The title of the announcement. | ||
| required: | ||
| - authorId | ||
| - imageId | ||
| - sendNotification | ||
| - text | ||
| - title |
25 changes: 25 additions & 0 deletions
25
openapi/components/schemas/GroupAuditLogEntryDataGroupCalendarEventCreate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| title: GroupAuditLogEntryDataGroupCalendarEventCreate | ||
| type: object | ||
| properties: | ||
| accessType: | ||
| $ref: ./CalendarEventAccess.yaml | ||
| description: | ||
| type: string | ||
| description: The description of the calendar event. | ||
| imageId: | ||
| description: The image file ID for the event. | ||
| anyOf: | ||
| - $ref: ./FileID.yaml | ||
| - type: "null" | ||
| title: | ||
| type: string | ||
| description: The title of the calendar event. | ||
| type: | ||
| type: string | ||
| description: The type of calendar entry. | ||
| required: | ||
| - accessType | ||
| - description | ||
| - imageId | ||
| - title | ||
| - type |
125 changes: 125 additions & 0 deletions
125
openapi/components/schemas/GroupAuditLogEntryDataGroupCalendarEventDelete.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| title: GroupAuditLogEntryDataGroupCalendarEventDelete | ||
| type: object | ||
| properties: | ||
| category: | ||
| type: string | ||
| description: The category of the event. | ||
| closeInstanceAfterEndMinutes: | ||
| type: integer | ||
| description: Minutes after the event ends to close the instance. | ||
| createdAt: | ||
| type: string | ||
| description: The creation timestamp. | ||
| format: date-time | ||
| deletedAt: | ||
| type: | ||
| - string | ||
| - "null" | ||
| description: The deletion timestamp. | ||
| format: date-time | ||
| durationInMs: | ||
| type: integer | ||
| description: The duration of the event in milliseconds. | ||
| endsAt: | ||
| type: string | ||
| description: The end timestamp. | ||
| format: date-time | ||
| featured: | ||
| type: boolean | ||
| description: Whether the event is featured. | ||
| guestEarlyJoinMinutes: | ||
| type: integer | ||
| description: Minutes before the start that guests can join. | ||
| hostEarlyJoinMinutes: | ||
| type: integer | ||
| description: Minutes before the start that hosts can join. | ||
| interestedUserCount: | ||
| type: integer | ||
| description: The number of interested users. | ||
| isDraft: | ||
| type: boolean | ||
| description: Whether the event is a draft. | ||
| languages: | ||
| type: array | ||
| description: The languages for the event. | ||
| items: | ||
| type: string | ||
| occurrenceKind: | ||
| $ref: ./CalendarEventOccurrenceKind.yaml | ||
| occurrenceModified: | ||
| type: | ||
| - string | ||
| - "null" | ||
| ownerId: | ||
| $ref: ./GroupID.yaml | ||
| description: The ID of the group that owns the event. | ||
| platforms: | ||
| type: array | ||
| description: The supported platforms. | ||
| items: | ||
| type: string | ||
| recurrence: | ||
| description: The recurrence rule. | ||
| anyOf: | ||
| - $ref: ./CalendarEventRecurrence.yaml | ||
| - type: "null" | ||
| roleIds: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: Group roles that may join this event. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| seriesId: | ||
| type: | ||
| - string | ||
| - "null" | ||
| description: The ID of the recurring series the event belongs to. | ||
| shortCode: | ||
| type: | ||
| - string | ||
| - "null" | ||
| description: The short code. | ||
| startsAt: | ||
| type: string | ||
| description: The start timestamp. | ||
| format: date-time | ||
| tags: | ||
| type: array | ||
| description: The event tags. | ||
| items: | ||
| type: string | ||
| updatedAt: | ||
| type: string | ||
| description: The last update timestamp. | ||
| format: date-time | ||
| usesInstanceOverflow: | ||
| type: boolean | ||
| description: Whether the event uses instance overflow. | ||
| required: | ||
| - category | ||
| - closeInstanceAfterEndMinutes | ||
| - createdAt | ||
| - deletedAt | ||
| - durationInMs | ||
| - endsAt | ||
| - featured | ||
| - guestEarlyJoinMinutes | ||
| - hostEarlyJoinMinutes | ||
| - interestedUserCount | ||
| - isDraft | ||
| - languages | ||
| - occurrenceKind | ||
| - occurrenceModified | ||
| - ownerId | ||
| - platforms | ||
| - recurrence | ||
| - roleIds | ||
| - seriesId | ||
| - shortCode | ||
| - startsAt | ||
| - tags | ||
| - updatedAt | ||
| - usesInstanceOverflow | ||
| allOf: | ||
| - $ref: ./GroupAuditLogEntryDataGroupCalendarEventCreate.yaml |
48 changes: 48 additions & 0 deletions
48
openapi/components/schemas/GroupAuditLogEntryDataGroupGalleryCreate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| title: GroupAuditLogEntryDataGroupGalleryCreate | ||
| type: object | ||
| properties: | ||
| description: | ||
| type: string | ||
| description: The gallery description. | ||
| membersOnly: | ||
| type: boolean | ||
| description: Whether the gallery is members only. | ||
| name: | ||
| type: string | ||
| description: The gallery name. | ||
| roleIdsToAutoApprove: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: The role IDs whose submissions are approved automatically. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| roleIdsToManage: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: The role IDs that can manage the gallery. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| roleIdsToSubmit: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: The role IDs that can submit to the gallery. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| roleIdsToView: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: The role IDs that can view the gallery. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| required: | ||
| - description | ||
| - membersOnly | ||
| - name | ||
| - roleIdsToAutoApprove | ||
| - roleIdsToManage | ||
| - roleIdsToSubmit | ||
| - roleIdsToView |
16 changes: 16 additions & 0 deletions
16
openapi/components/schemas/GroupAuditLogEntryDataGroupGalleryDelete.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| title: GroupAuditLogEntryDataGroupGalleryDelete | ||
| type: object | ||
| properties: | ||
| createdAt: | ||
| type: string | ||
| description: The creation timestamp of the gallery. | ||
| format: date-time | ||
| updatedAt: | ||
| type: string | ||
| description: The last update timestamp of the gallery. | ||
| format: date-time | ||
| required: | ||
| - createdAt | ||
| - updatedAt | ||
| allOf: | ||
| - $ref: ./GroupAuditLogEntryDataGroupGalleryCreate.yaml |
8 changes: 8 additions & 0 deletions
8
openapi/components/schemas/GroupAuditLogEntryDataGroupGalleryUpdate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: GroupAuditLogEntryDataGroupGalleryUpdate | ||
| type: object | ||
| description: Carries only the fields the update changed. | ||
| properties: | ||
| membersOnly: | ||
| $ref: ./GroupAuditLogEntryBooleanChange.yaml | ||
| name: | ||
| $ref: ./GroupAuditLogEntryStringChange.yaml |
12 changes: 12 additions & 0 deletions
12
openapi/components/schemas/GroupAuditLogEntryDataGroupInstanceAnnouncement.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| title: GroupAuditLogEntryDataGroupInstanceAnnouncement | ||
| type: object | ||
| properties: | ||
| message: | ||
| type: string | ||
| description: The announcement message. | ||
| title: | ||
| type: string | ||
| description: The announcement title. | ||
| required: | ||
| - message | ||
| - title |
15 changes: 15 additions & 0 deletions
15
openapi/components/schemas/GroupAuditLogEntryDataGroupInstanceClose.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| title: GroupAuditLogEntryDataGroupInstanceClose | ||
| type: object | ||
| properties: | ||
| groupAccessType: | ||
| $ref: ./GroupAccessType.yaml | ||
| roleIds: | ||
| type: | ||
| - array | ||
| - "null" | ||
| description: The role IDs that have access to the instance. | ||
| items: | ||
| $ref: ./GroupRoleID.yaml | ||
| required: | ||
| - groupAccessType | ||
| - roleIds |
17 changes: 17 additions & 0 deletions
17
openapi/components/schemas/GroupAuditLogEntryDataGroupInstanceCreate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| title: GroupAuditLogEntryDataGroupInstanceCreate | ||
| type: object | ||
| properties: | ||
| calendarEntryId: | ||
| description: The calendar entry ID if the instance was created from a calendar event. | ||
| anyOf: | ||
| - $ref: ./CalendarID.yaml | ||
| - type: "null" | ||
| groupAccessType: | ||
| $ref: ./GroupAccessType.yaml | ||
| roleIds: | ||
| $ref: ./GroupRoleIDList.yaml | ||
| description: The role IDs that have access to the instance. | ||
| required: | ||
| - calendarEntryId | ||
| - groupAccessType | ||
| - roleIds |
8 changes: 8 additions & 0 deletions
8
openapi/components/schemas/GroupAuditLogEntryDataGroupInstanceModeration.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: GroupAuditLogEntryDataGroupInstanceModeration | ||
| type: object | ||
| properties: | ||
| location: | ||
| $ref: ./LocationID.yaml | ||
| description: The instance the target was kicked from or warned in. | ||
| required: | ||
| - location |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.