Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 23 additions & 42 deletions openapi/components/schemas/Notification.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
title: Notification
type: object
properties:
created_at:
type: string
format: date-time
details:
type: string
description: "**NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType."
default: "{}"
examples:
- "OneOf: {}, NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick"
id:
type: string
minLength: 1
message:
type: string
examples:
- This is a generated invite to VRChat Hub
receiverUserId:
$ref: ./UserID.yaml
description: Not included in notification objects received from the REST API
seen:
type: boolean
description: Not included in notification objects received from the Websocket API
default: false
senderUserId:
$ref: ./UserID.yaml
senderUsername:
type:
- string
- "null"
description: The name of the user who sent the notification.
minLength: 1
type:
$ref: ./NotificationType.yaml
required:
- created_at
- details
- id
- message
- senderUserId
- type
description: A notification. The shape of `details` depends on `type`.
discriminator:
defaultMapping: ./NotificationUnknown.yaml
mapping:
boop: ./NotificationBoop.yaml
friendRequest: ./NotificationFriendRequest.yaml
invite: ./NotificationInvite.yaml
inviteResponse: ./NotificationInviteResponse.yaml
message: ./NotificationMessage.yaml
requestInvite: ./NotificationRequestInvite.yaml
requestInviteResponse: ./NotificationRequestInviteResponse.yaml
votetokick: ./NotificationVoteToKick.yaml
propertyName: type
oneOf:
- $ref: ./NotificationBoop.yaml
- $ref: ./NotificationFriendRequest.yaml
- $ref: ./NotificationInvite.yaml
- $ref: ./NotificationInviteResponse.yaml
- $ref: ./NotificationMessage.yaml
- $ref: ./NotificationRequestInvite.yaml
- $ref: ./NotificationRequestInviteResponse.yaml
- $ref: ./NotificationVoteToKick.yaml
- $ref: ./NotificationUnknown.yaml
33 changes: 33 additions & 0 deletions openapi/components/schemas/NotificationBase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
title: NotificationBase
type: object
properties:
created_at:
type: string
format: date-time
id:
type: string
minLength: 1
message:
type: string
examples:
- This is a generated invite to VRChat Hub
receiverUserId:
$ref: ./UserID.yaml
description: Not included in notification objects received from the REST API
seen:
type: boolean
description: Not included in notification objects received from the Websocket API
default: false
senderUserId:
$ref: ./UserID.yaml
senderUsername:
type:
- string
- "null"
description: The name of the user who sent the notification.
minLength: 1
required:
- created_at
- id
- message
- senderUserId
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationBoop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationBoop
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailBoop.yaml
x-vrchat-double-encoding-type: NotificationDetailBoop
type:
type: string
const: boop
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: NotificationDetailFriendRequest
type: object
2 changes: 2 additions & 0 deletions openapi/components/schemas/NotificationDetailMessage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: NotificationDetailMessage
type: object
17 changes: 17 additions & 0 deletions openapi/components/schemas/NotificationFriendRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
title: NotificationFriendRequest
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailFriendRequest.yaml
type:
type: string
const: friendRequest
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationInvite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationInvite
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailInvite.yaml
x-vrchat-double-encoding-type: NotificationDetailInvite
type:
type: string
const: invite
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationInviteResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationInviteResponse
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailInviteResponse.yaml
x-vrchat-double-encoding-type: NotificationDetailInviteResponse
type:
type: string
const: inviteResponse
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
17 changes: 17 additions & 0 deletions openapi/components/schemas/NotificationMessage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
title: NotificationMessage
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailMessage.yaml
type:
type: string
const: message
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationRequestInvite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationRequestInvite
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailRequestInvite.yaml
x-vrchat-double-encoding-type: NotificationDetailRequestInvite
type:
type: string
const: requestInvite
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationRequestInviteResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationRequestInviteResponse
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailRequestInviteResponse.yaml
x-vrchat-double-encoding-type: NotificationDetailRequestInviteResponse
type:
type: string
const: requestInviteResponse
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
24 changes: 24 additions & 0 deletions openapi/components/schemas/NotificationUnknown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
title: NotificationUnknown
type: object
description: A notification whose `type` has no schema of its own.
properties:
details:
type: string
description: A JSON-encoded string.
type:
type: string
not:
enum:
- boop
- friendRequest
- invite
- inviteResponse
- message
- requestInvite
- requestInviteResponse
- votetokick
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
18 changes: 18 additions & 0 deletions openapi/components/schemas/NotificationVoteToKick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title: NotificationVoteToKick
type: object
properties:
details:
type: string
description: A JSON-encoded string.
contentMediaType: application/json
contentSchema:
$ref: ./NotificationDetailVoteToKick.yaml
x-vrchat-double-encoding-type: NotificationDetailVoteToKick
type:
type: string
const: votetokick

Check warning on line 13 in openapi/components/schemas/NotificationVoteToKick.yaml

View workflow job for this annotation

GitHub Actions / lint

Unknown word: "votetokick"
required:
- details
- type
allOf:
- $ref: ./NotificationBase.yaml
8 changes: 8 additions & 0 deletions openapi/components/schemas/WebsocketClearNotification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: WebsocketClearNotification
type: object
properties:
type:
type: string
const: clear-notification
required:
- type
21 changes: 21 additions & 0 deletions openapi/components/schemas/WebsocketContentRefresh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: WebsocketContentRefresh
type: object
properties:
actionType:
$ref: ./WebsocketContentRefreshActionType.yaml
contentType:
$ref: ./WebsocketContentRefreshContentType.yaml
fileId:
$ref: ./FileID.yaml
itemId:
# TODO: is this correct?
$ref: ./InventoryTemplateID.yaml
itemType:
# TODO: is this correct?
$ref: ./InventoryItemType.yaml
required:
- actionType
- contentType
- fileId
- itemId
- itemType
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: WebsocketContentRefreshActionType
type: string
enum:
- add
- created
- delete
- deleted
examples:
- created
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: WebsocketContentRefreshContentType
type: string
# Todo: How to type this, since this is technically a non-exhaustive enum?
15 changes: 15 additions & 0 deletions openapi/components/schemas/WebsocketContentRefreshEncoded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: WebsocketContentRefreshEncoded
type: object
properties:
content:
type: string
contentMediaType: application/json
contentSchema:
$ref: ./WebsocketContentRefresh.yaml
x-vrchat-double-encoding-type: WebsocketContentRefresh
type:
type: string
const: content-refresh
required:
- content
- type
13 changes: 13 additions & 0 deletions openapi/components/schemas/WebsocketFriendActive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: WebsocketFriendActive
type: object
properties:
platform:
$ref: ./Platform.yaml
user:
$ref: ./User.yaml
userId:
$ref: ./UserID.yaml
required:
- platform
- user
- userId
15 changes: 15 additions & 0 deletions openapi/components/schemas/WebsocketFriendActiveEncoded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: WebsocketFriendActiveEncoded
type: object
properties:
content:
type: string
contentMediaType: application/json
contentSchema:
$ref: ./WebsocketFriendActive.yaml
x-vrchat-double-encoding-type: WebsocketFriendActive
type:
type: string
const: friend-active
required:
- content
- type
10 changes: 10 additions & 0 deletions openapi/components/schemas/WebsocketFriendAdd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: WebsocketFriendAdd
type: object
properties:
user:
$ref: ./User.yaml
userId:
$ref: ./UserID.yaml
required:
- user
- userId
15 changes: 15 additions & 0 deletions openapi/components/schemas/WebsocketFriendAddEncoded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: WebsocketFriendAddEncoded
type: object
properties:
content:
type: string
contentMediaType: application/json
contentSchema:
$ref: ./WebsocketFriendAdd.yaml
x-vrchat-double-encoding-type: WebsocketFriendAdd
type:
type: string
const: friend-add
required:
- content
- type
Loading
Loading