feat: screenshare hardware acceleration

This commit is contained in:
Hampus Kraft
2026-02-19 16:48:13 +00:00
parent 1a1d13b571
commit 868ddecda4
43 changed files with 1077 additions and 1378 deletions

View File

@@ -22367,485 +22367,6 @@
}
}
},
"/channels/{channel_id}/chunked-uploads": {
"post": {
"operationId": "create_chunked_upload",
"summary": "Initiate a chunked upload session",
"tags": [
"Channels",
"Attachments"
],
"responses": {
"201": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChunkedUploadResponse"
}
}
}
},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized - Authentication is required or the token is invalid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - You do not have permission to perform this action",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}
}
},
"headers": {
"Retry-After": {
"description": "Number of seconds to wait before retrying (only on 429)",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Limit": {
"description": "The number of requests that can be made in the current window",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Remaining": {
"description": "The number of remaining requests that can be made",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Reset": {
"description": "Unix timestamp when the rate limit resets",
"schema": {
"type": "integer"
}
}
}
},
"500": {
"description": "Internal Server Error - An unexpected error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"x-mint": {
"metadata": {
"title": "Initiate a chunked upload session"
}
},
"description": "Creates a new chunked upload session for uploading large files. Returns the upload ID, expected chunk size, and total chunk count. The client should then upload each chunk individually and complete the upload when all chunks are uploaded.",
"security": [
{
"sessionToken": []
}
],
"parameters": [
{
"name": "channel_id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/SnowflakeType"
},
"description": "The ID of the channel"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateChunkedUploadRequest"
}
}
}
}
}
},
"/channels/{channel_id}/chunked-uploads/{upload_id}/chunks/{chunk_index}": {
"put": {
"operationId": "upload_chunk",
"summary": "Upload a file chunk",
"tags": [
"Channels",
"Attachments"
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadChunkResponse"
}
}
}
},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized - Authentication is required or the token is invalid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - You do not have permission to perform this action",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}
}
},
"headers": {
"Retry-After": {
"description": "Number of seconds to wait before retrying (only on 429)",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Limit": {
"description": "The number of requests that can be made in the current window",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Remaining": {
"description": "The number of remaining requests that can be made",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Reset": {
"description": "Unix timestamp when the rate limit resets",
"schema": {
"type": "integer"
}
}
}
},
"500": {
"description": "Internal Server Error - An unexpected error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"x-mint": {
"metadata": {
"title": "Upload a file chunk"
}
},
"description": "Uploads a single chunk of a file as part of a chunked upload session. The chunk index is zero-based. Returns an ETag that must be provided when completing the upload.",
"security": [
{
"sessionToken": []
}
],
"parameters": [
{
"name": "channel_id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/SnowflakeType"
},
"description": "The ID of the channel"
},
{
"name": "upload_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The upload id"
},
{
"name": "chunk_index",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The chunk index"
}
]
}
},
"/channels/{channel_id}/chunked-uploads/{upload_id}/complete": {
"post": {
"operationId": "complete_chunked_upload",
"summary": "Complete a chunked upload",
"tags": [
"Channels",
"Attachments"
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompleteChunkedUploadResponse"
}
}
}
},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized - Authentication is required or the token is invalid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - You do not have permission to perform this action",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}
}
},
"headers": {
"Retry-After": {
"description": "Number of seconds to wait before retrying (only on 429)",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Limit": {
"description": "The number of requests that can be made in the current window",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Remaining": {
"description": "The number of remaining requests that can be made",
"schema": {
"type": "integer"
}
},
"X-RateLimit-Reset": {
"description": "Unix timestamp when the rate limit resets",
"schema": {
"type": "integer"
}
}
}
},
"500": {
"description": "Internal Server Error - An unexpected error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"x-mint": {
"metadata": {
"title": "Complete a chunked upload"
}
},
"description": "Completes a chunked upload session by assembling all uploaded chunks. Requires ETags for all chunks. Returns the upload filename that can be referenced when sending a message with the uploaded file.",
"security": [
{
"sessionToken": []
}
],
"parameters": [
{
"name": "channel_id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/SnowflakeType"
},
"description": "The ID of the channel"
},
{
"name": "upload_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The upload id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompleteChunkedUploadRequest"
}
}
}
}
}
},
"/channels/{channel_id}/invites": {
"post": {
"operationId": "create_channel_invite",
@@ -61112,10 +60633,6 @@
"CANNOT_SHRINK_RESERVED_SLOTS",
"CAPTCHA_REQUIRED",
"CHANNEL_INDEXING",
"CHUNKED_UPLOAD_CHUNK_INDEX_OUT_OF_RANGE",
"CHUNKED_UPLOAD_INCOMPLETE",
"CHUNKED_UPLOAD_NOT_FOUND",
"CHUNKED_UPLOAD_NOT_OWNED",
"COMMUNICATION_DISABLED",
"CONNECTION_ALREADY_EXISTS",
"CONNECTION_INITIATION_TOKEN_INVALID",
@@ -61400,10 +60917,6 @@
"Cannot shrink reserved slots",
"Captcha verification is required",
"Channel is currently being indexed",
"Chunk index is out of range for this upload",
"Not all chunks have been uploaded",
"Chunked upload session was not found",
"You do not own this chunked upload session",
"You are timed out in this guild",
"A connection of this type with this identifier already exists",
"The connection initiation token is invalid or has expired",
@@ -71333,123 +70846,6 @@
}
}
},
"CreateChunkedUploadResponse": {
"type": "object",
"properties": {
"upload_id": {
"type": "string",
"description": "The unique identifier for the upload session"
},
"upload_filename": {
"type": "string",
"description": "The temporary filename used to reference this upload"
},
"chunk_size": {
"type": "integer",
"format": "int53",
"description": "The size of each chunk in bytes"
},
"chunk_count": {
"type": "integer",
"format": "int53",
"description": "The total number of chunks to upload"
}
},
"required": [
"upload_id",
"upload_filename",
"chunk_size",
"chunk_count"
]
},
"CreateChunkedUploadRequest": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The name of the file being uploaded"
},
"file_size": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0,
"format": "int64",
"description": "The total size of the file in bytes"
}
},
"required": [
"filename",
"file_size"
]
},
"UploadChunkResponse": {
"type": "object",
"properties": {
"etag": {
"type": "string",
"description": "The ETag of the uploaded chunk"
}
},
"required": [
"etag"
]
},
"CompleteChunkedUploadResponse": {
"type": "object",
"properties": {
"upload_filename": {
"type": "string",
"description": "The temporary filename used to reference this upload"
},
"file_size": {
"type": "integer",
"format": "int53",
"description": "The total size of the uploaded file in bytes"
},
"content_type": {
"type": "string",
"description": "The MIME type of the uploaded file"
}
},
"required": [
"upload_filename",
"file_size",
"content_type"
]
},
"CompleteChunkedUploadRequest": {
"type": "object",
"properties": {
"etags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"chunk_index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"format": "int64",
"description": "The zero-based index of the chunk"
},
"etag": {
"type": "string",
"description": "The ETag returned when the chunk was uploaded"
}
},
"required": [
"chunk_index",
"etag"
]
},
"minItems": 1,
"description": "Array of chunk ETags in order"
}
},
"required": [
"etags"
]
},
"InviteMetadataResponseSchema": {
"oneOf": [
{
@@ -85997,9 +85393,6 @@
{
"name": "Connections"
},
{
"name": "Attachments"
},
{
"name": "Messages"
},