Skip to content

Releases: pidginhost/sdk-php

v0.16.0

Choose a tag to compare

@andreeapid andreeapid released this 17 Oct 20:22

PidginHost PHP SDK v0.16.0

Install from Packagist:

composer require pidginhost/sdk:0.16.0

Removed

  • Operations meant only for PidginHost staff or the PidginHost mobile app are
    gone, along with the O API group: KubernetesClustersL3Retrieve,
    KubernetesClustersL3CutoverCreate, KubernetesClustersL3RevertCreate,
    KubernetesClustersEncryptionReconcileCreate,
    KubernetesClustersNodeOperationsResumeCreate,
    KubernetesClustersPoolRemovalJournalsResumeCreate,
    EmailServicesRestoreCreate, OMobileSessionRetrieve,
    OMobileDashboardRetrieve and ORegisterCreate. The
    ClusterEncryptionReconcileRequest and MobileOAuthSession models went
    with them.

v0.15.0

Choose a tag to compare

@andreeapid andreeapid released this 17 Oct 07:06

PidginHost PHP SDK v0.15.0

Install from Packagist:

composer require pidginhost/sdk:0.15.0

Added

  • Account dashboard and session. AccountDashboardRetrieve returns
    Dashboard and AccountSessionRetrieve returns AccountSessionResponse.
  • Domain availability and TLD catalog. DomainDomainCheckAvailabilityRetrieve
    checks a name with a GET, and DomainTldCatalogRetrieve returns TLDCatalog.
    TLD gained min_years and year_step.
  • Hosting usage and upgrades. HostingHostingUsageRetrieve returns
    HostingUsage and HostingHostingUpgradeOptionsRetrieve returns
    HostingUpgradeOptions.
  • Servers, volumes, buckets, private networks, dedicated servers, hosting and
    services gained billing (ResourceBilling): the price and billing cycle,
    or null.
  • DedicatedServer.hardware (DedicatedHardware) describes the machine.
  • InvoiceList and InvoiceDetail gained invoice_type,
    can_pay_with_funds and local_amounts (InvoiceLocalAmounts).
  • Volume.status says whether a volume is active or busy. Volume updates
    answer 409 with VolumeBusy while a resize or move is still running.
  • Kubernetes pool and node deletes take a body, ResourcePoolDeleteRequest
    and NodeOperationDeleteRequest, to accept local data loss.

Changed

  • The domain availability check returns DomainAvailability (available,
    supported), which is what the API sends. CheckAvailability is gone.
  • DNSRecord fields that belong to one record type, such as address or
    txtdata, are optional. Reading a zone with mixed record types no longer
    fails.
  • ClusterDetailRequest and PatchedClusterDetailRequest no longer have
    price_per_month, which the API never let you change.

v0.14.0

Choose a tag to compare

@andreeapid andreeapid released this 02 Oct 19:54

PidginHost PHP SDK v0.14.0

Install from Packagist:

composer require pidginhost/sdk:0.14.0

Added

  • Kubernetes cluster encryption. KubernetesClustersEncryptionRetrieve,
    ...EncryptionCreate, ...EncryptionRecheckCreate and
    ...EncryptionReconcileCreate read and switch Cilium WireGuard encryption,
    with the ClusterEncryption, ClusterEncryptionOperation,
    ClusterEncryptionRequest, ClusterEncryptionReconcileRequest,
    ClusterEncryptionRefusal and ClusterEncryptionError models and the
    ClusterEncryptionStatusEnum, EncryptionModeEnum and
    EncryptionReasonCodeEnum enums.
  • Kubernetes node operations and pool removals. List, read, cancel, resume
    and retry node operations, reboot a pool node, and list, read and resume pool
    removal journals (NodeOperation, PoolRemovalJournal, PoolRemovalItem,
    their paginated lists and enums).
  • Load balancer upgrades: KubernetesClustersUpgradeLbCreate with
    LBUpgradeRequest, LBUpgradePlanResponse and LBUpgradeDispatchResponse.
  • Server traffic: CloudServersTrafficRetrieve returns
    ServerTrafficResponse.
  • PublicIPv4 and PublicIPv6 gained server_id, the id that
    /api/cloud/servers/{id}/ takes, or null when the address is unattached.
  • Server.networks and ServerDetail.networks are typed (ServerNetworks,
    ServerPublicNetwork, ServerPublicInterface, ServerPrivateInterface)
    instead of a free-form map. The JSON is unchanged.
  • Email responses that had no model now have one: EmailStats, StatsDay,
    StatsTotals, EmailReputation, EmailMessageList,
    EmailMessageSummary, EmailSendResponse, ApiCredentialCreated,
    SmtpCredentialCreated and InboundRouteWriteResponse.
  • FeaturesEnum gained lb-envoy-metrics.

Changed

This release is breaking. Request bodies now have their own models, and
several response types were corrected to match what the API already sends.

  • Request bodies have their own ...Request models, without the read-only
    fields of the response. Creating a firewall rule set or an IPv4 address no
    longer needs placeholder values such as id: 0. Pass the request model
    wherever a call takes a body:
    PHP: $cloudApi->cloudFirewallRulesSetCreate(new FirewallRulesSetRequest(['name' => 'web'])).
    • Request-only models renamed from X to XRequest: ActivateFreeDNS, BucketCreate, BucketResize, BucketVisibility, ChangeBillingCycle, ChangeCompany, ChangePassword, ClusterAdd, ContactsUpdate, DNSRecordCreate, DeactivateFreeDNS, DedicatedRDNS, DeleteRecord, DepositCreate, DestroyProtection, DomainAdd, FloatingIPv4Create, FloatingIPv6Create, LowBalanceSettings, NameserversUpdate, PowerAction, PrivateNetworkAddHost, PrivateNetworkRemoveHost, Reinstall, ResourcePoolAdd, ServerAdd, ServerProductUpgrade, SnapshotCreate, Subscribe, TicketCreate, TicketReply.
    • Patch bodies renamed from PatchedX to PatchedXRequest: ClusterDetail, Company, Domain, DomainRegistrant, FirewallRule, FirewallRulesSet, HTTPRoute, K8sPortForward, LBFirewallRule, Profile, ResourcePool, ServerDetail, TCPRoute, UDPRoute.
    • New request models next to unchanged response models: APITokenCreateRequest, AddressRequest, AttachVolumeRequest, CheckAvailabilityRequest, ClusterDetailRequest, CompanyRequest, DNSGlueRequest, DomainCreateRequest, DomainRegistrantRequest, DomainRequest, FirewallRuleRequest, FirewallRulesSetRequest, HTTPRouteRequest, K8sPortForwardRequest, LBFirewallRuleRequest, PrivateNetworkRequest, ProfileRequest, PublicInterfaceRequest, RenewDomainRequest, ResourcePoolRequest, ReverseDNSRequest, SSHKeyRequest, SandboxAddressRequest, ServerDetailRequest, TCPRouteRequest, TransferRoDomainRequest, UDPRouteRequest, VolumeRequest.
    • SSH key, volume, private network and inbound route updates use
      SSHKeyUpdateRequest, VolumeUpdateRequest,
      PrivateNetworkUpdateRequest and InboundRouteCreateRequest (and their
      Patched... forms), which leave out fields an update cannot change.
  • PublicInterface.ipv4 and .ipv6 are always present, as an empty string
    when the interface has no address of that family. Decoding the public
    interface of a server without IPv6 used to fail.
  • SSHKey.key can be set when creating a key (SSHKeyRequest); it stays fixed
    afterwards.
  • PublicIPv4.server and PublicIPv6.server are the server hostname, or an
    empty string when unattached (they were null).
  • Response types corrected to what the API sends:
    DedicatedServer.ips is a list of DedicatedServerIP,
    .server_status is a DedicatedServerStatus and .os_name may be null;
    InvoiceDetail.services is a list of InvoiceService;
    EmailService.price_monthly_eur is a number and .quota_monthly an
    integer; ResourcePool.size, StorageProduct.min_size and .max_size are
    integers; TicketMessage.has_attachment is a boolean; AttachVolume is the
    attach result (attached); ten ClusterDetail fields, three
    HostingService fields, OSImage.family_name and ResourcePoolNode.ip may
    be null.
  • ServerDetail.password is no longer in responses; it is write-only in
    ServerDetailRequest. ResourcePool.new_size moved to ResourcePoolRequest.
  • APITokenCreate and APITokenList mark account and membership_status
    as read-only and optional.
  • Snapshot and boot ISO lists are plain arrays, as the API returns them:
    PaginatedSnapshotList and PaginatedBootISOList are removed.
  • EmailServicesDestroy is removed: the API always answered 405.
  • InboundRoute.mode, the FreeDNS source and SuppressionEntry.reason keep
    their enum names ModeEnum, SourceEnum and ReasonEnum.

Repository

  • The GitHub repository now keeps history: each release is one commit on
    main. Tags up to v0.13.0 remain separate snapshots.

v0.13.0

Choose a tag to compare

@andreeapid andreeapid released this 18 Aug 20:49

PidginHost PHP SDK v0.13.0

Install from Packagist:

composer require pidginhost/sdk:0.13.0

Added

  • Kubernetes port forwards can be called at all now. All six routes under
    /api/kubernetes/clusters/{cluster_id}/port-forwards/ generated with no
    request body and no response model, so this SDK could reach none of them.
    They now expose KubernetesClustersPortForwardsList, ...Retrieve,
    ...Create, ...Update, ...PartialUpdate and ...Destroy, with the new
    K8sPortForward, PatchedK8sPortForward, PaginatedK8sPortForwardList and
    ProtocolEnum models.
  • Gateway route listings are typed and paginated: PaginatedHTTPRouteList,
    PaginatedTCPRouteList and PaginatedUDPRouteList. The list and detail
    reads previously had no response schema at all.
  • NodeMetricsResponse gained disk and maxdisk, which the endpoint has
    always returned but never documented.
  • The node RRD route documents the timeframe query parameter it accepts
    (hour, day, week, month, year), so a window other than the default
    is now reachable.

Changed

This release is breaking. Every change below corrects a type the API was
already sending -- the previous declarations did not describe the wire, so the
affected responses could not be decoded.

  • KubernetesClusters{Httproutes,Tcproutes,Udproutes,PortForwards}Retrieve2
    are removed. Those names existed only because the list and detail reads
    collided on one operation id while the schema was incomplete. The list reads
    are now ...List; the detail reads are ...Retrieve.
  • KubernetesClusters{Httproutes,Tcproutes,Udproutes}Retrieve changed
    meaning
    : it was the list read and is now the detail read. The signature
    changed with it, so this surfaces at compile time rather than silently.
  • NodeMetricsResponse.mem, .maxmem, .netin and .netout widened to 64-bit.
    They are byte counts: a node with 2 GiB of memory reports 2147483648, one
    past the 32-bit range, so these responses failed to decode on essentially
    every real node.
  • ClusterDetail.dual_stack and .talos_upgrade_available are booleans,
    .storage_quota_gb is an integer, .last_pool_used_bytes is a 64-bit
    integer
    and .price_per_hour is a number -- all five were declared as
    strings while sending a bool or a number, which made the whole cluster object
    undecodable.

v0.12.2

Choose a tag to compare

@andreeapid andreeapid released this 18 Aug 13:06

PidginHost PHP SDK v0.12.2

Install from Packagist:

composer require pidginhost/sdk:0.12.2

v0.12.0

Choose a tag to compare

@cristi-boboc cristi-boboc released this 18 Aug 10:19

PidginHost PHP SDK v0.12.0

Install from Packagist:

composer require pidginhost/sdk:0.12.0

Changed (breaking)

  • The eight /api/cloud/buckets/ routes now describe their real request and
    response bodies.
    The bucket viewset advertised its fully read-only Bucket
    serializer as the body of every route, so create, resize and visibility
    documented no writable field to send, and credentials/reveal and
    credentials/rotate claimed to return Bucket while really returning an
    access key and secret. Any client that trusted the documented shape
    read a credential response that could not contain credentials -- and on
    rotate the old keys are already invalidated by then.

    New components: BucketCreate (name, quota_gb, public_read),
    BucketResize (quota_gb), BucketVisibility (public_read),
    BucketCredentials (bucket, endpoint, region, access_key,
    secret_key) and BucketCancelResponse (id, status). create documents
    the 202 it really answers; DELETE returns 202 with a body rather than
    204; the two credential routes take no request body and declare
    Cache-Control: no-store.

  • Decimal fields are now string instead of float. The API serialises every
    DecimalField as a JSON string (Django REST Framework's
    COERCE_DECIMAL_TO_STRING default), and the schema says so:
    type: string, format: decimal. This generator mapped that to float anyway,
    which cannot decode "12.50" -- so every response carrying a price failed
    to parse
    , including Deposit, Invoice, Subscription, Service,
    Profile.funds, TLD pricing, ClusterDetail.price_per_month and
    FundsBalanceResponse.balance. 35 properties across 22 components were
    affected. The Python, JS and Rust SDKs already produced strings; only this
    one and Go did not.

    Read the value as a string and parse it with a decimal type of your choosing.
    Do not use a binary float for money.

Fixed

  • Generator bumped to openapi-generator 7.24.0, which fixes the escaping of
    validate:"regexp=..." struct tags on pattern-constrained fields. No API
    shapes changed.

v0.11.0

Choose a tag to compare

@cristi-boboc cristi-boboc released this 17 Aug 20:56

PidginHost PHP SDK v0.11.0

Install from Packagist:

composer require pidginhost/sdk:0.11.0

Versions v0.8.0 through v0.10.2 shipped without entries in this file. The
Go changelog
records those schema changes; they apply to this SDK too.

Changed (breaking)

  • AttachIPv4 → AttachIPv4Request, AttachIPv6 → AttachIPv6Request. The server attach routes now have distinct request and response components, so the generated request types are renamed.

  • POST /api/cloud/servers/{id}/detach-ipv4/ returns ServerDetachIPv4Response instead of DetachIPv4Response. The detached field is unchanged. DetachIPv4Response still serves the standalone POST /api/cloud/ipv4/{id}/detach/ route.

  • Six enum components renamed off content-derived names. Where several serializers expose a field called status, type or priority over different choice sets, drf-spectacular was naming the component by hashing its values, so adding a single choice silently renamed the type. These are now pinned:

    Was Now
    Priority3cdEnum TicketPriorityEnum
    Status03cEnum InvoiceStatusEnum
    Status63aEnum ServiceStatusEnum
    StatusA57Enum ResourceStatusEnum
    StatusEf2Enum TicketStatusEnum
    Type85bEnum ClusterTypeEnum

    A one-time rename: the names no longer move when a choice set gains a value. ClusterType.type had already been renamed once this way (Type2faEnum → Type85bEnum when beta was added) and now shares the pre-existing ClusterTypeEnum, which carried the identical dev/prod/beta set under a second name.

Added

  • reboot on AttachIPv4Request and AttachIPv6Request (boolean, default false). A public address is written to the machine config and the guest OS only reads it while booting, so on a running server the address is inert until a restart. Set reboot to have the API issue that restart.
  • reboot_required and rebooted on AttachIPv4Response and AttachIPv6Response. attached alone could describe a server that answers neither ping nor SSH on the new address; these say whether a restart is still owed and whether one was performed. A stopped server reports both false and is never booted just to pick the address up, and reboot: true on a rescue-mode or transitioning server keeps reboot_required: true rather than rebooting out of the rescue ISO.
  • AttachIPv6Response is new. POST /api/cloud/servers/{id}/attach-ipv6/ previously echoed the request body back, so there was no attached flag to check.
  • Rescue mode: POST /api/cloud/servers/{id}/rescue/enter/ and .../rescue/exit/, typed as RescueEnterQueued / RescueExitQueued.
  • Boot ISOs: GET /api/cloud/servers/{id}/boot-isos/ with BootISO, PaginatedBootISOList, and IsoBootRequest.
  • Glue / personal-DNS records: /api/domain/domain/{domain}/dns/ and /api/domain/domain/{domain}/dns/{name}/, typed as DNSGlue and PaginatedDNSGlueList.
  • TicketMessage, ServiceCompany, DestroyProtectionResponse, and CategoryEnum.

Fixed

  • attach-ipv4 reports a missing field as a missing field. Omitting ipv4 returned Object with address=None does not exist, which reads as a bad address rather than a bad field name; it is now 400 {"ipv4": ["This field is required."]}.
  • attach-ipv6 rejects a conflicting address with a 400 instead of 200 plus a message, so a failed attach no longer looks like a success. Re-attaching the address a server already has is idempotent.

Notes

In this SDK, model class names match the component names; accessors follow (getRebootRequired()).

v0.10.2

Choose a tag to compare

@cristi-boboc cristi-boboc released this 19 May 07:22

PidginHost PHP SDK v0.10.2

Install from Packagist:

composer require pidginhost/sdk:0.10.2

v0.10.1

Choose a tag to compare

@cristi-boboc cristi-boboc released this 18 May 13:22

PidginHost PHP SDK v0.10.1

Install from Packagist:

composer require pidginhost/sdk:0.10.1

v0.10.0

Choose a tag to compare

@cristi-boboc cristi-boboc released this 18 May 12:06

PidginHost PHP SDK v0.10.0

Install from Packagist:

composer require pidginhost/sdk:0.10.0