mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 08:14:55 +08:00
@@ -264,6 +264,15 @@ type ScheduleRunParams struct {
|
||||
MaxRuns *uint64 `json:"max_runs,omitempty"`
|
||||
}
|
||||
|
||||
// TranslationTaskUpdateParams is used by translation.task.update to persist
|
||||
// provider worker state for one task in the current official release.
|
||||
type TranslationTaskUpdateParams struct {
|
||||
TaskID string `json:"task_id"`
|
||||
Status string `json:"status"`
|
||||
FailureReason string `json:"failure_reason,omitempty"`
|
||||
ProviderRunID string `json:"provider_run_id,omitempty"`
|
||||
}
|
||||
|
||||
// Ack is returned by accepted daemon control methods.
|
||||
type Ack struct {
|
||||
Command string `json:"command"`
|
||||
@@ -483,6 +492,10 @@ func (c *Client) ScheduleRun(ctx context.Context, params ScheduleRunParams) (jso
|
||||
return c.rawData(ctx, "schedule.run", params)
|
||||
}
|
||||
|
||||
func (c *Client) TranslationTaskUpdate(ctx context.Context, params TranslationTaskUpdateParams) (json.RawMessage, error) {
|
||||
return c.rawData(ctx, "translation.task.update", params)
|
||||
}
|
||||
|
||||
func (c *Client) CatalogStatus(ctx context.Context) (json.RawMessage, error) {
|
||||
return c.rawData(ctx, "catalog.status", nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user