Skip to content

Add /domains/{name}/is-available/ endpoint#1291

Draft
oguzkocer wants to merge 10 commits intotrunkfrom
domains-is-available
Draft

Add /domains/{name}/is-available/ endpoint#1291
oguzkocer wants to merge 10 commits intotrunkfrom
domains-is-available

Conversation

@oguzkocer
Copy link
Copy Markdown
Contributor

Adds RestV1_3 namespace, DomainName newtype, and DomainAvailability response type covering all API fields.

@oguzkocer oguzkocer added this to the 0.2 milestone Apr 19, 2026
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 19, 2026

XCFramework Build

This PR's XCFramework is available for testing. Add to your Package.swift:

.package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1291")

Built from 52feb0f

oguzkocer added 10 commits May 7, 2026 22:04
Adds `RestV1_3` namespace, `DomainName` newtype, and
`DomainAvailability` response type covering all API fields.
Includes anonymized test fixtures for 5 status categories
(available, blacklisted, transferrable, tld_not_supported,
hsts_required) and e2e tests.
The backend's Store_Price::amount() returns a float, not cents.
Consistent with how domain suggestions already use Decimal2 for
these same fields. Also normalize None assertions to use is_none().
Fields added: sale_cost, is_price_limit_exceeded,
is_supported_premium_domain, other_site_domain, transferrability,
maintenance_end_time, is_dot_gay_notice_required,
cannot_transfer_due_to_unsupported_premium_tld, and
trademark_claims_notice_info. Also updates status doc comment with
comprehensive list from the backend implementation.
Add DomainAvailabilityParams with blog_id (WpComSiteId),
is_cart_pre_check, and vendor — matching the backend's accepted
query parameters for the v1.3 is-available endpoint.
Also add dot-gay-notice fixture from real API response with
is_dot_gay_notice_required and gay_accept_requirements policy notice.
- Replace stringly-typed status field with DomainAvailabilityStatus
  enum covering all known backend values, with Other(String) fallback.
- Remove unnecessary deserialize_json_value_as_string helper and
  trademark_claims_notice_info field (rare TMCH case, complex opaque
  structure not worth modeling).
- Remove redundant #[serde(default)] on Option<T> fields.
Define CurrencyCode in wp_com module (alongside WpComSiteId) and
use it for currency_code fields in PaidDomainSuggestion and
DomainAvailability.
@oguzkocer oguzkocer force-pushed the domains-is-available branch from 9330ada to 52feb0f Compare May 8, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants