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
12 changes: 12 additions & 0 deletions openapi/components/paths/invite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ paths:
- apiKeyCookie: []
authCookie: []
description: Sends an invite to a user. Returns the Notification of type `invite` that was sent.
requestBody:
content:
application/json:
schema:
$ref: ../requests/InviteRequest.yaml
description: Instance ID when inviting a user.
'/invite/{notificationId}/response':
parameters:
- $ref: ../parameters.yaml#/notificationId
Expand All @@ -119,6 +125,12 @@ paths:
- apiKeyCookie: []
authCookie: []
description: Sends a world invite to a user.
requestBody:
content:
application/json:
schema:
$ref: ../requests/InviteResponse.yaml
description: Instance ID when inviting a user.
'/requestInvite/{userId}':
parameters:
- $ref: ../parameters.yaml#/userId
Expand Down
7 changes: 7 additions & 0 deletions openapi/components/requests/InviteRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: InviteRequest
type: object
properties:
instanceId:
$ref: ../schemas/InstanceID.yaml
required:
- instanceId
9 changes: 9 additions & 0 deletions openapi/components/requests/InviteResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
responseSlot:
type: integer
minimum: 0
maximum: 11
required:
- responseSlot
title: InviteResponse
3 changes: 1 addition & 2 deletions openapi/components/schemas/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ properties:
type: boolean
default: false
id:
type: string
minLength: 1
$ref: ./InstanceID.yaml
instanceId:
type: string
minLength: 1
Expand Down
4 changes: 4 additions & 0 deletions openapi/components/schemas/InstanceID.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: InstanceID
type: string
pattern: '(wrld|wld)_[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}:(\d+)(~region\(([\w]+)\))?(~([\w]+)\(usr_([\w-]+)\)((\~canRequestInvite)?)(~region\(([\w].+)\))?~nonce\((.+)\))?'
example: wrld_ba913a96-fac4-4048-a062-9aa5db092812:123456
1 change: 1 addition & 0 deletions openapi/components/schemas/InviteMessage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ properties:
slot:
type: integer
minimum: 0
maximum: 11
message:
type: string
minLength: 1
Expand Down