Skip to content

Commit fa55ad1

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.796.2
1 parent 161d384 commit fa55ad1

76 files changed

Lines changed: 3386 additions & 1923 deletions

Some content is hidden

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

.devcontainer/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/instal
77
rmdir samples || true
88
mkdir samples
99

10-
npm install
11-
npm install -g ts-node
10+
npm install --ignore-scripts
11+
npm install -g ts-node --ignore-scripts
1212
npm link
1313
npm link @speakeasyapi/code-samples
1414
TS_CONFIG_CONTENT=$(cat <<EOL

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/examples/node_modules
2+
.DS_Store
3+
**/.speakeasy/temp/
4+
**/.speakeasy/logs/
5+
.DS_Store
6+
.env
7+
.env.local
8+
.env.*.local
19
/mcp-server
210
/bin
311
/.eslintcache

.npmignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
!/**/*.ts
66
!/**/*.js
77
!/**/*.mjs
8-
!/**/*.json
8+
!/package.json
9+
!/jsr.json
10+
!/dist/**/*.json
11+
!/esm/**/*.json
912
!/**/*.map
1013

1114
/eslint.config.mjs
15+
/.oxlintrc.json
1216
/cjs
1317
/.tshy
1418
/.tshy-*

.speakeasy/gen.lock

Lines changed: 416 additions & 43 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,32 @@ generation:
77
maintainOpenAPIOrder: true
88
usageSnippets:
99
optionalPropertyRendering: withExample
10+
sdkInitStyle: constructor
1011
useClassNamesForArrayFields: true
1112
fixes:
1213
nameResolutionFeb2025: false
1314
parameterOrderingFeb2024: false
1415
requestResponseComponentNamesFeb2024: false
1516
securityFeb2025: false
17+
sharedErrorComponentsApr2025: false
18+
sharedNestedComponentsJan2026: false
19+
nameOverrideFeb2026: false
1620
auth:
1721
oAuth2ClientCredentialsEnabled: false
1822
oAuth2PasswordEnabled: false
23+
hoistGlobalSecurity: true
24+
schemas:
25+
allOfMergeStrategy: shallowMerge
26+
requestBodyFieldName: ""
27+
versioningStrategy: automatic
28+
persistentEdits: {}
29+
tests:
30+
generateTests: true
31+
generateNewTests: false
32+
skipResponseBodyAssertions: false
1933
typescript:
20-
version: 2.4.0-beta
34+
version: 2.4.0-beta.1
35+
acceptHeaderEnum: true
2136
additionalDependencies:
2237
dependencies:
2338
'@emotion/css': ^11.13.5
@@ -27,15 +42,28 @@ typescript:
2742
'@types/react': ^18.3.18
2843
peerDependencies: {}
2944
additionalPackageJSON: {}
45+
additionalScripts: {}
46+
alwaysIncludeInboundAndOutbound: false
47+
apiPromiseHelpers: false
3048
author: Speakeasy
49+
baseErrorName: SpeakeasyCodeSamplesError
3150
clientServerStatusCodesAsErrors: true
51+
constFieldsAlwaysOptional: false
3252
defaultErrorName: APIError
3353
enableCustomCodeRegions: false
3454
enableMCPServer: true
3555
enableReactQuery: true
3656
enumFormat: union
57+
eventStreamClassName: EventStream
58+
exportZodModelNamespace: false
59+
fixEnumNameSanitization: false
60+
flatAdditionalProperties: false
3761
flattenGlobalSecurity: true
3862
flatteningOrder: body-first
63+
formStringArrayEncodeMode: encoded-string
64+
forwardCompatibleEnumsByDefault: false
65+
forwardCompatibleUnionsByDefault: "false"
66+
generateExamples: true
3967
imports:
4068
option: openapi
4169
paths:
@@ -44,13 +72,28 @@ typescript:
4472
operations: models/operations
4573
shared: models/components
4674
webhooks: models/webhooks
75+
inferUnionDiscriminators: true
4776
inputModelSuffix: input
4877
jsonpath: legacy
78+
laxMode: strict
79+
legacyFileNaming: true
4980
maxMethodParams: 1
5081
methodArguments: require-security-and-request
82+
modelPropertyCasing: camel
5183
moduleFormat: esm
84+
multipartArrayFormat: legacy
5285
outputModelSuffix: output
5386
packageName: '@speakeasyapi/code-samples'
87+
preApplyUnionDiscriminators: true
88+
preserveModelFieldNames: false
89+
privateIdentifierPrefix: '#'
90+
requestExtras: false
5491
responseFormat: flat
92+
sseFlatResponse: false
5593
templateVersion: v2
94+
unionStrategy: left-to-right
95+
usageSDKInitImports: []
5696
useIndexModules: true
97+
useOxlint: false
98+
useTsgo: false
99+
zodVersion: v3

.speakeasy/workflow.lock

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
speakeasyVersion: 1.514.0
1+
speakeasyVersion: 1.796.2
22
sources:
33
speakeasy-OAS:
44
sourceNamespace: speakeasy-oas
5-
sourceRevisionDigest: sha256:c95b7bde7a889f8d6461e405347f2dac28defaaf6a36cc19709b4ce29f4eaefb
6-
sourceBlobDigest: sha256:706c912b2e5755fdaff8d2a95ca3ce6fb1fff777a7aa49a8afcb0b909cc22892
5+
sourceRevisionDigest: sha256:26f455beda0b6b455c3c4b706d0739826263537f35a877de129f945a856664fc
6+
sourceBlobDigest: sha256:33285be1bc6252ed7abba1696dc4643406e2df66fb154ce9b7320192a35473e5
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1741642416
109
- 0.4.0
1110
targets:
1211
code_samples_typescript_sdk:
1312
source: speakeasy-OAS
1413
sourceNamespace: speakeasy-oas
15-
sourceRevisionDigest: sha256:c95b7bde7a889f8d6461e405347f2dac28defaaf6a36cc19709b4ce29f4eaefb
16-
sourceBlobDigest: sha256:706c912b2e5755fdaff8d2a95ca3ce6fb1fff777a7aa49a8afcb0b909cc22892
14+
sourceRevisionDigest: sha256:26f455beda0b6b455c3c4b706d0739826263537f35a877de129f945a856664fc
15+
sourceBlobDigest: sha256:33285be1bc6252ed7abba1696dc4643406e2df66fb154ce9b7320192a35473e5
1716
codeSamplesNamespace: speakeasy-oas-typescript-code-samples
18-
codeSamplesRevisionDigest: sha256:73a780b60ccc00d5344b505208070173d62dfcb9013e97f8f123e322230d6afe
17+
codeSamplesRevisionDigest: sha256:b1dd14a70682337921089bf92025cbdb2a0175f13250e07d113bb9aa979db52a
1918
workflow:
2019
workflowVersion: 1.0.0
2120
speakeasyVersion: latest

FUNCTIONS.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Standalone Functions
22

33
> [!NOTE]
4-
> This section is useful if you are using a bundler and targetting browsers and
4+
> This section is useful if you are using a bundler and targeting browsers and
55
> runtimes where the size of an application affects performance and load times.
66
77
Every method in this SDK is also available as a standalone function. This
8-
alternative API is suitable when targetting the browser or serverless runtimes
8+
alternative API is suitable when targeting the browser or serverless runtimes
99
and using a bundler to build your application since all unused functionality
1010
will be tree-shaken away. This includes code for unused methods, Zod schemas,
1111
encoding helpers and response handlers. The result is dramatically smaller
@@ -21,20 +21,24 @@ specific category of applications.
2121
```typescript
2222
import { SpeakeasyCodeSamplesCore } from "@speakeasyapi/code-samples/core.js";
2323
import { codeSamplesGet } from "@speakeasyapi/code-samples/funcs/codeSamplesGet.js";
24-
import { SDKValidationError } from "@speakeasyapi/code-samples/models/errors/sdkvalidationerror.js";
2524

2625
// Use `SpeakeasyCodeSamplesCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
2827
const speakeasyCodeSamples = new SpeakeasyCodeSamplesCore({
28+
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
2929
apiKey: "<YOUR_API_KEY_HERE>",
30-
registryUrl: "https://spec.speakeasy.com/org/ws/my-source",
3130
});
3231

3332
async function run() {
3433
const res = await codeSamplesGet(speakeasyCodeSamples, {
35-
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
3634
operationIds: [
37-
"getPets",
35+
"g",
36+
"e",
37+
"t",
38+
"P",
39+
"e",
40+
"t",
41+
"s",
3842
],
3943
methodPaths: [
4044
{
@@ -47,28 +51,12 @@ async function run() {
4751
"javascript",
4852
],
4953
});
50-
51-
switch (true) {
52-
case res.ok:
53-
// The success case will be handled outside of the switch block
54-
break;
55-
case res.error instanceof SDKValidationError:
56-
// Pretty-print validation errors.
57-
return console.log(res.error.pretty());
58-
case res.error instanceof Error:
59-
return console.log(res.error);
60-
default:
61-
// TypeScript's type checking will fail on the following line if the above
62-
// cases were not exhaustive.
63-
res.error satisfies never;
64-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
54+
if (res.ok) {
55+
const { value: result } = res;
56+
console.log(result);
57+
} else {
58+
console.log("codeSamplesGet failed:", res.error);
6559
}
66-
67-
68-
const { value: result } = res;
69-
70-
// Handle the result
71-
console.log(result);
7260
}
7361

7462
run();

REACT_QUERY.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { SpeakeasyCodeSamplesProvider } from "@speakeasyapi/code-samples/react-q
2323

2424
const queryClient = new QueryClient();
2525
const speakeasyCodeSamples = new SpeakeasyCodeSamplesCore({
26+
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
2627
apiKey: "<YOUR_API_KEY_HERE>",
27-
registryUrl: "https://spec.speakeasy.com/org/ws/my-source",
2828
});
2929

3030
// Retries are handled by the underlying SDK.
@@ -55,9 +55,14 @@ import { useCodeSamples } from "@speakeasyapi/code-samples/react-query/codeSampl
5555

5656
export function Example() {
5757
const { data, error, status } = useCodeSamples({
58-
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
5958
operationIds: [
60-
"getPets",
59+
"g",
60+
"e",
61+
"t",
62+
"P",
63+
"e",
64+
"t",
65+
"s",
6166
],
6267
methodPaths: [
6368
{
@@ -88,9 +93,14 @@ export function ExampleWithOptions() {
8893
const [enabled, setEnabled] = useState(true);
8994
const { data, error, status } = useCodeSamples(
9095
{
91-
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
9296
operationIds: [
93-
"getPets",
97+
"g",
98+
"e",
99+
"t",
100+
"P",
101+
"e",
102+
"t",
103+
"s",
94104
],
95105
methodPaths: [
96106
{
@@ -189,8 +199,8 @@ import { useCodeSamplesSuspense } from "@speakeasyapi/code-samples/react-query/c
189199

190200
const queryClient = new QueryClient();
191201
const speakeasyCodeSamples = new SpeakeasyCodeSamplesCore({
202+
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
192203
apiKey: "<YOUR_API_KEY_HERE>",
193-
registryUrl: "https://spec.speakeasy.com/org/ws/my-source",
194204
});
195205

196206
export function App() {
@@ -222,9 +232,14 @@ export function App() {
222232

223233
function Example() {
224234
const { data } = useCodeSamplesSuspense({
225-
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
226235
operationIds: [
227-
"getPets",
236+
"g",
237+
"e",
238+
"t",
239+
"P",
240+
"e",
241+
"t",
242+
"s",
228243
],
229244
methodPaths: [
230245
{
@@ -261,14 +276,19 @@ import { prefetchCodeSamples } from "@speakeasyapi/code-samples/react-query/code
261276
export default async function Page() {
262277
const queryClient = new QueryClient();
263278
const speakeasyCodeSamples = new SpeakeasyCodeSamplesCore({
279+
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
264280
apiKey: "<YOUR_API_KEY_HERE>",
265-
registryUrl: "https://spec.speakeasy.com/org/ws/my-source",
266281
});
267282

268283
await prefetchCodeSamples(queryClient, speakeasyCodeSamples, {
269-
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
270284
operationIds: [
271-
"getPets",
285+
"g",
286+
"e",
287+
"t",
288+
"P",
289+
"e",
290+
"t",
291+
"s",
272292
],
273293
methodPaths: [
274294
{

0 commit comments

Comments
 (0)