Skip to content

Commit 4599fd3

Browse files
committed
wip
1 parent 12ebb13 commit 4599fd3

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/Actions/StoreInboundWebhook.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Basement\Webhooks\Actions;
44

5+
use Basement\Webhooks\Contracts\InboundWebhookContract;
56
use Basement\Webhooks\Enums\InboundWebhookSource;
67
use Basement\Webhooks\Models\InboundWebhook;
78

89
class StoreInboundWebhook
910
{
10-
public function store(InboundWebhookSource $source, string $event, string $url, array|string $payload): void
11+
public function store(InboundWebhookContract $source, string $event, string $url, array|string $payload): void
1112
{
1213
InboundWebhook::query()->create([
1314
'source' => $source->value,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Basement\Webhooks\Contracts;
4+
5+
use BackedEnum;
6+
7+
interface InboundWebhookContract extends BackedEnum
8+
{
9+
10+
}

src/Enums/InboundWebhookSource.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace Basement\Webhooks\Enums;
44

55
use BackedEnum;
6+
use Basement\Webhooks\Contracts\InboundWebhookContract;
67
use Filament\Support\Colors\Color;
78
use Filament\Support\Contracts\HasColor;
89
use Filament\Support\Contracts\HasIcon;
910
use Filament\Support\Contracts\HasLabel;
1011
use Filament\Support\Icons\Heroicon;
1112
use Illuminate\Contracts\Support\Htmlable;
1213

13-
enum InboundWebhookSource: string implements HasColor, HasIcon, HasLabel
14+
enum InboundWebhookSource: string implements HasColor, HasIcon, HasLabel, InboundWebhookContract
1415
{
1516
case Resend = 'resend';
1617

0 commit comments

Comments
 (0)