fix: Expose task type on CoreTaskProcessingTask json

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/45094/head
Marcel Klehr 4 weeks ago
parent 3593d9b631
commit 9a2cd6b914

@ -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,

@ -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