Skip to content

Commit 8046e67

Browse files
authored
feat: simplify setup link API and TypeScript SDK (#556)
## Summary - make setup-link targeting explicit while preserving the existing setup-link request fields - add idempotent setup-link creation and direct entry points for gateway providers - simplify TypeScript SDK request inputs so operation bodies are passed directly and workspace can come from the API key - capture bounded provider error responses for internal diagnostics while keeping gateway responses sanitized - regenerate the Platform TypeScript SDK from the updated OpenAPI contract ## Validation - AI Gateway unit tests pass (90 tests) - TypeScript SDK was regenerated from the source OpenAPI schema - real-provider failure path verified: the upstream 400 body is captured internally while the caller receives the sanitized gateway error ## Merge order Merge this PR before the corresponding Platform PR, which consumes the new AI usage diagnostic fields.
1 parent 27580f7 commit 8046e67

1,224 files changed

Lines changed: 16299 additions & 8820 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎client-sdks/platform/openapi.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎client-sdks/platform/rust/openapi-3.0.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎client-sdks/platform/rust/openapi.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
6+
sdk_dir="$repo_root/client-sdks/platform/typescript"
7+
schema="$repo_root/client-sdks/platform/openapi.json"
8+
overlay="$repo_root/client-sdks/platform/speakeasy-overlay.yaml"
9+
temp_dir="$(mktemp -d)"
10+
11+
cleanup() {
12+
rm -rf "$temp_dir"
13+
}
14+
trap cleanup EXIT
15+
16+
speakeasy overlay apply \
17+
--strict \
18+
--schema "$schema" \
19+
--overlay "$overlay" \
20+
--out "$temp_dir/openapi.json"
21+
22+
speakeasy generate sdk \
23+
--lang typescript \
24+
--schema "$temp_dir/openapi.json" \
25+
--out "$sdk_dir"
26+
27+
NODE_OPTIONS=--max-old-space-size=12288 pnpm -C "$sdk_dir" build
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Platform TypeScript SDK ergonomics
4+
version: 1.0.0
5+
actions:
6+
- target: "$"
7+
update:
8+
x-speakeasy-globals:
9+
parameters:
10+
- name: workspace
11+
in: query
12+
description: Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client.
13+
required: false
14+
schema:
15+
type: string
16+
minLength: 4
17+
maxLength: 100
18+
pattern: "^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$"
19+
example: my-workspace
20+
x-speakeasy-globals-hidden: true

‎client-sdks/platform/typescript/.speakeasy/gen.lock‎

Lines changed: 1592 additions & 1025 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎client-sdks/platform/typescript/.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ generation:
3333
skipResponseBodyAssertions: false
3434
versioningStrategy: manual
3535
typescript:
36-
version: 3.3.18
36+
version: 3.4.1
3737
acceptHeaderEnum: true
3838
additionalDependencies:
3939
dependencies: {}

‎client-sdks/platform/typescript/README.md‎

Lines changed: 70 additions & 19 deletions
Large diffs are not rendered by default.

‎client-sdks/platform/typescript/docs/models/accessrequeststatus.md‎

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎client-sdks/platform/typescript/docs/models/allowedkubernetesbaseplatform.md‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)