WebhookApplicationInterface
Interface added to an Application class to mark it as webhook-aware. Implement it alongside ApplicationAbstract (or any of its descendants).
PHP currently uses this interface as the canonical webhook integration path. The Node.js SDK has additionally introduced an AWebhookApplication abstract base class plus a WebhookSubscription::create factory; the equivalent PHP base class is planned but not yet shipped. Until then, implement this interface directly. The node and topology arguments of the WebhookSubscription constructor are accepted for backwards compatibility but ignored — those values come from the UI through WebhookConfig.
use Hanaboso\PipesPhpSdk\Application\Manager\Webhook\WebhookApplicationInterface;
Methods you implement #
| Method | Returns | Purpose |
|---|---|---|
getWebhookSubscriptions() | WebhookSubscription[] | Available subscriptions: event name, parameters, default topology + node. |
getWebhookSubscribeRequestDto(ApplicationInstall $install, WebhookSubscription $subscription, string $url) | RequestDto | HTTP request that registers a webhook with the third-party API. |
getWebhookUnsubscribeRequestDto(ApplicationInstall $install, Webhook $webhook) | RequestDto | HTTP request that removes a webhook by id. |
processWebhookSubscribeResponse(ResponseDto $response, ApplicationInstall $install) | string | Reads the third-party response and returns the external webhook id. |
processWebhookUnsubscribeResponse(ResponseDto $response) | bool | Confirms the unsubscribe request succeeded. |
See also #
- Development: Patterns / Webhooks
- ApplicationAbstract
- Node.js equivalent:
IWebhookApplication