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

  • AcquiaDamWebhookClient exists in Drupal\acquia_dam_webhooks\Client\AcquiaDamWebhookClient.
  • It owns all 6 webhook API methods:
    • createWebhook(string $event_type, string $delivery_url, string $secret_key): arrayPOST /v2/webhooks/configurations
    • listWebhooks(): arrayGET /v2/webhooks/configurations
    • getWebhook(string $id): arrayGET /v2/webhooks/configurations/{id}
    • updateWebhook(string $id, array $data): arrayPUT /v2/webhooks/configurations/{id}
    • deleteWebhook(string $id): boolDELETE /v2/webhooks/configurations/{id} returns TRUE on 204
    • pingWebhook(string $id): boolGET /v2/webhooks/configurations/{id}/ping returns TRUE on 200
  • It injects AcquiaDamClientFactory for HTTP transport via getSiteClient().
  • It injects DamExceptionHandler for exception translation.
  • All methods follow the existing pattern: try/catch + DamExceptionHandler::handle()DamClientException / DamServerException / DamConnectException.
  • Registered as acquia_dam_webhooks.client in acquia_dam_webhooks.services.yml.
  • acquia_dam_webhooks.info.yml declares dependencies: [acquia_dam:acquia_dam] and package: 'Acquia DAM'.
  • acquia_dam_webhooks.services.yml registers acquia_dam_webhooks.client and the acquia_dam_webhooks.webhook_manager service (constructor injects AcquiaDamWebhookClient — all DAM webhook API calls route through acquia_dam_webhooks.client).

Issue fork acquia_dam-3611278

Command icon 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

rajeshreeputra created an issue. See original summary.

rajeshreeputra’s picture

Issue summary: View changes

rajeshreeputra’s picture

Status: Active » Needs review

Requesting review.

rajeshreeputra’s picture

Assigned: rajeshreeputra » Unassigned
Issue summary: View changes
rajeshreeputra’s picture

Title: Create WebhookApiClient » Create AcquiaDamWebhookClient and Submodule Scaffold.

rajeshreeputra’s picture

Status: Needs review » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.