feat(hub): Azure DevOps PAT settings and connection test

This commit is contained in:
mika kuns
2026-10-01 12:06:56 +02:00
parent bc959f25b3
commit fed0b6ac51
5 changed files with 70 additions and 1 deletions
@@ -252,6 +252,10 @@ public interface IWorkerClient : INotifyPropertyChanged
Task SetTicketTokenAsync(string token);
Task ClearTicketTokenAsync();
Task<TicketConnectionDto?> TestTicketConnectionAsync();
Task<AzureDevOpsSettingsDto?> GetAzureDevOpsSettingsAsync();
Task SetAzureDevOpsTokenAsync(string token);
Task ClearAzureDevOpsTokenAsync();
Task<AzureDevOpsConnectionDto?> TestAzureDevOpsConnectionAsync();
Task<List<TicketProjectDto>> GetTicketProjectsAsync();
/// <summary>Imports open tickets assigned to the token owner into the given list. Throws
/// HubException (with a user-readable message) on failure so the caller can surface it via
+12
View File
@@ -776,6 +776,18 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
public Task<TicketConnectionDto?> TestTicketConnectionAsync()
=> TryInvokeAsync<TicketConnectionDto>("TestTicketConnection");
public Task<AzureDevOpsSettingsDto?> GetAzureDevOpsSettingsAsync()
=> TryInvokeAsync<AzureDevOpsSettingsDto>("GetAzureDevOpsSettings");
public Task SetAzureDevOpsTokenAsync(string token)
=> InvokeTimedAsync("SetAzureDevOpsToken", () => _hub.InvokeAsync("SetAzureDevOpsToken", token));
public Task ClearAzureDevOpsTokenAsync()
=> InvokeTimedAsync("ClearAzureDevOpsToken", () => _hub.InvokeAsync("ClearAzureDevOpsToken"));
public Task<AzureDevOpsConnectionDto?> TestAzureDevOpsConnectionAsync()
=> TryInvokeAsync<AzureDevOpsConnectionDto>("TestAzureDevOpsConnection");
public async Task<List<TicketProjectDto>> GetTicketProjectsAsync()
=> await TryInvokeAsync<List<TicketProjectDto>>("GetTicketProjects") ?? [];