Skip to content

feat(hostinger): add @distilled.cloud/hostinger SDK - #338

Closed
ebauger wants to merge 1 commit into
alchemy-run:mainfrom
ebauger:feat/hostinger-sdk
Closed

ebauger wants to merge 1 commit into
alchemy-run:mainfrom
ebauger:feat/hostinger-sdk

Conversation

@ebauger

@ebauger ebauger commented Jun 11, 2026

Copy link
Copy Markdown

Adds @distilled.cloud/hostinger — Effect-native SDK for the Hostinger API (VPS, DNS, domains, hosting, billing, reach), generated with create-sdk-full from the official OpenAPI spec (hostinger/api, openapi.json at the repo root, added as a direct submodule).

import { VPSGetDataCenterListV1 } from "@distilled.cloud/hostinger/Operations";

const dataCenters = yield* VPSGetDataCenterListV1({});
  • 128 operations; Bearer auth via HOSTINGER_API_TOKEN ({ apiKey: Redacted, apiBaseUrl } credentials, neon-style)
  • HostingerValidationError carries the per-field details Hostinger attaches to 422s
  • CI wiring for test.yml/nuke.yml

Spec patches (live-verified)

Two patches back deviations observed against the real API:

  • 002-action-state-open-enum: the published enum for action state is success|error|delayed|sent|created, but the live API also returns started (observed on ct_set_hostname and ct_recreate actions) — decoding failed mid-poll, so the patch opens the enum to a plain string.
  • 001-add-subscription-cancel: adds DELETE /api/billing/v1/subscriptions/{subscriptionId}, the endpoint Hostinger's own Terraform provider uses to deprovision a VPS. ⚠️ It is absent from the published spec AND currently returns 404 route-not-found on the public API (probed live 2026-06-11 — the official provider's destroy is equally broken). Kept with that caveat in the patch description since it is the only known VPS deletion path if Hostinger restores it; happy to drop it from this PR if you'd rather not ship a currently-dead operation.

Verified live beyond unit shape-checks: auth + reads, and the full VPS lifecycle driven through an out-of-tree Alchemy provider built on this SDK (purchase → provisioning wait → hostname update via the actions API → docker compose projects → snapshots → auto-renewal disable).

@Mkassabov Mkassabov mentioned this pull request Aug 4, 2026
34 tasks
@Mkassabov
Mkassabov changed the base branch from main to feat/gusto-sdk September 7, 2026 12:20
@Mkassabov
Mkassabov changed the base branch from feat/gusto-sdk to main September 7, 2026 12:24
@Mkassabov
Mkassabov changed the base branch from main to feat/gusto-sdk September 7, 2026 12:26
@Mkassabov
Mkassabov changed the base branch from feat/gusto-sdk to main September 7, 2026 12:27
@Mkassabov

Copy link
Copy Markdown
Collaborator

Superseded by #511, which carries this work on an origin branch so it can be merged as part of the SDK stack (GitHub stacks cannot include fork PRs). Thanks @ebauger — credited there.

@Mkassabov Mkassabov closed this Sep 7, 2026
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.

2 participants