aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-05-23 11:19:27 +0200
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-06-11 14:10:29 +0200
commit8d18607f8029606381489dccd6c66efdffb842f0 (patch)
treebfa88d28b3d784ceaa732feb63d8e0081c972239 /lib/public
parent81e90ae592ffb48e4420e235729494ebc01b44b4 (diff)
downloadnextcloud-server-8d18607f8029606381489dccd6c66efdffb842f0.tar.gz
nextcloud-server-8d18607f8029606381489dccd6c66efdffb842f0.zip
feat: Add support for webhook listeners
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/AppFramework/Bootstrap/IRegistrationContext.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
index b86f7bcd76d..17040ccfb4f 100644
--- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
+++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
@@ -121,6 +121,22 @@ interface IRegistrationContext {
public function registerEventListener(string $event, string $listener, int $priority = 0): void;
/**
+ * Register a webhook listener
+ *
+ * @psalm-template T of \OCP\EventDispatcher\Event
+ * @param class-string<T> $event The fully-qualified class name of the Event sub class to listen for
+ * @param string $method The HTTP method to use (usually 'GET' or 'POST')
+ * @param string $listenerUri The absolute URI to contact
+ * @param array $options Additional options for the request, {@see \OCP\Http\Client::request()}
+ * @param int $priority The higher this value, the earlier an event
+ * listener will be triggered in the chain (defaults to 0)
+ *
+ * @since 30.0.0
+ */
+ public function registerWebhookEventListener(string $event, string $method, string $listenerUri, array $options = [], int $priority = 0): void;
+
+
+ /**
* @param string $class
* @param bool $global load this middleware also for requests of other apps? Added in Nextcloud 26
* @psalm-param class-string<\OCP\AppFramework\Middleware> $class