feat(hub): Ticket-Settings, Projektliste und Import ueber den Hub
This commit is contained in:
@@ -217,4 +217,15 @@ public interface IWorkerClient : INotifyPropertyChanged
|
||||
/// <summary>Starts TokenTracker's local dashboard on the worker and returns its URL; opening
|
||||
/// the browser is the caller's job.</summary>
|
||||
Task<TokenTrackerDashboardDto?> OpenTokenTrackerDashboardAsync();
|
||||
|
||||
Task<TicketSettingsDto?> GetTicketSettingsAsync();
|
||||
Task SetTicketApiBaseUrlAsync(string? baseUrl);
|
||||
Task SetTicketTokenAsync(string token);
|
||||
Task ClearTicketTokenAsync();
|
||||
Task<TicketConnectionDto?> TestTicketConnectionAsync();
|
||||
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
|
||||
/// the footer error strip.</summary>
|
||||
Task<TicketImportResultDto> ImportTicketsAsync(string listId);
|
||||
}
|
||||
|
||||
@@ -706,6 +706,27 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
|
||||
public Task<TokenTrackerDashboardDto?> OpenTokenTrackerDashboardAsync()
|
||||
=> TryInvokeAsync<TokenTrackerDashboardDto>("OpenTokenTrackerDashboard");
|
||||
|
||||
public Task<TicketSettingsDto?> GetTicketSettingsAsync()
|
||||
=> TryInvokeAsync<TicketSettingsDto>("GetTicketSettings");
|
||||
|
||||
public Task SetTicketApiBaseUrlAsync(string? baseUrl)
|
||||
=> InvokeTimedAsync("SetTicketApiBaseUrl", () => _hub.InvokeAsync("SetTicketApiBaseUrl", baseUrl));
|
||||
|
||||
public Task SetTicketTokenAsync(string token)
|
||||
=> InvokeTimedAsync("SetTicketToken", () => _hub.InvokeAsync("SetTicketToken", token));
|
||||
|
||||
public Task ClearTicketTokenAsync()
|
||||
=> InvokeTimedAsync("ClearTicketToken", () => _hub.InvokeAsync("ClearTicketToken"));
|
||||
|
||||
public Task<TicketConnectionDto?> TestTicketConnectionAsync()
|
||||
=> TryInvokeAsync<TicketConnectionDto>("TestTicketConnection");
|
||||
|
||||
public async Task<List<TicketProjectDto>> GetTicketProjectsAsync()
|
||||
=> await TryInvokeAsync<List<TicketProjectDto>>("GetTicketProjects") ?? [];
|
||||
|
||||
public Task<TicketImportResultDto> ImportTicketsAsync(string listId)
|
||||
=> InvokeTimedAsync<TicketImportResultDto>("ImportTickets", () => _hub.InvokeAsync<TicketImportResultDto>("ImportTickets", listId));
|
||||
|
||||
// IWorkerClient explicit implementations (drop typed return values)
|
||||
async Task IWorkerClient.StartPlanningSessionAsync(string taskId, CancellationToken ct)
|
||||
=> await StartPlanningSessionAsync(taskId, ct);
|
||||
|
||||
Reference in New Issue
Block a user