feat(api): redirect desktop downloads to pkgs (#2853)

This commit is contained in:
Hampus
2026-09-20 01:20:30 +02:00
committed by GitHub
parent 487febac8e
commit e2abfd476a
47 changed files with 679 additions and 3940 deletions
-472
View File
@@ -4942,380 +4942,6 @@
]
}
},
"/dl/desktop/{channel}/{plat}/{arch}/latest": {
"get": {
"operationId": "get_latest_desktop_version",
"summary": "Get latest desktop version",
"tags": ["Downloads"],
"responses": {
"200": {
"description": "Success",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VersionInfoResponse"}}}
},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}},
"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"}}}
}
},
"description": "Returns metadata for the latest desktop version including download URLs and SHA-256 checksums for all available formats. Pass ?test=1 to resolve against unreleased test builds.",
"parameters": [
{
"name": "channel",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopChannelEnum"},
"description": "The release channel"
},
{
"name": "plat",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopPlatformEnum"},
"description": "The operating system platform"
},
{
"name": "arch",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopArchEnum"},
"description": "The CPU architecture"
},
{
"name": "test",
"in": "query",
"required": false,
"schema": {
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/.",
"type": "string"
},
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/."
}
]
}
},
"/dl/desktop/{channel}/{plat}/{arch}/latest/{format}": {
"get": {
"operationId": "download_latest_desktop_version",
"summary": "Download latest desktop version",
"tags": ["Downloads"],
"responses": {
"200": {
"description": "Success",
"content": {"*/*": {"schema": {"$ref": "#/components/schemas/DownloadFileResponse"}}}
},
"206": {
"description": "Success",
"content": {"*/*": {"schema": {"$ref": "#/components/schemas/DownloadFileResponse"}}}
},
"302": {"description": "Success"},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}},
"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"}}}
}
},
"description": "Streams the latest available desktop application version for the specified platform and architecture. Pass ?test=1 to download an unreleased test build.",
"parameters": [
{
"name": "channel",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopChannelEnum"},
"description": "The release channel"
},
{
"name": "plat",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopPlatformEnum"},
"description": "The operating system platform"
},
{
"name": "arch",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopArchEnum"},
"description": "The CPU architecture"
},
{
"name": "format",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopFormatEnum"},
"description": "The package format"
},
{
"name": "test",
"in": "query",
"required": false,
"schema": {
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/.",
"type": "string"
},
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/."
}
]
}
},
"/dl/desktop/{channel}/{plat}/{arch}/versions": {
"get": {
"operationId": "list_desktop_versions",
"summary": "List desktop versions",
"tags": ["Downloads"],
"responses": {
"200": {
"description": "Success",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesktopVersionsResponse"}}}
},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}},
"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"}}}
}
},
"description": "Lists available desktop versions with pagination for the specified platform and architecture.",
"parameters": [
{
"name": "channel",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopChannelEnum"},
"description": "The release channel"
},
{
"name": "plat",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopPlatformEnum"},
"description": "The operating system platform"
},
{
"name": "arch",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopArchEnum"},
"description": "The CPU architecture"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"default": 25,
"description": "Maximum number of versions to return",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"description": "Maximum number of versions to return"
},
{
"name": "before",
"in": "query",
"required": false,
"schema": {
"description": "Return versions before this version",
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"description": "Return versions before this version"
},
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"description": "Return versions after this version",
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"description": "Return versions after this version"
},
{
"name": "test",
"in": "query",
"required": false,
"schema": {
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/.",
"type": "string"
},
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/."
}
]
}
},
"/dl/desktop/{channel}/{plat}/{arch}/{version}/{format}": {
"get": {
"operationId": "download_desktop_version",
"summary": "Download desktop version",
"tags": ["Downloads"],
"responses": {
"200": {
"description": "Success",
"content": {"*/*": {"schema": {"$ref": "#/components/schemas/DownloadFileResponse"}}}
},
"206": {
"description": "Success",
"content": {"*/*": {"schema": {"$ref": "#/components/schemas/DownloadFileResponse"}}}
},
"302": {"description": "Success"},
"400": {
"description": "Bad Request - The request was malformed or contained invalid data",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
},
"429": {
"description": "Too Many Requests - You are being rate limited",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}},
"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"}}}
}
},
"description": "Streams a specific desktop application version for the given platform and architecture. Pass ?test=1 to download an unreleased test build.",
"parameters": [
{
"name": "channel",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopChannelEnum"},
"description": "The release channel"
},
{
"name": "plat",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopPlatformEnum"},
"description": "The operating system platform"
},
{
"name": "arch",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopArchEnum"},
"description": "The CPU architecture"
},
{
"name": "format",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/DesktopFormatEnum"},
"description": "The package format"
},
{
"name": "version",
"in": "path",
"required": true,
"schema": {"type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Semantic version string"},
"description": "Semantic version string"
},
{
"name": "test",
"in": "query",
"required": false,
"schema": {
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/.",
"type": "string"
},
"description": "When set to 1/true, resolve against the desktop-test/ bucket prefix instead of desktop/."
}
]
}
},
"/donations/checkout": {
"post": {
"operationId": "create_donation_checkout",
@@ -27514,103 +27140,6 @@
"required": ["url"],
"additionalProperties": false
},
"DesktopFormatEnum": {
"description": "The package format",
"x-enumNames": ["Setup", "DMG", "ZIP", "AppImage", "DEB", "RPM", "TAR.GZ", "Portable"],
"x-enumDescriptions": [
"Windows installer executable",
"macOS disk image",
"Compressed archive",
"Linux portable application",
"Debian/Ubuntu package",
"Red Hat/Fedora package",
"Compressed tarball archive",
"Windows portable ZIP archive (no installer, stores data next to the executable)"
],
"enum": ["setup", "dmg", "zip", "appimage", "deb", "rpm", "tar_gz", "portable"],
"type": "string"
},
"DesktopArchEnum": {
"description": "The CPU architecture",
"x-enumNames": ["x64", "ARM64"],
"x-enumDescriptions": [
"64-bit x86 architecture (Intel/AMD)",
"64-bit ARM architecture (Apple Silicon, ARM processors)"
],
"enum": ["x64", "arm64"],
"type": "string"
},
"DesktopPlatformEnum": {
"description": "The operating system platform",
"x-enumNames": ["Windows", "macOS", "Linux"],
"x-enumDescriptions": [
"Microsoft Windows operating system",
"Apple macOS operating system",
"Linux operating system"
],
"enum": ["win32", "darwin", "linux"],
"type": "string"
},
"DesktopChannelEnum": {
"description": "The release channel",
"x-enumNames": ["Stable", "Canary"],
"x-enumDescriptions": [
"The stable release channel for production use",
"The canary release channel for early access to new features"
],
"enum": ["stable", "canary"],
"type": "string"
},
"DownloadFileResponse": {
"type": "string",
"format": "binary",
"contentEncoding": "binary",
"description": "The downloadable release file"
},
"DesktopVersionsResponse": {
"type": "object",
"properties": {
"versions": {
"type": "array",
"items": {"$ref": "#/components/schemas/VersionInfoResponse"},
"description": "Array of available versions"
},
"has_more": {"type": "boolean", "description": "Whether more versions are available to fetch"}
},
"required": ["versions", "has_more"],
"additionalProperties": false
},
"VersionInfoResponse": {
"type": "object",
"properties": {
"version": {"type": "string", "description": "Semantic version string (e.g., 1.0.0)"},
"pub_date": {"type": "string", "description": "ISO 8601 date when this version was published"},
"minimum_system_version": {
"description": "Minimum operating system version required by this release, when applicable",
"type": ["string", "null"]
},
"files": {
"type": "object",
"propertyNames": {"$ref": "#/components/schemas/DesktopFormatEnum"},
"additionalProperties": {
"type": "object",
"properties": {
"url": {"type": "string", "description": "Download URL for this file"},
"sha256": {"description": "SHA-256 hash of the file for verification", "type": ["string", "null"]},
"checksum_url": {
"description": "Plain text .sha256 checksum file URL for this file",
"type": ["string", "null"]
}
},
"required": ["url", "sha256", "checksum_url"],
"additionalProperties": false
},
"description": "Map of package format to download files"
}
},
"required": ["version", "pub_date", "files"],
"additionalProperties": false
},
"DiscoveryGuildListResponse": {
"type": "object",
"properties": {
@@ -34303,7 +33832,6 @@
{"name": "Read States", "description": "Message read state tracking"},
{"name": "Saved Media", "description": "User saved media management"},
{"name": "Themes", "description": "User interface themes"},
{"name": "Downloads", "description": "App downloads"},
{"name": "Reports", "description": "Content reporting"},
{"name": "Instance", "description": "Instance configuration and info"},
{"name": "Billing", "description": "Subscription and payment management via Stripe"},