Skip to content

Commit

Permalink
Update OCP
Browse files Browse the repository at this point in the history
  • Loading branch information
nextcloud-command committed Jul 2, 2024
1 parent 6a23d33 commit 55a0fed
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
21 changes: 21 additions & 0 deletions OCP/AppFramework/Http/Attribute/ExAppRequired.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCP\AppFramework\Http\Attribute;

use Attribute;

/**
* Attribute for controller methods that can only be accessed by ExApps
*
* @since 30.0.0
*/
#[Attribute]
class ExAppRequired {
}
22 changes: 20 additions & 2 deletions OCP/TaskProcessing/IManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public function hasProviders(): bool;
*/
public function getProviders(): array;

/**
* @param string $taskType
* @return IProvider
* @throws Exception
* @since 30.0.0
*/
public function getPreferredProvider(string $taskType);

/**
* @return array<string,array{name: string, description: string, inputShape: ShapeDescriptor[], optionalInputShape: ShapeDescriptor[], outputShape: ShapeDescriptor[], optionalOutputShape: ShapeDescriptor[]}>
* @since 30.0.0
Expand Down Expand Up @@ -101,13 +109,14 @@ public function setTaskResult(int $id, ?string $error, ?array $result): void;
public function setTaskProgress(int $id, float $progress): bool;

/**
* @param string|null $taskTypeId
* @param list<string> $taskTypeIds
* @param list<int> $taskIdsToIgnore
* @return Task
* @throws Exception If the query failed
* @throws NotFoundException If no task could not be found
* @since 30.0.0
*/
public function getNextScheduledTask(?string $taskTypeId = null): Task;
public function getNextScheduledTask(array $taskTypeIds = [], array $taskIdsToIgnore = []): Task;

/**
* @param int $id The id of the task
Expand Down Expand Up @@ -154,4 +163,13 @@ public function getUserTasksByApp(?string $userId, string $appId, ?string $custo
* @since 30.0.0
*/
public function prepareInputData(Task $task): array;

/**
* Changes the task status to STATUS_RUNNING and, if successful, returns True.
*
* @param Task $task
* @return bool
* @since 30.0.0
*/
public function lockTask(Task $task): bool;
}
16 changes: 16 additions & 0 deletions OCP/User/IOutOfOfficeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* endDate: int,
* shortMessage: string,
* message: string,
* replacementUserId: string,
* replacementUserDisplayName: string
* }
*
* @since 28.0.0
Expand Down Expand Up @@ -69,6 +71,20 @@ public function getShortMessage(): string;
*/
public function getMessage(): string;

/**
* Get the replacement user id for auto responders and similar
*
* @since 30.0.0
*/
public function getReplacementUserId(): string;

/**
* Get the replacement user displayName for auto responders and similar
*
* @since 30.0.0
*/
public function getReplacementUserDisplayName(): string;

/**
* @return OutOfOfficeData
*
Expand Down

0 comments on commit 55a0fed

Please sign in to comment.