TenantAtlas/apps/platform/app/Support/Providers/Capabilities/ProviderCapabilityDefinition.php
ahmido 1debe40ced feat: implement provider capability registry (#342)
## Summary
- implement the provider capability registry and derived capability evaluation flow
- update provider connections, onboarding, required-permissions diagnostics, and provider blocker translation to use capability-first summaries
- add bounded unit, feature, and browser test coverage plus the prepared Spec 283 artifacts

## Notes
- branch: `283-provider-capability-registry`
- commit: `74e75c3e`
- no additional validation commands were run in this git/PR flow step

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #342
2026-05-08 21:17:05 +00:00

41 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\Providers\Capabilities;
final readonly class ProviderCapabilityDefinition
{
/**
* @param array<int, string> $operationTypes
* @param array<int, string> $providerRequirementKeys
*/
public function __construct(
public string $key,
public string $label,
public array $operationTypes,
public array $providerRequirementKeys,
public string $defaultReasonCode,
) {}
/**
* @return array{
* key: string,
* label: string,
* operation_types: array<int, string>,
* provider_requirement_keys: array<int, string>,
* default_reason_code: string
* }
*/
public function toArray(): array
{
return [
'key' => $this->key,
'label' => $this->label,
'operation_types' => $this->operationTypes,
'provider_requirement_keys' => $this->providerRequirementKeys,
'default_reason_code' => $this->defaultReasonCode,
];
}
}