aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/TaskProcessing
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2024-07-17 12:35:13 +0200
committerJulien Veyssier <julien-nc@posteo.net>2024-07-22 11:34:29 +0200
commitfffc7847693080318b759bfa0c0a683325b536b5 (patch)
treeba32ce212a605100dddaffb3a93d4b8690b7ac50 /lib/public/TaskProcessing
parentfadef0c7ba8e6e6c52a54c0e0c5c27949b165183 (diff)
downloadnextcloud-server-fffc7847693080318b759bfa0c0a683325b536b5.tar.gz
nextcloud-server-fffc7847693080318b759bfa0c0a683325b536b5.zip
feat(taskprocessing): add support for webhooks (http or AppAPI) in the task processing API
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'lib/public/TaskProcessing')
-rw-r--r--lib/public/TaskProcessing/Task.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/public/TaskProcessing/Task.php b/lib/public/TaskProcessing/Task.php
index 2ec367e4a0a..44834c3b846 100644
--- a/lib/public/TaskProcessing/Task.php
+++ b/lib/public/TaskProcessing/Task.php
@@ -30,6 +30,9 @@ final class Task implements \JsonSerializable {
protected int $lastUpdated;
+ protected ?string $webhookUri = null;
+ protected ?string $webhookMethod = null;
+
/**
* @since 30.0.0
*/
@@ -265,6 +268,40 @@ final class Task implements \JsonSerializable {
}
/**
+ * @return null|string
+ * @since 30.0.0
+ */
+ final public function getWebhookUri(): ?string {
+ return $this->webhookUri;
+ }
+
+ /**
+ * @param string|null $webhookUri
+ * @return void
+ * @since 30.0.0
+ */
+ final public function setWebhookUri(?string $webhookUri): void {
+ $this->webhookUri = $webhookUri;
+ }
+
+ /**
+ * @return null|string
+ * @since 30.0.0
+ */
+ final public function getWebhookMethod(): ?string {
+ return $this->webhookMethod;
+ }
+
+ /**
+ * @param string|null $webhookMethod
+ * @return void
+ * @since 30.0.0
+ */
+ final public function setWebhookMethod(?string $webhookMethod): void {
+ $this->webhookMethod = $webhookMethod;
+ }
+
+ /**
* @param int $status
* @return 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN'
* @since 30.0.0