github nirvana-labs/nirvana-typescript v1.85.0

latest releases: v1.85.2, v1.85.1
6 hours ago

1.85.0 (2026-05-11)

Full Changelog: v1.84.0...v1.85.0

Features

  • api: add autoscaling to nks.clusters/availability, update return type (e1dd413)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

This is an automated Stainless release PR bumping the SDK from 1.84.0 to 1.85.0. The substantive API changes add an autoscaling field to NKS cluster create/update operations and change the return type of clusters.update() from NKSCluster to Operation.

  • autoscaling: boolean is added as a required field to ClusterCreateParams and AvailabilityCreateParams, and as an optional field to the corresponding update param interfaces and the NKSCluster response type.
  • clusters.update() return type changes from NKSCluster to Operation, aligning it with clusters.create() which already returned Operation.
  • All embedded MCP server docs, per-language examples, and tests are updated consistently.

Confidence Score: 3/5

The update() return-type change and the newly required autoscaling field will break existing TypeScript callers at compile time; merging as-is constitutes a backwards-incompatible release under a minor version tag.

Two concrete interface breaks are introduced: clusters.update() now returns Operation instead of NKSCluster, so callers reading cluster-specific fields will fail, and autoscaling is required in ClusterCreateParams / AvailabilityCreateParams, so any existing call site omitting that field will no longer compile. The rest of the change — docs, tests, version bumps — is internally consistent and correct.

src/resources/nks/clusters/clusters.ts — both the update return type and the required autoscaling field in ClusterCreateParams need attention before merging.

Important Files Changed

Filename Overview
src/resources/nks/clusters/clusters.ts Adds required autoscaling field to ClusterCreateParams and changes update() return type from NKSCluster to Operation — both are backwards-incompatible changes shipped in a minor version.
src/resources/nks/clusters/availability.ts Adds required autoscaling to AvailabilityCreateParams and optional autoscaling to AvailabilityUpdateParams, consistent with clusters.ts.
packages/mcp-server/src/local-docs-search.ts Embedded docs and examples updated consistently for all affected methods to include the new autoscaling parameter and corrected update return type.
packages/mcp-server/src/server.ts Version string bumped from 1.84.0 to 1.85.0, no functional changes.
tests/api-resources/nks/clusters/clusters.test.ts Tests updated to include autoscaling: true in create call fixtures; all tests remain skipped (mock server tests disabled).
tests/api-resources/nks/clusters/availability.test.ts Tests updated to include autoscaling: true in availability create fixtures; all tests remain skipped.
src/resources/nks/api.md API reference updated to reflect update() returning Operation instead of NKSCluster.

Sequence Diagram

sequenceDiagram
    participant Client
    participant clusters as nks.clusters
    participant availability as nks.clusters.availability
    participant API as Nirvana API

    Client->>clusters: "create({ autoscaling, name, ... })"
    clusters->>API: POST /v1/nks/clusters
    API-->>clusters: Operation
    clusters-->>Client: Operation

    Client->>clusters: "update(clusterId, { autoscaling?, name?, ... })"
    clusters->>API: "PATCH /v1/nks/clusters/{id}"
    API-->>clusters: Operation (changed from NKSCluster)
    clusters-->>Client: Operation

    Client->>clusters: get(clusterId)
    clusters->>API: "GET /v1/nks/clusters/{id}"
    API-->>clusters: NKSCluster (now includes autoscaling field)
    clusters-->>Client: NKSCluster

    Client->>availability: "create({ autoscaling, name, ... })"
    availability->>API: POST /v1/nks/clusters/availability
    API-->>availability: void
    availability-->>Client: void
Loading

Comments Outside Diff (2)

  1. src/resources/nks/clusters/clusters.ts, line 325-331 (link)

    P1 Breaking return-type change on update() in a minor version

    clusters.update() previously returned APIPromise<NKSCluster> and now returns APIPromise<OperationsAPI.Operation>. Any caller that was destructuring or reading cluster-specific fields (name, region, pool_ids, vpc_id, status as resource_status, etc.) from the resolved value will silently receive undefined at runtime and fail TypeScript compilation without an explicit cast. The response shapes share only id, created_at, updated_at, and project_id, so the breakage is broad. This is a backwards-incompatible change that semver convention reserves for a major version bump.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/resources/nks/clusters/clusters.ts
    Line: 325-331
    
    Comment:
    **Breaking return-type change on `update()` in a minor version**
    
    `clusters.update()` previously returned `APIPromise<NKSCluster>` and now returns `APIPromise<OperationsAPI.Operation>`. Any caller that was destructuring or reading cluster-specific fields (`name`, `region`, `pool_ids`, `vpc_id`, `status` as resource_status, etc.) from the resolved value will silently receive `undefined` at runtime and fail TypeScript compilation without an explicit cast. The response shapes share only `id`, `created_at`, `updated_at`, and `project_id`, so the breakage is broad. This is a backwards-incompatible change that semver convention reserves for a major version bump.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. src/resources/nks/clusters/clusters.ts, line 349-354 (link)

    P1 Required autoscaling field breaks existing create callers in a minor version

    Adding autoscaling: boolean as a required field to ClusterCreateParams means all existing TypeScript callers that pass only name, project_id, region, and vpc_id will fail to compile. This is a backwards-incompatible interface change. If the backend treats a missing autoscaling as a default (e.g. false), making it optional (autoscaling?: boolean) would be a non-breaking alternative. The same concern applies to AvailabilityCreateParams in availability.ts.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/resources/nks/clusters/clusters.ts
    Line: 349-354
    
    Comment:
    **Required `autoscaling` field breaks existing `create` callers in a minor version**
    
    Adding `autoscaling: boolean` as a required field to `ClusterCreateParams` means all existing TypeScript callers that pass only `name`, `project_id`, `region`, and `vpc_id` will fail to compile. This is a backwards-incompatible interface change. If the backend treats a missing `autoscaling` as a default (e.g. `false`), making it optional (`autoscaling?: boolean`) would be a non-breaking alternative. The same concern applies to `AvailabilityCreateParams` in `availability.ts`.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

Don't miss a new nirvana-typescript release

NewReleases is sending notifications on new releases.