Problem/Motivation
As a site admin, I want the acquia_dam_webhooks submodule scaffolded with its .info.yml + .services.yml and a AcquiaDamWebhookClient service owning all webhook API methods, so that webhook API concerns are fully self-contained in the submodule (parent AcquiaDamClient has zero webhook code) and the submodule can be enabled as a standalone opt-in feature.
Context
The 6 webhook CRUD/ping methods live in AcquiaDamWebhookClient inside the submodule.
The parent AcquiaDamClient should remain free of webhook-specific code.
AcquiaDamWebhookClient delegates HTTP transport to AcquiaDamClientFactory::getSiteClient() and exception translation to DamExceptionHandler.
Acceptance Criteria
AcquiaDamWebhookClientexists inDrupal\acquia_dam_webhooks\Client\AcquiaDamWebhookClient.- It owns all 6 webhook API methods:
createWebhook(string $event_type, string $delivery_url, string $secret_key): array—POST /v2/webhooks/configurationslistWebhooks(): array—GET /v2/webhooks/configurationsgetWebhook(string $id): array—GET /v2/webhooks/configurations/{id}updateWebhook(string $id, array $data): array—PUT /v2/webhooks/configurations/{id}deleteWebhook(string $id): bool—DELETE /v2/webhooks/configurations/{id}returnsTRUEon 204pingWebhook(string $id): bool—GET /v2/webhooks/configurations/{id}/pingreturnsTRUEon 200
- It injects
AcquiaDamClientFactoryfor HTTP transport viagetSiteClient(). - It injects
DamExceptionHandlerfor exception translation. - All methods follow the existing pattern: try/catch +
DamExceptionHandler::handle()→DamClientException/DamServerException/DamConnectException. - Registered as
acquia_dam_webhooks.clientinacquia_dam_webhooks.services.yml. acquia_dam_webhooks.info.ymldeclaresdependencies: [acquia_dam:acquia_dam]andpackage: 'Acquia DAM'.acquia_dam_webhooks.services.ymlregistersacquia_dam_webhooks.clientand theacquia_dam_webhooks.webhook_managerservice (constructor injectsAcquiaDamWebhookClient— all DAM webhook API calls route throughacquia_dam_webhooks.client).
Issue fork acquia_dam-3611278
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rajeshreeputraComment #4
rajeshreeputraRequesting review.
Comment #5
rajeshreeputraComment #6
rajeshreeputraComment #8
rajeshreeputraMR merged!