Skip to content

feat!: simplify Speakeasy TypeScript SDK arguments - #965

Merged
alongubkin merged 4 commits into
mainfrom
alon/alien-1357-cleaner-speakeasy-sdk
Oct 9, 2026
Merged

alongubkin merged 4 commits into
mainfrom
alon/alien-1357-cleaner-speakeasy-sdk

Conversation

@alongubkin

@alongubkin alongubkin commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

SDK methods with request bodies currently require nested operation objects, such as createDeploymentGroupToken({ id, createDeploymentGroupTokenRequest: body }). Generate createToken(id, body) and apply the same argument convention across both Speakeasy TypeScript SDKs.

  • Body-only operations accept the body directly; operations with one additional parameter accept (parameter, body). Larger requests and query-only operations retain named request objects.
  • Share the generation overlay, validate its matches before generation, and regenerate class methods, standalone functions, React Query adapters, and documentation with the pinned CLI versions.
  • Migrate SDK request tests and the core HTTP serialization test. Keep the standalone GitHub agent template on its published SDK until the new major release is available.
  • Record a major release for both packages. HTTP contracts and model types are unchanged; Kubb clients are untouched.

Validation: the full pnpm test:ts check passes (19 tasks), all 180 core tests pass, both generated SDK builds pass, and all 33 SDK request/response tests pass, including encoded IDs, workspace selection, Date serialization, standalone functions, optional request headers, and structured errors. Generator scripts pass bash -n; git diff --check passes.

Generated with pnpm run generate:platform-api (Speakeasy 1.799.0) and pnpm run generate:manager-api (Speakeasy 1.680.11). The first Platform generation reached its test step before the old callers were migrated; the migrated combined suite subsequently passed.

The standalone example remains on its existing published SDK; its migration must ship with the new major release. Unrelated generated documentation changes were restored to avoid incorrect argument tables for unchanged methods.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issue was found.

Summary

Simplifies body-bearing calls across both Speakeasy TypeScript SDKs while keeping HTTP request formats unchanged.

  • Body calls pass the body directly or after one path parameter.
  • Both SDK generators check the shared body-argument rule before generation.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Contracts[Platform and Manager contracts] --> Overlay[Shared argument overlay]
  Overlay --> Generation[Speakeasy generation]
  Generation --> Methods[Class methods]
  Generation --> Functions[Standalone functions]
  Generation --> Hooks[React Query adapters]
  Functions --> Requests[Existing HTTP request formats]
  Methods --> Functions
  Hooks --> Functions
Loading

Reviews (2) · Last reviewed commit: "fix: migrate core SDK test and preserve ..." · Reviewed by Greptile

Comment thread examples/github-agent/packages/dashboard/package.json Outdated
Comment thread client-sdks/platform/typescript/docs/sdks/operatormanifests/README.md Outdated
@alongubkin
alongubkin merged commit 72c6ab6 into main Oct 9, 2026
24 checks passed
@alongubkin
alongubkin deleted the alon/alien-1357-cleaner-speakeasy-sdk branch October 9, 2026 06:59
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