Repository navigation
Expand file tree
/
Copy pathclient.json
More file actions
1 lines (1 loc) · 34.1 KB
/
Copy pathclient.json
File metadata and controls
1 lines (1 loc) · 34.1 KB
1
{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Client to Server API"},"servers":[{"url":"https://chat.understars.dev"}],"security":[{"oauth":[]}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"NotFound":{"description":"The requested resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"Unauthorised":{"description":"Unauthorised","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"schemas":{"HttpError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"number"},"detail":{"type":"object","properties":{"body":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","code","path"]}},"param":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","code","path"]}},"query":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["message","code","path"]}}}}},"required":["message","code"]},"PrivateUser":{"allOf":[{"$ref":"#/components/schemas/PublicUser"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}]},"PublicUser":{"type":"object","properties":{"mention":{"$ref":"#/components/schemas/ActorMention"},"name":{"type":"string"},"summary":{"type":"string"},"display_name":{"type":"string"},"avatar":{"type":"string","format":"uri"},"banner":{"type":"string","format":"uri"}},"required":["mention","name","summary","display_name"]},"ActorMention":{"type":"string","pattern":"^.*@.*$"},"AttachmentInitResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hash":{"type":"string"},"url":{"type":"string"}},"required":["id","hash","url"]}},"AttachmentInitRequest":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Client defined ID for cross referencing attachments to output endpoints. Can be any value. Must be unique"},"name":{"type":"string","description":"User defined file name"},"md5":{"type":"string"},"mime":{"type":"string"},"size":{"type":"number","description":"Size in bytes"},"width":{"type":"number"},"height":{"type":"number"}},"required":["id","name","md5","mime","size"]},"maxItems":5},"PublicGuild":{"type":"object","properties":{"mention":{"$ref":"#/components/schemas/ActorMention"},"name":{"type":"string"},"summary":{"type":"string"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/PublicGuildTextChannel"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/PublicRole"}}},"required":["mention","name"]},"PublicGuildTextChannel":{"allOf":[{"$ref":"#/components/schemas/PublicChannel"},{"type":"object","properties":{"guild":{"$ref":"#/components/schemas/ActorMention"}}}]},"PublicChannel":{"type":"object","properties":{"mention":{"$ref":"#/components/schemas/ActorMention"},"name":{"type":"string"}},"required":["mention","name"]},"PublicRole":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"deny":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"guild":{"$ref":"#/components/schemas/ActorMention"},"position":{"type":"number"}},"required":["id","name","allow","deny","guild","position"]},"Permission":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12],"x-enum-varnames":["NONE","OWNER","ADMIN","SEND_MESSAGES","MANAGE_CHANNELS","VIEW_CHANNEL","CALL_CHANNEL","MANAGE_GUILD","MANAGE_INVITES","CREATE_INVITE","UPLOAD","MANAGE_MESSAGES","MANAGE_MEMBERS"]},"PrivateRelationship":{"type":"object","properties":{"created":{"type":"string","format":"date-time"},"user":{"$ref":"#/components/schemas/PublicUser"},"type":{"$ref":"#/components/schemas/RelationshipType"}},"required":["created","user","type"]},"RelationshipType":{"type":"integer","enum":[0,1,2],"x-enum-varnames":["pending","accepted","blocked"]},"PublicDmChannel":{"allOf":[{"$ref":"#/components/schemas/PublicChannel"},{"type":"object","properties":{"owner":{"$ref":"#/components/schemas/ActorMention"},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/ActorMention"}}},"required":["owner","recipients"]}]},"PublicMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"content":{"type":"string"},"published":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"author_id":{"$ref":"#/components/schemas/ActorMention"},"channel_id":{"$ref":"#/components/schemas/ActorMention"},"files":{"type":"array","items":{"$ref":"#/components/schemas/PublicAttachment"}},"embeds":{"type":"array","items":{"$ref":"#/components/schemas/PublicEmbed"}}},"required":["id","content","published","updated","author_id","channel_id","files","embeds"]},"PublicAttachment":{"type":"object","properties":{"name":{"type":"string"},"hash":{"type":"string"},"type":{"type":"string"},"size":{"type":"number"},"width":{"type":["number","null"]},"height":{"type":["number","null"]}},"required":["name","hash","type","size"]},"PublicEmbed":{"type":"object","properties":{"target":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"type":{"type":"integer","enum":[0,1,2,3],"x-enum-varnames":["link","photo","video","rich"]},"title":{"type":"string"},"description":{"type":"string"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"}},"required":["url"]}},"videos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"}},"required":["url"]}},"thumbnail":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"}},"required":["url"]},"author":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}},"footer":{"type":"object","properties":{"text":{"type":"string"},"icon":{"type":"string"}}},"provider":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}}},"required":["target","created_at","type","images","videos"]},"MessageCreateRequest":{"type":"object","properties":{"content":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"hash":{"type":"string"}},"required":["name","hash"]}},"nonce":{"type":"string","format":"uuid"}}},"MessagesResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/PublicMessage"}},"authors":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PublicUser"}}},"required":["messages","authors"]}},"parameters":{}},"paths":{"/upload/":{"put":{"security":[{"oauth":[]}],"tags":["upload"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"t","in":"query"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/oauth/authorize/":{"get":{"security":[{"oauth":[]}],"tags":["oauth"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"client_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"redirect_uri","in":"query"},{"schema":{"type":"string"},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":true,"name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"],"default":"S256"},"required":false,"name":"code_challenge_method","in":"query"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"security":[{"oauth":[]}],"tags":["oauth"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"client_id":{"type":"string","format":"uuid"},"redirect_uri":{"type":"string"},"response_type":{"type":"string"},"scope":{"type":"string"},"state":{"type":"string"},"code_challenge":{"type":"string"},"code_challenge_method":{"type":"string","enum":["S256"],"default":"S256"}},"required":["client_id","response_type","code_challenge"]},{"type":"object","properties":{"allow":{"type":["boolean","null"]},"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}]}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/oauth/token/":{"post":{"security":[{"oauth":[]}],"tags":["oauth"],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/oauth/register/":{"post":{"security":[{"oauth":[]}],"tags":["oauth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","items":{"anyOf":[{"type":"string","enum":["authorization_code"]},{"type":"string","enum":["client_credentials"]},{"type":"string","enum":["refresh_token"]}]}},"client_name":{"type":"string"},"scope":{"type":"string"}},"additionalProperties":{}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/auth/register":{"get":{"tags":["auth"],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"tags":["auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"invite":{"type":"string","description":"Instance registration token"}},"required":["username","password"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/invite/{invite_code}":{"post":{"security":[{"oauth":[]}],"tags":["invite"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"invite_code","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["invite"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"invite_code","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateUser"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"security":[{"oauth":[]}],"tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":["string","null"]},"summary":{"type":["string","null"]},"avatar":{"type":["string","null"]},"banner":{"type":["string","null"]},"current_password":{"type":["string","null"]},"password":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"additionalProperties":false}}}},"responses":{"204":{"description":"","content":{"application/json":{"schema":{"type":"string","enum":["Accepted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/upload/":{"post":{"security":[{"oauth":[]}],"tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInitRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInitResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/guild/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicGuild"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/guild/{guild_id}":{"delete":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"guild_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/channels/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicChannel"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/push/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string","format":"date-time"}},"required":["name","created"]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"security":[{"oauth":[]}],"tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"endpoint":{"type":"string","format":"uri"},"p256dh":{"type":"string"},"auth":{"type":"string"}},"required":["name","endpoint","p256dh","auth"]}}}},"responses":{"204":{"description":"","content":{"application/json":{"schema":{"type":"string","enum":["No Content"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/@me/push/{name}":{"delete":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"name","in":"path"}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"string","enum":["Accepted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/{user_id}/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUser"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/{user_id}/channels/":{"post":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"requestBody":{"content":{"application/jso
8000
n":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChannel"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/{user_id}/relationship/":{"get":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateRelationship"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/RelationshipType"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateRelationship"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["users"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/users/{user_id}/attachments/{hash}":{"get":{"tags":["users"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"hash","in":"path"},{"schema":{"type":"string"},"required":true,"name":"user_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/":{"post":{"security":[{"oauth":[]}],"tags":["guild"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGuild"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/":{"get":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGuild"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"summary":{"type":"string"}},"additionalProperties":false}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/invite":{"post":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiry":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"guild":{"$ref":"#/components/schemas/ActorMention"},"expires":{"type":"string","format":"date-time"}},"required":["code","guild","expires"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/role/{role_id}/":{"get":{"security":[{"oauth":[]}],"tags":["role"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"role_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRole"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"security":[{"oauth":[]}],"tags":["role"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"role_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"deny":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"position":{"type":"number"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRole"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["role"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"role_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/channel/":{"post":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGuildTextChannel"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/roles/":{"post":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/Permission"},"default":[0]},"deny":{"type":"array","items":{"$ref":"#/components/schemas/Permission"},"default":[0]},"position":{"type":"number"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRole"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/members/":{"get":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"page","in":"query"},{"schema":{"type":"number","maximum":50,"minimum":1,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["ASC"]},{"type":"string","enum":["DESC"]}],"default":"DESC"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"username","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"role","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"nickname":{"type":"string"},"user":{"$ref":"#/components/schemas/PublicUser"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","nickname","user","roles"]}},"total":{"type":"number"}},"required":["members","total"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/guild/{guild_id}/members/{user_id}/":{"patch":{"security":[{"oauth":[]}],"tags":["guild"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"guild_id","in":"path"},{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":["string","null"]},"roles":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/":{"get":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicGuildTextChannel"},{"$ref":"#/components/schemas/PublicDmChannel"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/messages/":{"post":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreateRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"get":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"},{"schema":{"type":"number","maximum":50,"minimum":1,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["ASC"]},{"type":"string","enum":["DESC"]}],"default":"DESC"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string"},"required":false,"name":"around","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/call/":{"post":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"ip":{"type":"string"}},"required":["token","ip"]}}}},"202":{"description":"","content":{"application/json":{"schema":{"type":"string","enum":["Accepted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/attachments/":{"post":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInitRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInitResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/attachments/{hash}":{"get":{"tags":["channel"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"hash","in":"path"},{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/channel/{channel_id}/messages/{message_id}/":{"get":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"message_id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"oauth":[]}],"tags":["channel"],"parameters":[{"schema":{"$ref":"#/components/schemas/ActorMention"},"required":true,"name":"channel_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"message_id","in":"path"}],"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorised"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"webhooks":{}}