mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-16 05:31:52 -04:00
Fix export.
This commit is contained in:
+186
-148
@@ -8371,7 +8371,150 @@
|
||||
"description": "Just enough user information to list bans.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Pick<User,\"_id\"|\"username\"|\"avatar\">"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "Id",
|
||||
"pattern": "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"description": "Username",
|
||||
"minLength": 2,
|
||||
"maxLength": 32,
|
||||
"pattern": "^[a-zA-Z0-9_.]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "Attachment ID",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"$ref": "#/definitions/AttachmentTag"
|
||||
},
|
||||
"size": {
|
||||
"description": "File size (in bytes)",
|
||||
"type": "number"
|
||||
},
|
||||
"filename": {
|
||||
"description": "File name",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Metadata",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"File"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Text"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Audio"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Image"
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
},
|
||||
"height": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"height",
|
||||
"type",
|
||||
"width"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Video"
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
},
|
||||
"height": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"height",
|
||||
"type",
|
||||
"width"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"content_type": {
|
||||
"description": "Content type",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"_id",
|
||||
"content_type",
|
||||
"filename",
|
||||
"metadata",
|
||||
"size",
|
||||
"tag"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"_id",
|
||||
"username"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bans": {
|
||||
@@ -8414,153 +8557,6 @@
|
||||
"users"
|
||||
],
|
||||
"definitions": {
|
||||
"Pick<User,\"_id\"|\"username\"|\"avatar\">": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "User ID",
|
||||
"pattern": "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"description": "Username",
|
||||
"minLength": 2,
|
||||
"maxLength": 32,
|
||||
"pattern": "^[a-zA-Z0-9_.]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"description": "User avatar",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "Attachment ID",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"$ref": "#/definitions/AttachmentTag"
|
||||
},
|
||||
"size": {
|
||||
"description": "File size (in bytes)",
|
||||
"type": "number"
|
||||
},
|
||||
"filename": {
|
||||
"description": "File name",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Metadata",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"File"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Text"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Audio"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Image"
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
},
|
||||
"height": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"height",
|
||||
"type",
|
||||
"width"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Video"
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
},
|
||||
"height": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"height",
|
||||
"type",
|
||||
"width"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"content_type": {
|
||||
"description": "Content type",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"_id",
|
||||
"content_type",
|
||||
"filename",
|
||||
"metadata",
|
||||
"size",
|
||||
"tag"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"_id",
|
||||
"username"
|
||||
]
|
||||
},
|
||||
"AttachmentTag": {
|
||||
"description": "Attachment tag",
|
||||
"enum": [
|
||||
@@ -16151,6 +16147,48 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"SetSettingsData": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"definitions": {
|
||||
"AttachmentTag": {
|
||||
"description": "Attachment tag",
|
||||
"enum": [
|
||||
"attachments",
|
||||
"avatars",
|
||||
"backgrounds",
|
||||
"banners",
|
||||
"icons"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"RelationshipStatus": {
|
||||
"description": "Your relationship with the user",
|
||||
"enum": [
|
||||
"Blocked",
|
||||
"BlockedOther",
|
||||
"Friend",
|
||||
"Incoming",
|
||||
"None",
|
||||
"Outgoing",
|
||||
"User"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"Presence": {
|
||||
"description": "User presence",
|
||||
"enum": [
|
||||
"Busy",
|
||||
"Idle",
|
||||
"Invisible",
|
||||
"Online"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Id": {
|
||||
"description": "Id",
|
||||
"pattern": "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}",
|
||||
|
||||
@@ -301,15 +301,19 @@ resource('/servers/:server/bans', {
|
||||
...serverParams,
|
||||
...await success("Bans", schema`
|
||||
import type { Id } from './_common';
|
||||
import type { User } from './Users';
|
||||
import type { Ban } from './Servers';
|
||||
import type { Username } from './Users';
|
||||
import type { Attachment } from './Autumn';
|
||||
|
||||
type ${'ServerBans'} = {
|
||||
/**
|
||||
* Just enough user information to list bans.
|
||||
*/
|
||||
users: Pick<User, '_id' | 'username' | 'avatar'>[]
|
||||
users: {
|
||||
_id: Id
|
||||
username: Username
|
||||
avatar?: Attachment
|
||||
}[]
|
||||
|
||||
/**
|
||||
* Ban List
|
||||
|
||||
Reference in New Issue
Block a user