From bb34014a072ceb8bfd386ef5c8ff03c31b7448b0 Mon Sep 17 00:00:00 2001 From: Timothy Date: Tue, 7 Jul 2026 13:34:53 +0200 Subject: [PATCH] chore(api): regenerate OpenAPI spec + SPA types for logs/troubleshoot-info (#145) --- ErsatzTV/wwwroot/openapi/v1.json | 440 +++++++++++++++++++++++++++++++ web/src/api/generated/v1.d.ts | 16 ++ 2 files changed, 456 insertions(+) diff --git a/ErsatzTV/wwwroot/openapi/v1.json b/ErsatzTV/wwwroot/openapi/v1.json index 2b7057dc0..dea50d788 100644 --- a/ErsatzTV/wwwroot/openapi/v1.json +++ b/ErsatzTV/wwwroot/openapi/v1.json @@ -2663,6 +2663,65 @@ } } }, + "/api/logs": { + "get": { + "tags": [ + "Logs" + ], + "summary": "Get recent log entries", + "operationId": "GetLogs", + "parameters": [ + { + "name": "pageNum", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + }, + { + "name": "filter", + "in": "query", + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PagedLogEntriesResponseModel" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedLogEntriesResponseModel" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PagedLogEntriesResponseModel" + } + } + } + } + } + } + }, "/api/maintenance/gc": { "get": { "tags": [ @@ -5432,6 +5491,303 @@ } } }, + "/api/troubleshoot/info": { + "get": { + "tags": [ + "Troubleshooting" + ], + "summary": "Get troubleshooting diagnostic info", + "operationId": "GetTroubleshootingInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/TroubleshootingInfoResponseModel" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/TroubleshootingInfoResponseModel" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/TroubleshootingInfoResponseModel" + } + } + } + } + } + } + }, + "/api/troubleshoot/playback.m3u8": { + "head": { + "tags": [ + "Troubleshooting" + ], + "summary": "Start a troubleshooting playback session", + "parameters": [ + { + "name": "mediaItem", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "channel", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ffmpegProfile", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "streamingMode", + "in": "query", + "schema": { + "$ref": "#/components/schemas/StreamingMode" + } + }, + { + "name": "watermark", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "graphicsElement", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "streamSelector", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleId", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "seekSeconds", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "start", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "tags": [ + "Troubleshooting" + ], + "summary": "Start a troubleshooting playback session", + "parameters": [ + { + "name": "mediaItem", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "channel", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ffmpegProfile", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "streamingMode", + "in": "query", + "schema": { + "$ref": "#/components/schemas/StreamingMode" + } + }, + { + "name": "watermark", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "graphicsElement", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "streamSelector", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleId", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "seekSeconds", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "start", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/troubleshoot/playback/archive": { + "head": { + "tags": [ + "Troubleshooting" + ], + "summary": "Download the last troubleshooting playback session archive", + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "tags": [ + "Troubleshooting" + ], + "summary": "Download the last troubleshooting playback session archive", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/troubleshoot/playback/sample/{mediaItemId}": { + "head": { + "tags": [ + "Troubleshooting" + ], + "summary": "Download a media sample archive for troubleshooting", + "parameters": [ + { + "name": "mediaItemId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "tags": [ + "Troubleshooting" + ], + "summary": "Download a media sample archive for troubleshooting", + "parameters": [ + { + "name": "mediaItemId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/version": { "get": { "tags": [ @@ -8027,6 +8383,26 @@ } } }, + "LogEntryResponseModel": { + "required": [ + "timestamp", + "level", + "message" + ], + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "level": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, "LogEventLevel": { "enum": [ "Verbose", @@ -8371,6 +8747,25 @@ } } }, + "PagedLogEntriesResponseModel": { + "required": [ + "totalCount", + "page" + ], + "type": "object", + "properties": { + "totalCount": { + "type": "integer", + "format": "int32" + }, + "page": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LogEntryResponseModel" + } + } + } + }, "PagedPlayoutItemsResponseModel": { "required": [ "totalCount", @@ -9456,6 +9851,45 @@ ], "type": "string" }, + "TroubleshootingInfoResponseModel": { + "required": [ + "generalJson", + "nvidiaCapabilities", + "qsvCapabilities", + "vaapiCapabilities", + "videoToolboxCapabilities" + ], + "type": "object", + "properties": { + "generalJson": { + "type": "string" + }, + "nvidiaCapabilities": { + "type": [ + "null", + "string" + ] + }, + "qsvCapabilities": { + "type": [ + "null", + "string" + ] + }, + "vaapiCapabilities": { + "type": [ + "null", + "string" + ] + }, + "videoToolboxCapabilities": { + "type": [ + "null", + "string" + ] + } + } + }, "UiSettingsResponseModel": { "required": [ "isDarkMode", @@ -10403,6 +10837,9 @@ { "name": "Libraries" }, + { + "name": "Logs" + }, { "name": "Maintenance" }, @@ -10427,6 +10864,9 @@ { "name": "Smart Collections" }, + { + "name": "Troubleshooting" + }, { "name": "Version" }, diff --git a/web/src/api/generated/v1.d.ts b/web/src/api/generated/v1.d.ts index f3af9078b..24c1859e5 100644 --- a/web/src/api/generated/v1.d.ts +++ b/web/src/api/generated/v1.d.ts @@ -451,6 +451,11 @@ export interface components { "LibraryScanStatusResponseModel": { "libraryId": number; "percent": number; + }; + "LogEntryResponseModel": { + "timestamp": string; + "level": string; + "message": string; }; "LogEventLevel": "Verbose" | "Debug" | "Information" | "Warning" | "Error" | "Fatal"; "LoggingSettingsResponseModel": { @@ -518,6 +523,10 @@ export interface components { "PagedLibraryBrowseItemsResponseModel": { "totalCount": number; "page": Array; + }; + "PagedLogEntriesResponseModel": { + "totalCount": number; + "page": Array; }; "PagedPlayoutItemsResponseModel": { "totalCount": number; @@ -720,6 +729,13 @@ export interface components { "StartType": "Dynamic" | "Fixed"; "StreamingMode": "TransportStream" | "HttpLiveStreamingDirect" | "HttpLiveStreamingSegmenter" | "TransportStreamHybrid"; "TailMode": "None" | "Offline" | "Slate" | "Filler"; + "TroubleshootingInfoResponseModel": { + "generalJson": string; + "nvidiaCapabilities": null | string; + "qsvCapabilities": null | string; + "vaapiCapabilities": null | string; + "videoToolboxCapabilities": null | string; + }; "UiSettingsResponseModel": { "isDarkMode": boolean; "language": string;