Browse Source

fix: Expose task type on CoreTaskProcessingTask json

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/45094/head
Marcel Klehr 1 month ago
parent
commit
9a2cd6b914
2 changed files with 3 additions and 1 deletions
  1. 1
    0
      core/ResponseDefinitions.php
  2. 2
    1
      lib/public/TaskProcessing/Task.php

+ 1
- 0
core/ResponseDefinitions.php View File

@@ -194,6 +194,7 @@ namespace OCA\Core;
*
* @psalm-type CoreTaskProcessingTask = array{
* id: ?int,
* type: string,
* status: 0|1|2|3|4|5,
* userId: ?string,
* appId: string,

+ 2
- 1
lib/public/TaskProcessing/Task.php View File

@@ -193,12 +193,13 @@ final class Task implements \JsonSerializable {
}

/**
* @psalm-return array{id: ?int, status: self::STATUS_*, userId: ?string, appId: string, input: ?array<array-key, mixed>, output: ?array<array-key, mixed>, identifier: ?string, completionExpectedAt: ?int, progress: ?float}
* @psalm-return array{id: ?int, type: string, status: self::STATUS_*, userId: ?string, appId: string, input: ?array<array-key, mixed>, output: ?array<array-key, mixed>, identifier: ?string, completionExpectedAt: ?int, progress: ?float}
* @since 30.0.0
*/
public function jsonSerialize(): array {
return [
'id' => $this->getId(),
'type' => $this->getTaskTypeId(),
'status' => $this->getStatus(),
'userId' => $this->getUserId(),
'appId' => $this->getAppId(),

Loading…
Cancel
Save