Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Client/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Lettermint\Endpoints\SuppressionsEndpoint;
use Lettermint\Endpoints\TeamEndpoint;
use Lettermint\Endpoints\WebhooksEndpoint;
use Lettermint\Responses\BlockedFileTypesResponse;

/**
* @property-read DomainsEndpoint $domains Access domain operations.
Expand Down Expand Up @@ -68,4 +69,15 @@ public function ping(): string
{
return trim($this->httpClient->getRaw('/v1/ping'));
}

public function blockedFileTypes(): BlockedFileTypesResponse
{
$response = $this->httpClient->get('/v1/blocked-file-types');

if (! is_array($response)) {
throw new \UnexpectedValueException('Expected API response to be an array.');
}

return new BlockedFileTypesResponse($response);
}
}
2 changes: 1 addition & 1 deletion src/Objects/MessageEventData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* @property string $message_id
* @property 'queued'|'processed'|'suppressed'|'delivered'|'soft_bounced'|'hard_bounced'|'spam_complaint'|'failed'|'blocked'|'policy_rejected'|'unsubscribed'|'opened'|'clicked'|'inbound_received'|'inbound_queued'|'inbound_spam_blocked'|'inbound_processed'|'inbound_retry' $event
* @property 'queued'|'processed'|'suppressed'|'delivered'|'auto_replied'|'soft_bounced'|'hard_bounced'|'spam_complaint'|'failed'|'blocked'|'policy_rejected'|'unsubscribed'|'opened'|'clicked'|'inbound_received'|'inbound_queued'|'inbound_spam_blocked'|'inbound_processed'|'inbound_retry' $event
* @property array<string, mixed>|null $metadata
* @property string $timestamp
*/
Expand Down
1 change: 1 addition & 0 deletions src/Objects/ProjectData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @property string $id
* @property string $name
* @property bool $smtp_enabled
* @property bool $redact_email_content
* @property string|null $default_route_id
* @property string|null $token_generated_at
* @property string|null $token_last_used_at
Expand Down
1 change: 1 addition & 0 deletions src/Objects/StoreProjectData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @property string $name
* @property bool $smtp_enabled
* @property 'both'|'transactional'|'broadcast' $initial_routes
* @property bool $short_token
*/
final class StoreProjectData extends Resource
{
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/StoreSuppressionData.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @property string|null $email
* @property 'spam_complaint'|'hard_bounce'|'unsubscribe'|'manual' $reason
* @property 'team'|'project'|'route' $scope
* @property 'global'|'team'|'project'|'route' $scope
* @property string|null $route_id
* @property string|null $project_id
* @property list<string>|null $emails
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/StoreWebhookData.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property string $url
* @property bool|null $enabled
* @property bool|null $include_machine_events
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
*/
final class StoreWebhookData extends Resource
{
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/TeamData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @property string $name
* @property 'personal'|'business' $type
* @property 'free'|'starter'|'growth'|'pro' $plan
* @property 300|10000|50000|125000|500000|750000|1000000|1500000 $tier
* @property 300|10000|50000|125000|300000|500000|750000|1000000|1500000 $tier
* @property string|null $verified_at
* @property list<string> $features
* @property list<\Lettermint\Objects\TeamAddonData> $addons
Expand Down
1 change: 1 addition & 0 deletions src/Objects/UpdateProjectData.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* @property string|null $name
* @property bool|null $smtp_enabled
* @property bool|null $redact_email_content
* @property string|null $default_route_id
*/
final class UpdateProjectData extends Resource
Expand Down
4 changes: 2 additions & 2 deletions src/Objects/UpdateRouteData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

/**
* @property string|null $name
* @property array<string, mixed> $settings
* @property array<string, mixed> $inbound_settings
* @property \Lettermint\Objects\UpdateRouteSettingsData|mixed $settings
* @property \Lettermint\Objects\UpdateRouteInboundSettingsData|mixed $inbound_settings
*/
final class UpdateRouteData extends Resource
{
Expand Down
15 changes: 15 additions & 0 deletions src/Objects/UpdateRouteInboundSettingsData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Lettermint\Objects;

use Lettermint\Resource;

/**
* @property string|null $inbound_domain
* @property float|int|null $inbound_spam_threshold
* @property 'inline'|'url'|mixed $attachment_delivery
*/
final class UpdateRouteInboundSettingsData extends Resource
{
//
}
17 changes: 17 additions & 0 deletions src/Objects/UpdateRouteSettingsData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Lettermint\Objects;

use Lettermint\Resource;

/**
* @property bool|null $track_opens
* @property bool|null $track_clicks
* @property bool|null $disable_plaintext_generation
* @property bool|null $disable_hosted_unsubscribe
* @property bool|null $redact_email_content
*/
final class UpdateRouteSettingsData extends Resource
{
//
}
2 changes: 1 addition & 1 deletion src/Objects/UpdateWebhookData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @property string $url
* @property bool $enabled
* @property bool $include_machine_events
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
*/
final class UpdateWebhookData extends Resource
{
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/WebhookDeliveryData.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @property string $id
* @property string $webhook_id
* @property 'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'pending'|'success'|'failed'|'client_error'|'server_error'|'timeout' $status
* @property int $attempt_number
* @property int|null $http_status_code
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/WebhookDeliveryListData.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @property string $id
* @property string $webhook_id
* @property 'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'pending'|'success'|'failed'|'client_error'|'server_error'|'timeout' $status
* @property int $attempt_number
* @property int|null $http_status_code
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/WebhookListData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @property string $route_id
* @property string $name
* @property string $url
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
* @property list<'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test'> $events
* @property bool $enabled
* @property string|null $last_called_at
* @property string $created_at
Expand Down
14 changes: 14 additions & 0 deletions src/Responses/BlockedFileTypesResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Lettermint\Responses;

use Lettermint\Resource;

/**
* @property list<string> $extensions
* @property list<string> $mime_types
*/
final class BlockedFileTypesResponse extends Resource
{
//
}
1 change: 1 addition & 0 deletions src/Responses/ProjectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @property string $id
* @property string $name
* @property bool $smtp_enabled
* @property bool $redact_email_content
* @property string|null $default_route_id
* @property string|null $token_generated_at
* @property string|null $token_last_used_at
Expand Down
2 changes: 1 addition & 1 deletion src/Responses/TeamResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @property string $name
* @property 'personal'|'business' $type
* @property 'free'|'starter'|'growth'|'pro' $plan
* @property 300|10000|50000|125000|500000|750000|1000000|1500000 $tier
* @property 300|10000|50000|125000|300000|500000|750000|1000000|1500000 $tier
* @property string|null $verified_at
* @property list<string> $features
* @property list<\Lettermint\Objects\TeamAddonData> $addons
Expand Down
2 changes: 1 addition & 1 deletion src/Responses/WebhookDeliveryResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @property string $id
* @property string $webhook_id
* @property 'message.created'|'message.sent'|'message.delivered'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'message.created'|'message.sent'|'message.delivered'|'message.auto_replied'|'message.hard_bounced'|'message.soft_bounced'|'message.spam_complaint'|'message.failed'|'message.suppressed'|'message.unsubscribed'|'message.opened'|'message.clicked'|'message.inbound'|'message.policy_rejected'|'webhook.test' $event_type
* @property 'pending'|'success'|'failed'|'client_error'|'server_error'|'timeout' $status
* @property int $attempt_number
* @property int|null $http_status_code
Expand Down
Loading