Skip to content

Add missing resources from our API to the SDK#67

Merged
mattiasgeniar merged 11 commits intomainfrom
update-new-api-endpoints
Feb 17, 2026
Merged

Add missing resources from our API to the SDK#67
mattiasgeniar merged 11 commits intomainfrom
update-new-api-endpoints

Conversation

@mattiasgeniar
Copy link
Copy Markdown
Contributor

@mattiasgeniar mattiasgeniar commented Feb 14, 2026

Why

The Oh Dear API has introduced several new endpoints since v4.4.1 that the SDK didn't support yet. This PR adds support for all missing API endpoints and improves the robustness of existing DTOs.

What changed

New endpoints

  • AI responses (get, list, latest)
  • DNS blocklist history items (get, list)
  • Ports history items (get, list)
  • Domain info
  • Notification destinations (team, tag, tag group — full CRUD)
  • Recurring maintenance periods (full CRUD)
  • Status page update templates (full CRUD)
  • Tags (create, list)
  • Tag groups (full CRUD)
  • Additional status page endpoints (create, add/delete monitors, get updates, update updates)
  • Additional monitor endpoints (get by URL, add to broken links whitelist, delete/update notification destinations, check summary)
  • Application health check snooze/unsnooze
  • Cron check definitions sync

New DTOs

  • AiResponse, DnsBlocklistHistoryItem, DomainInfo, PortsHistoryItem, RecurringMaintenancePeriod, StatusPageUpdateTemplate, Tag, TagGroup

New properties on existing DTOs

  • Check: added averageResponseTimeInMs
  • Monitor: added type, portsCheckSettings, dnsBlocklistCheckSettings, aiCheckSettings
  • StatusPage: added preventIndexing, addHstsHeader
  • CheckType enum: added DnsBlocklist, Ports, Ai

Improved null-safety

  • Several DTO fromResponse methods now use ?? null / ?? [] defaults for fields that the API may omit, preventing errors on partial responses (ApplicationHealthCheck, ApplicationHealthCheckHistoryItem, BrokenLink, DetectedCertificate, DnsHistoryItem, DowntimePeriod, LighthouseReport, StatusPage)

Housekeeping

  • Removed dev-only test scripts and vlucas/phpdotenv dev dependency
  • Added laravel/pint as dev dependency for CI formatting
  • Dropped PHP 8.1 from CI matrix
  • Updated README with documentation for all new endpoints
  • Removed docblock comments from CertificateHealth helper methods (no functional change)
  • Minor refactor of OhDearException constructor and ValidationException::getAllErrorMessages()

Risks

This PR is fully backwards compatible with v4.4.1. Specifically:

  • No existing methods removed or renamed — all public methods from v4.4.1 remain unchanged
  • No constructor signature changesOhDear constructor is identical
  • No existing DTO properties removed — new properties on existing DTOs all have default values (null, false, '', []), so existing code that constructs DTOs manually will continue to work
  • No dependency changes — runtime dependencies (saloonphp/saloon, saloonphp/pagination-plugin) and their version constraints are unchanged
  • No PHP version requirement changes — still ^8.1
  • Null-safety improvements are non-breaking — adding ?? null defaults to fromResponse methods only makes the DTOs more tolerant of partial API responses, not less

The only changes to existing code are cosmetic (removed docblocks, reformatted exception constructor, simplified getAllErrorMessages()), none of which affect the public API.

@mattiasgeniar mattiasgeniar merged commit 5044b07 into main Feb 17, 2026
14 checks passed
@mattiasgeniar mattiasgeniar deleted the update-new-api-endpoints branch February 17, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant