diff --git a/.gitignore b/.gitignore index 38d2f40f..7a06ba20 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +/examples/node_modules +.env +.env.local +.env.*.local .DS_Store **/.speakeasy/temp/ **/.speakeasy/logs/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0e536b7f..35622b57 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 89968bf0-a755-4d50-9acb-d47410010f05 management: - docChecksum: 17226457b23fc2563102eb22d263bc30 + docChecksum: 9fe547b1abb3170dfb491aa3c76e07b2 docVersion: 0.4.0 - speakeasyVersion: 1.561.0 - generationVersion: 2.628.0 - releaseVersion: 5.0.0-rc.4 - configChecksum: f3d6e491d6a8639407af1874416c9ae0 + speakeasyVersion: 1.600.2 + generationVersion: 2.677.3 + releaseVersion: 5.0.0-rc.5 + configChecksum: 8f32dff730a6cfb096db6739defc4fe5 repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-typescript.git repoSubDirectory: . installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-typescript @@ -14,8 +14,8 @@ management: features: typescript: additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.11 - core: 3.21.11 + constsAndDefaults: 0.1.12 + core: 3.21.20 deepObjectParams: 0.1.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 @@ -26,7 +26,7 @@ features: globalSecurityCallbacks: 0.1.0 globalServerURLs: 2.82.5 globals: 2.82.2 - mcpServer: 0.9.2 + mcpServer: 0.9.3 nameOverrides: 2.81.2 nullables: 0.1.1 openEnums: 0.1.1 @@ -179,6 +179,7 @@ generatedFiles: - docs/sdk/models/shared/publishingtoken.md - docs/sdk/models/shared/pullrequestmetadata.md - docs/sdk/models/shared/relationship.md + - docs/sdk/models/shared/relativediff.md - docs/sdk/models/shared/remotedocument.md - docs/sdk/models/shared/remotesource.md - docs/sdk/models/shared/remotesourcesubscriptionsettings.md @@ -231,6 +232,10 @@ generatedFiles: - docs/sdks/suggest/README.md - docs/sdks/workspaces/README.md - eslint.config.mjs + - examples/.env.template + - examples/README.md + - examples/artifactsCreateRemoteSource.example.ts + - examples/package.json - jsr.json - package.json - src/core.ts @@ -605,6 +610,7 @@ generatedFiles: - src/sdk/models/shared/preflightrequest.ts - src/sdk/models/shared/preflighttoken.ts - src/sdk/models/shared/publishingtoken.ts + - src/sdk/models/shared/relativediff.ts - src/sdk/models/shared/remotedocument.ts - src/sdk/models/shared/remotesource.ts - src/sdk/models/shared/remotesourcesubscriptionsettings.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3ef192c4..ec7ac871 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,30 +1,30 @@ -speakeasyVersion: 1.561.0 +speakeasyVersion: 1.600.2 sources: my-source: - sourceNamespace: my-source - sourceRevisionDigest: sha256:2e5dc78239617b9501f2028df534aa4601c61396c89a582390d75a797fc228cc - sourceBlobDigest: sha256:0442ef7698d8979dd825b3eab0ab868ac86580f4cffcd3e0dff7afdd6191e6d9 + sourceNamespace: ts-client-source + sourceRevisionDigest: sha256:802dc7b246c02d418741629981a8b0d57f6993d67f0d2cf26bc3654db30ba01a + sourceBlobDigest: sha256:ec4ec370491ceb2ff1df4ba4a12bb743c761566998c5dd22e1d8730a8654d7e3 tags: - latest - - speakeasy-sdk-regen-1746577270 + - speakeasy-sdk-regen-1753835013 - 0.4.0 targets: speakeasy-client-sdk-typescript: source: my-source - sourceNamespace: my-source - sourceRevisionDigest: sha256:2e5dc78239617b9501f2028df534aa4601c61396c89a582390d75a797fc228cc - sourceBlobDigest: sha256:0442ef7698d8979dd825b3eab0ab868ac86580f4cffcd3e0dff7afdd6191e6d9 + sourceNamespace: ts-client-source + sourceRevisionDigest: sha256:802dc7b246c02d418741629981a8b0d57f6993d67f0d2cf26bc3654db30ba01a + sourceBlobDigest: sha256:ec4ec370491ceb2ff1df4ba4a12bb743c761566998c5dd22e1d8730a8654d7e3 codeSamplesNamespace: my-source-typescript-code-samples - codeSamplesRevisionDigest: sha256:65717f579dccb319b073cb22e553e23bd3419cf420967387c00d148c041f5dc1 + codeSamplesRevisionDigest: sha256:45183a9500c3d20e52ad7fb69cba2ff792e1b68bcb584cd48829aead5309a960 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: my-source: inputs: - - location: https://speakeasy.com/openapi.yaml + - location: https://spec.speakeasy.com/speakeasy-self/speakeasy-self/speakeasy-api registry: - location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/my-source + location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-self/ts-client-source targets: speakeasy-client-sdk-typescript: target: typescript diff --git a/README.md b/README.md index e34905c9..3104b2a7 100644 --- a/README.md +++ b/README.md @@ -379,7 +379,7 @@ run(); ### Error Classes **Primary errors:** * [`SpeakeasyError`](./src/sdk/models/errors/speakeasyerror.ts): The base class for HTTP error responses. - * [`ErrorT`](docs/sdk/models/errors/errort.md): The `Status` type defines a logical error model. * + * [`ErrorT`](./src/sdk/models/errors/errort.ts): The `Status` type defines a logical error model. *
Less common errors (6) diff --git a/RELEASES.md b/RELEASES.md index 28501155..a2b43dd8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1706,4 +1706,14 @@ Based on: ### Generated - [typescript v5.0.0-rc.4] . ### Releases -- [NPM v5.0.0-rc.4] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/5.0.0-rc.4 - . \ No newline at end of file +- [NPM v5.0.0-rc.4] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/5.0.0-rc.4 - . + +## 2025-08-11 00:24:12 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.600.2 (2.677.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v5.0.0-rc.5] . +### Releases +- [NPM v5.0.0-rc.5] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/5.0.0-rc.5 - . \ No newline at end of file diff --git a/docs/sdk/models/operations/createworkspacetokenrequest.md b/docs/sdk/models/operations/createworkspacetokenrequest.md index 2c54d002..229d233c 100644 --- a/docs/sdk/models/operations/createworkspacetokenrequest.md +++ b/docs/sdk/models/operations/createworkspacetokenrequest.md @@ -5,7 +5,16 @@ ```typescript import { CreateWorkspaceTokenRequest } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/operations"; -let value: CreateWorkspaceTokenRequest = {}; +let value: CreateWorkspaceTokenRequest = { + workspaceToken: { + alg: "", + createdAt: new Date("2023-10-18T04:12:26.286Z"), + id: "", + key: "", + name: "", + workspaceId: "", + }, +}; ``` ## Fields diff --git a/docs/sdk/models/operations/postworkspaceeventsrequest.md b/docs/sdk/models/operations/postworkspaceeventsrequest.md index 212d82e1..744b2e0e 100644 --- a/docs/sdk/models/operations/postworkspaceeventsrequest.md +++ b/docs/sdk/models/operations/postworkspaceeventsrequest.md @@ -5,7 +5,21 @@ ```typescript import { PostWorkspaceEventsRequest } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/operations"; -let value: PostWorkspaceEventsRequest = {}; +let value: PostWorkspaceEventsRequest = { + requestBody: [ + { + createdAt: new Date("2024-04-27T01:44:18.572Z"), + executionId: "", + id: "", + interactionType: "TOMBSTONE", + localStartedAt: new Date("2024-11-09T15:10:21.242Z"), + speakeasyApiKeyName: "", + speakeasyVersion: "", + success: false, + workspaceId: "", + }, + ], +}; ``` ## Fields diff --git a/docs/sdk/models/operations/suggestrequest.md b/docs/sdk/models/operations/suggestrequest.md index bd0bc300..a2026cef 100644 --- a/docs/sdk/models/operations/suggestrequest.md +++ b/docs/sdk/models/operations/suggestrequest.md @@ -7,6 +7,29 @@ import { SuggestRequest } from "@speakeasy-api/speakeasy-client-sdk-typescript/s let value: SuggestRequest = { xSessionId: "", + suggestRequestBody: { + diagnostics: [ + { + message: "", + path: [ + "/lib", + "/usr/X11R6", + ], + type: "", + }, + ], + oasSummary: { + info: { + description: "yowza huge mutate anguished wring", + license: {}, + summary: "", + title: "", + version: "", + }, + operations: [], + }, + suggestionType: "method-names", + }, }; ``` diff --git a/docs/sdk/models/operations/updateworkspacedetailsrequest.md b/docs/sdk/models/operations/updateworkspacedetailsrequest.md index ea65c54f..446cc558 100644 --- a/docs/sdk/models/operations/updateworkspacedetailsrequest.md +++ b/docs/sdk/models/operations/updateworkspacedetailsrequest.md @@ -5,7 +5,17 @@ ```typescript import { UpdateWorkspaceDetailsRequest } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/operations"; -let value: UpdateWorkspaceDetailsRequest = {}; +let value: UpdateWorkspaceDetailsRequest = { + workspace: { + createdAt: new Date("2023-11-16T00:00:08.537Z"), + id: "", + name: "", + organizationId: "", + slug: "", + updatedAt: new Date("2024-06-14T01:29:49.528Z"), + verified: true, + }, +}; ``` ## Fields diff --git a/docs/sdk/models/operations/updateworkspacesettingsrequest.md b/docs/sdk/models/operations/updateworkspacesettingsrequest.md index 9fb943fb..4ec68223 100644 --- a/docs/sdk/models/operations/updateworkspacesettingsrequest.md +++ b/docs/sdk/models/operations/updateworkspacesettingsrequest.md @@ -5,7 +5,14 @@ ```typescript import { UpdateWorkspaceSettingsRequest } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/operations"; -let value: UpdateWorkspaceSettingsRequest = {}; +let value: UpdateWorkspaceSettingsRequest = { + workspaceSettings: { + createdAt: new Date("2024-01-11T14:49:22.396Z"), + updatedAt: new Date("2023-02-11T06:08:15.713Z"), + webhookUrl: "https://damaged-role.org", + workspaceId: "", + }, +}; ``` ## Fields diff --git a/docs/sdk/models/shared/accounttype.md b/docs/sdk/models/shared/accounttype.md index 85ee68ec..c021b6d5 100644 --- a/docs/sdk/models/shared/accounttype.md +++ b/docs/sdk/models/shared/accounttype.md @@ -13,5 +13,5 @@ let value: AccountType = "enterprise"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"free" | "scale-up" | "business" | "enterprise" | Unrecognized +"free" | "scale-up" | "business" | "oss" | "enterprise" | Unrecognized ``` \ No newline at end of file diff --git a/docs/sdk/models/shared/apikeydetails.md b/docs/sdk/models/shared/apikeydetails.md index 6592b670..1e80d986 100644 --- a/docs/sdk/models/shared/apikeydetails.md +++ b/docs/sdk/models/shared/apikeydetails.md @@ -6,7 +6,7 @@ import { ApiKeyDetails } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/shared"; let value: ApiKeyDetails = { - accountTypeV2: "enterprise", + accountTypeV2: "oss", billingAddOns: [ "snippet_ai", ], diff --git a/docs/sdk/models/shared/relativediff.md b/docs/sdk/models/shared/relativediff.md new file mode 100644 index 00000000..f3cb3a76 --- /dev/null +++ b/docs/sdk/models/shared/relativediff.md @@ -0,0 +1,18 @@ +# RelativeDiff + +A relative diff between the current revision and the previous revision. + +## Example Usage + +```typescript +import { RelativeDiff } from "@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/shared"; + +let value: RelativeDiff = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `addedLines` | *number* | :heavy_minus_sign: | The number of lines added against the previous revision | +| `removedLines` | *number* | :heavy_minus_sign: | The number of lines removed against the previous revision | \ No newline at end of file diff --git a/docs/sdk/models/shared/revisioncontentsmetadata.md b/docs/sdk/models/shared/revisioncontentsmetadata.md index 42449ba1..a2762eab 100644 --- a/docs/sdk/models/shared/revisioncontentsmetadata.md +++ b/docs/sdk/models/shared/revisioncontentsmetadata.md @@ -40,6 +40,7 @@ let value: RevisionContentsMetadata = { | `namespace` | *string* | :heavy_check_mark: | The fully qualified namespace | | `numOverlayActions` | *number* | :heavy_check_mark: | The number of overlay actions in the OAS. Will be 0 if the OAS is not an overlay. | | `operationIds` | *string*[] | :heavy_check_mark: | The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. | +| `relativeDiff` | [shared.RelativeDiff](../../../sdk/models/shared/relativediff.md) | :heavy_minus_sign: | A relative diff between the current revision and the previous revision. | | `revisionDigest` | *string* | :heavy_check_mark: | The digest of the parent bundle | | `tags` | *string*[] | :heavy_check_mark: | The tags contained in the OAS -- NOT the OCI tags. Will be empty if the OAS is an overlay. | | `title` | *string* | :heavy_check_mark: | The OAS title | diff --git a/docs/sdk/models/shared/workspaceandorganization.md b/docs/sdk/models/shared/workspaceandorganization.md index 5967727e..1cb4bc71 100644 --- a/docs/sdk/models/shared/workspaceandorganization.md +++ b/docs/sdk/models/shared/workspaceandorganization.md @@ -9,7 +9,7 @@ import { WorkspaceAndOrganization } from "@speakeasy-api/speakeasy-client-sdk-ty let value: WorkspaceAndOrganization = { organization: { - accountType: "business", + accountType: "oss", createdAt: new Date("2023-06-23T09:04:56.583Z"), id: "", name: "", diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index bed64e79..297ed3d0 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -25,6 +25,7 @@ Configure a new remote source ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -115,6 +116,7 @@ Get blob for a particular digest ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -226,6 +228,7 @@ Get manifest for a particular reference ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -337,6 +340,7 @@ Each namespace contains many revisions. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -434,6 +438,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -537,6 +542,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -642,6 +648,7 @@ Get remote sources attached to a particular namespace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -747,6 +754,7 @@ Add tags to an existing revision ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -841,6 +849,7 @@ Get access token for communicating with OCI distribution endpoints ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -931,6 +940,7 @@ Set whether a namespace is archived ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1025,6 +1035,7 @@ Set visibility of a namespace with an existing metadata entry ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index 98c87021..8967dd60 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -18,6 +18,7 @@ Checks if generation is permitted for a particular run of the CLI ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -118,6 +119,7 @@ Get or refresh an access token for the current workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -215,6 +217,7 @@ Get information about the current user. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -314,6 +317,7 @@ Validate the current api key. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/codesamples/README.md b/docs/sdks/codesamples/README.md index 1c2c3cd2..0637e61f 100644 --- a/docs/sdks/codesamples/README.md +++ b/docs/sdks/codesamples/README.md @@ -18,6 +18,7 @@ This endpoint generates Code Sample previews from a file and configuration param ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; import { openAsBlob } from "node:fs"; @@ -116,6 +117,7 @@ This endpoint generates Code Sample previews from a file and configuration param ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; import { openAsBlob } from "node:fs"; @@ -214,6 +216,7 @@ Retrieve usage snippets from an OpenAPI document stored in the registry. Support ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -357,6 +360,7 @@ Poll for the result of an asynchronous Code Sample preview generation. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 796a805a..d702c632 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -19,6 +19,7 @@ Load recent events for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -126,6 +127,7 @@ Load targets for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -227,6 +229,7 @@ Load targets for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -330,6 +333,7 @@ Sends an array of events to be stored for a particular workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -450,6 +454,7 @@ Search events for a particular workspace by any field ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md index 0af56afd..55d3e275 100644 --- a/docs/sdks/github/README.md +++ b/docs/sdks/github/README.md @@ -23,6 +23,7 @@ REST APIs for managing the github integration ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -128,6 +129,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -235,6 +237,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -338,6 +341,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -434,6 +438,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -536,6 +541,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -630,6 +636,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -735,6 +742,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -842,6 +850,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -930,6 +939,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1022,6 +1032,7 @@ import { ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 84fbd241..2a8a9518 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -22,6 +22,7 @@ Creates an organization ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -130,6 +131,7 @@ Create billing add ons ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -228,6 +230,7 @@ Creates a free trial for an organization ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -317,6 +320,7 @@ Delete billing add ons ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -411,6 +415,7 @@ Get information about a particular organization. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -516,6 +521,7 @@ Returns a list of organizations a user has access too ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -615,6 +621,7 @@ Get billing add ons ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -714,6 +721,7 @@ Returns a billing usage summary by target languages for a particular organizatio ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/publishingtokens/README.md b/docs/sdks/publishingtokens/README.md index 384ced85..91afc520 100644 --- a/docs/sdks/publishingtokens/README.md +++ b/docs/sdks/publishingtokens/README.md @@ -19,6 +19,7 @@ Creates a publishing token for the current workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -109,6 +110,7 @@ Delete a particular publishing token. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -203,6 +205,7 @@ Get information about a particular publishing token. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -308,6 +311,7 @@ Returns a publishing token for the current workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -407,6 +411,7 @@ Get information about a particular publishing token. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -512,6 +517,7 @@ Get information about a particular publishing token target. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -617,6 +623,7 @@ Updates the validity period of a particular publishing token. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/reports/README.md b/docs/sdks/reports/README.md index c5f8f775..a875db9c 100644 --- a/docs/sdks/reports/README.md +++ b/docs/sdks/reports/README.md @@ -17,6 +17,7 @@ Get the signed access url for the change reports for a particular document. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -121,6 +122,7 @@ Get the signed access url for the linting reports for a particular document. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -225,6 +227,7 @@ Upload a report. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; import { openAsBlob } from "node:fs"; diff --git a/docs/sdks/schemastore/README.md b/docs/sdks/schemastore/README.md index fedd3abd..e663ca47 100644 --- a/docs/sdks/schemastore/README.md +++ b/docs/sdks/schemastore/README.md @@ -13,6 +13,7 @@ Create a schema in the schema store ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/shorturls/README.md b/docs/sdks/shorturls/README.md index 1d159495..964de8db 100644 --- a/docs/sdks/shorturls/README.md +++ b/docs/sdks/shorturls/README.md @@ -15,6 +15,7 @@ Shorten a URL. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md index 295d61e0..7d533a54 100644 --- a/docs/sdks/subscriptions/README.md +++ b/docs/sdks/subscriptions/README.md @@ -16,6 +16,7 @@ Activate an ignored namespace for a subscription ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -112,6 +113,7 @@ Ignored a namespace for a subscription ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/suggest/README.md b/docs/sdks/suggest/README.md index 7dadb19b..9bb24c61 100644 --- a/docs/sdks/suggest/README.md +++ b/docs/sdks/suggest/README.md @@ -18,6 +18,7 @@ Get suggestions from an LLM model for improving an OpenAPI document. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -177,6 +178,7 @@ Generate generic suggestions for a list of items. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -276,6 +278,7 @@ Get suggestions from an LLM model for improving an OpenAPI document. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; import { openAsBlob } from "node:fs"; @@ -377,6 +380,7 @@ Get suggestions from an LLM model for improving an OpenAPI document stored in th ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index e7f72ef3..1871499c 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -29,6 +29,7 @@ Creates a workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -135,6 +136,7 @@ Create a token for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -245,6 +247,7 @@ Delete a token for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -341,6 +344,7 @@ Get information about a particular workspace by context. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -440,6 +444,7 @@ Returns a list of workspaces a user has access too ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -539,6 +544,7 @@ Get information about a particular workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -642,6 +648,7 @@ Get workspace feature flags ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -745,6 +752,7 @@ Get settings about a particular workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -848,6 +856,7 @@ Get team members for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -951,6 +960,7 @@ Get tokens for a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1054,6 +1064,7 @@ Grant a user access to a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1150,6 +1161,7 @@ Revoke a user's access to a particular workspace ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1246,6 +1258,7 @@ Set workspace feature flags ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1340,6 +1353,7 @@ Update information about a particular workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; @@ -1452,6 +1466,7 @@ Update settings about a particular workspace. ### Example Usage + ```typescript import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; diff --git a/examples/.env.template b/examples/.env.template new file mode 100644 index 00000000..642bf99c --- /dev/null +++ b/examples/.env.template @@ -0,0 +1,3 @@ +# @speakeasy-api/speakeasy-client-sdk-typescript SDK Environment Variables +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file to version control diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..fbc9789f --- /dev/null +++ b/examples/README.md @@ -0,0 +1,31 @@ +# @speakeasy-api/speakeasy-client-sdk-typescript Examples + +This directory contains example scripts demonstrating how to use the @speakeasy-api/speakeasy-client-sdk-typescript SDK. + +## Prerequisites + +- Node.js (v18 or higher) +- npm + +## Setup + +1. Copy `.env.template` to `.env`: + ```bash + cp .env.template .env + ``` + +2. Edit `.env` and add your actual credentials + +## Running the Examples + +To run an example file from the examples directory: + +```bash +npm run build && npx tsx example.ts +``` + +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/examples/artifactsCreateRemoteSource.example.ts b/examples/artifactsCreateRemoteSource.example.ts new file mode 100644 index 00000000..524224df --- /dev/null +++ b/examples/artifactsCreateRemoteSource.example.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import dotenv from "dotenv"; +dotenv.config(); +/** + * Example usage of the @speakeasy-api/speakeasy-client-sdk-typescript SDK + * + * To run this example from the examples directory: + * npm run build && npx tsx artifactsCreateRemoteSource.ts + */ + +import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript"; + +const speakeasy = new Speakeasy({ + security: { + apiKey: "", + }, +}); + +async function main() { + await speakeasy.createRemoteSource(); +} + +main().catch(console.error); diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 00000000..6cb16b14 --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,641 @@ +{ + "name": "@speakeasy-api/speakeasy-client-sdk-typescript-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@speakeasy-api/speakeasy-client-sdk-typescript-examples", + "version": "1.0.0", + "dependencies": { + "@speakeasy-api/speakeasy-client-sdk-typescript": "file:.." + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + } + }, + "..": { + "name": "@speakeasy-api/speakeasy-client-sdk-typescript", + "version": "5.0.0-rc.5", + "dependencies": { + "zod": "^3.20.0" + }, + "bin": { + "mcp": "bin/mcp-server.js" + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@stricli/core": "^1.1.1", + "@tanstack/react-query": "^5.61.4", + "@types/express": "^4.17.21", + "@types/react": "^18.3.12", + "bun": "1.2.17", + "bun-types": "1.2.17", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@tanstack/react-query": "^5", + "react": "^18 || ^19", + "react-dom": "^18 || ^19" + }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + }, + "@tanstack/react-query": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", + "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", + "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", + "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", + "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", + "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", + "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", + "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", + "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", + "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", + "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", + "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", + "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", + "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", + "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", + "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", + "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", + "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", + "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", + "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", + "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", + "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", + "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", + "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", + "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", + "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", + "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@speakeasy-api/speakeasy-client-sdk-typescript": { + "resolved": "..", + "link": true + }, + "node_modules/@types/node": { + "version": "20.19.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.10.tgz", + "integrity": "sha512-iAFpG6DokED3roLSP0K+ybeDdIX6Bc0Vd3mLW5uDqThPWtNos3E+EqOM11mPQHKzfWHqEBuLjIlsBQQ8CsISmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/esbuild": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", + "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.8", + "@esbuild/android-arm": "0.25.8", + "@esbuild/android-arm64": "0.25.8", + "@esbuild/android-x64": "0.25.8", + "@esbuild/darwin-arm64": "0.25.8", + "@esbuild/darwin-x64": "0.25.8", + "@esbuild/freebsd-arm64": "0.25.8", + "@esbuild/freebsd-x64": "0.25.8", + "@esbuild/linux-arm": "0.25.8", + "@esbuild/linux-arm64": "0.25.8", + "@esbuild/linux-ia32": "0.25.8", + "@esbuild/linux-loong64": "0.25.8", + "@esbuild/linux-mips64el": "0.25.8", + "@esbuild/linux-ppc64": "0.25.8", + "@esbuild/linux-riscv64": "0.25.8", + "@esbuild/linux-s390x": "0.25.8", + "@esbuild/linux-x64": "0.25.8", + "@esbuild/netbsd-arm64": "0.25.8", + "@esbuild/netbsd-x64": "0.25.8", + "@esbuild/openbsd-arm64": "0.25.8", + "@esbuild/openbsd-x64": "0.25.8", + "@esbuild/openharmony-arm64": "0.25.8", + "@esbuild/sunos-x64": "0.25.8", + "@esbuild/win32-arm64": "0.25.8", + "@esbuild/win32-ia32": "0.25.8", + "@esbuild/win32-x64": "0.25.8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", + "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 00000000..6e1c0f47 --- /dev/null +++ b/examples/package.json @@ -0,0 +1,18 @@ +{ + "name": "@speakeasy-api/speakeasy-client-sdk-typescript-examples", + "version": "1.0.0", + "private": true, + "scripts": { + "build:parent": "cd .. && npm i && npm run build && cd -", + "build:examples": "npm i", + "build": "npm run build:parent && npm run build:examples" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + }, + "dependencies": { + "@speakeasy-api/speakeasy-client-sdk-typescript": "file:.." + } +} \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 094c0c39..de5286b2 100644 --- a/gen.yaml +++ b/gen.yaml @@ -14,8 +14,12 @@ generation: auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false typescript: - version: 5.0.0-rc.4 + version: 5.0.0-rc.5 additionalDependencies: dependencies: {} devDependencies: {} @@ -24,6 +28,7 @@ typescript: author: Speakeasy baseErrorName: SpeakeasyError clientServerStatusCodesAsErrors: true + constFieldsAlwaysOptional: true defaultErrorName: SDKError enableCustomCodeRegions: false enableMCPServer: true @@ -31,6 +36,7 @@ typescript: enumFormat: union flattenGlobalSecurity: true flatteningOrder: body-first + generateExamples: true imports: option: openapi paths: diff --git a/jsr.json b/jsr.json index e8794ffd..08879101 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@speakeasy-api/speakeasy-client-sdk-typescript", - "version": "5.0.0-rc.4", + "version": "5.0.0-rc.5", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index cc74afee..d6e0a7a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,15 @@ { "name": "@speakeasy-api/speakeasy-client-sdk-typescript", - "version": "5.0.0-rc.4", + "version": "5.0.0-rc.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@speakeasy-api/speakeasy-client-sdk-typescript", - "version": "5.0.0-rc.4", + "version": "5.0.0-rc.5", + "dependencies": { + "zod": "^3.20.0" + }, "bin": { "mcp": "bin/mcp-server.js" }, @@ -17,21 +20,19 @@ "@tanstack/react-query": "^5.61.4", "@types/express": "^4.17.21", "@types/react": "^18.3.12", - "bun": "^1.2.2", - "bun-types": "^1.2.2", + "bun": "1.2.17", + "bun-types": "1.2.17", "eslint": "^9.19.0", "express": "^4.21.2", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "@tanstack/react-query": "^5", "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": ">= 3" + "react-dom": "^18 || ^19" }, "peerDependenciesMeta": { "@modelcontextprotocol/sdk": { @@ -646,9 +647,9 @@ } }, "node_modules/@oven/bun-darwin-aarch64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.8.tgz", - "integrity": "sha512-O97RiReqBVzno5qLgoFX/dYI+xO+jSTIw0S+Cp1MRedXMZEqEgi8ql3ExWpteZyvUGBiXdvc0sQSOQwPoEwiPA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.17.tgz", + "integrity": "sha512-66Xjz3NZXUUWKZJPvWKuwEkaqMZpir1Gm4SbhbB2iiRSSTW8jqwdkSb9RhgTCDt5OnSPd3+Cq0WsP/T5ExJbhA==", "cpu": [ "arm64" ], @@ -660,9 +661,9 @@ ] }, "node_modules/@oven/bun-darwin-x64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.8.tgz", - "integrity": "sha512-aofXwEl3ZzQgiOw/ITzAlXIpQiWeslvIVxol5/n/7Dv8Ekfrqhvo+j/uvEvY0KDECUn8gNIHwa839d701u/rhA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.17.tgz", + "integrity": "sha512-OMJMHpcpBlWcVnWfSQ6x+8fF7HpkQLqBfoIvzxgUjIZZvj2d8K46XX4N/h62RglDEinRC9VDGxt24vwvlk5tTw==", "cpu": [ "x64" ], @@ -674,9 +675,9 @@ ] }, "node_modules/@oven/bun-darwin-x64-baseline": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.8.tgz", - "integrity": "sha512-SqckVEKEALPJ1TLE+w1xlieZW5coRmmm2nxV5sxMs5BqUb6asrhJ+Wp51KePScvb2ctN7A00SGpROxVq2IA5GQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.17.tgz", + "integrity": "sha512-VSIctl90tV8yg1LRMvPg/8LgUzl55Q7Jcxe+u6PfuvLQIJOTIPbNn7HtRpJg7MGc3+qyztB5KDd70xC7qI2yEg==", "cpu": [ "x64" ], @@ -688,9 +689,9 @@ ] }, "node_modules/@oven/bun-linux-aarch64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.8.tgz", - "integrity": "sha512-BYzMj7H49xwmUBlHwfIXm/ky1D8yZyyVOnyRDNLTT+3+/odw7TTz3/+lZEBPGyet2tZ6oyBeis1xSZ9vYwSzZA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.17.tgz", + "integrity": "sha512-KPoMqaibCXcSv+VZ3uMqKUNZqMxE6Hho1be6+laolYGOIJxJTMnZPfmKfIlQmnnW3vLlm3g2Rm8pPPC7doSHWg==", "cpu": [ "arm64" ], @@ -702,9 +703,9 @@ ] }, "node_modules/@oven/bun-linux-aarch64-musl": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.8.tgz", - "integrity": "sha512-rl15SGTFCNj1PE/I2VpUc4XvOZXDCPlqgJGTAObH7+731ET6wgclAehp0x7s2qdyDN4awPnOtold+FYvMH/g9Q==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.17.tgz", + "integrity": "sha512-PH+hUV+I6DGD1VRHdAIAKEAOed+GSdvn6S1b3qqX27/VuHBU781V+hzt+6DBlcWBHYLw8PIg9sfIdNp485gQmw==", "cpu": [ "aarch64" ], @@ -716,9 +717,9 @@ ] }, "node_modules/@oven/bun-linux-x64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.8.tgz", - "integrity": "sha512-AzvrOAUGsKI9U7eYIbJbgtLVq9Jhx8dExt9QY6PtCgBklUlpTBU+9T+HPgXJqtIJYGtn9C9W4EBGjq9fEgy08A==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.17.tgz", + "integrity": "sha512-BfySnrTxp7D9hVUi9JEpviJl8ndsuESiRiQKTzgmdTLrMjUxP4SwrwMtYt6R9X20n9rREG6a47C0IyQMhbwG/g==", "cpu": [ "x64" ], @@ -730,9 +731,9 @@ ] }, "node_modules/@oven/bun-linux-x64-baseline": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.8.tgz", - "integrity": "sha512-j0SxtM9XYCE0N7vnUzuYfnP2iFSoTsQ7pF+K0DPUr/+zmBVJ5tcZUU3xRPc4St86zSrMUD3J2tIUTNksxo81sw==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.17.tgz", + "integrity": "sha512-IrnFMUwYWxoKICQgK8ZlJ6rI/HU2gITFNEW0MIOPIcuT0s3j0/33631M9EzYDoL4NuLQPks6569JDvSHEVqdeA==", "cpu": [ "x64" ], @@ -744,9 +745,9 @@ ] }, "node_modules/@oven/bun-linux-x64-musl": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.8.tgz", - "integrity": "sha512-NgjwsqRWRbCycTlLxg2mka3ZW8cnLPwkmg/zWRe9yjMutU7TGPV0Ak8cCf9PvA6Xgmrz+/HSO1ohO6Pii6Tb3w==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.17.tgz", + "integrity": "sha512-fW9qn/WqO131/qSIkIPW8zN+thQnYUWa/k98EWubLG87htKSPh1v023E5ikKb7WlUv4Yb6UlE/z4NmMYKffmAg==", "cpu": [ "x64" ], @@ -758,9 +759,9 @@ ] }, "node_modules/@oven/bun-linux-x64-musl-baseline": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.8.tgz", - "integrity": "sha512-JbkQ452sYyK/TZGCvYz5eCmnlIazhPqkuEfZDwr9K2hfaY8JGJKwkC1sLxM3yvfoXzPgDrPFvYGBU75hmrJHTQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.17.tgz", + "integrity": "sha512-YE5wQ/YA79BykMLhuwgdoF8Yjj5dRipD8dwmXs8n7gzR+/L9tL7Q69NQgskW2KkAalmWPoGAv3TV0IwbU+1dFw==", "cpu": [ "x64" ], @@ -772,9 +773,9 @@ ] }, "node_modules/@oven/bun-windows-x64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.8.tgz", - "integrity": "sha512-9nQ45l6LCG+v0AUoBQrrSqsznO0Y36EyQ9sJmDYsI4faPmkHd+cQiyNnMFO5vIwjTXbB3Hb65ql7bjNYbP/O5g==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.17.tgz", + "integrity": "sha512-GJUg1oA59DWH6eyV8uccpgfTEVxjmgfTWQCOl2ySMXR3IfRoFwS4aQfpjcVzNmEZrv8eYt+yMuw1K7aNcWTTIg==", "cpu": [ "x64" ], @@ -786,9 +787,9 @@ ] }, "node_modules/@oven/bun-windows-x64-baseline": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.8.tgz", - "integrity": "sha512-fVZ1hNhA9Gph76jToSc5lglNO7Y349v4IUwZaBH25ypenyPPrBoxH11D8v/EB95CsUej4KyWieYcxUiTNZUVmg==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.17.tgz", + "integrity": "sha512-aVkq4l1yZ9VKfBOtZ2HEj0OCU5kUe3Fx6LbAG6oY6OglWVYj051i3RGaE2OdR4L4F2jDyxzfGYRTM/qs8nU5qA==", "cpu": [ "x64" ], @@ -974,16 +975,6 @@ "@types/send": "*" } }, - "node_modules/@types/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/type-utils": { "version": "8.29.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.1.tgz", @@ -1393,9 +1384,9 @@ } }, "node_modules/bun": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.8.tgz", - "integrity": "sha512-X8r9UuXAruvpE37u/JVfvJI8KRdFf9hUdTLw00DMScnBe7Xerawd/VvmFVT9Y/NrmXDAdDp0Dm6N6bulZYTGvA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.17.tgz", + "integrity": "sha512-lrUZTWS24eVy6v+Eph8VTwqFPcG7/XQ0rLBQEMNoQs2Vd7ctVdMGAzJKKGZRUQH+rgkD8rBeHGIVoWxX4vJLCA==", "cpu": [ "arm64", "x64", @@ -1411,31 +1402,30 @@ ], "bin": { "bun": "bin/bun.exe", - "bunx": "bin/bun.exe" + "bunx": "bin/bunx.exe" }, "optionalDependencies": { - "@oven/bun-darwin-aarch64": "1.2.8", - "@oven/bun-darwin-x64": "1.2.8", - "@oven/bun-darwin-x64-baseline": "1.2.8", - "@oven/bun-linux-aarch64": "1.2.8", - "@oven/bun-linux-aarch64-musl": "1.2.8", - "@oven/bun-linux-x64": "1.2.8", - "@oven/bun-linux-x64-baseline": "1.2.8", - "@oven/bun-linux-x64-musl": "1.2.8", - "@oven/bun-linux-x64-musl-baseline": "1.2.8", - "@oven/bun-windows-x64": "1.2.8", - "@oven/bun-windows-x64-baseline": "1.2.8" + "@oven/bun-darwin-aarch64": "1.2.17", + "@oven/bun-darwin-x64": "1.2.17", + "@oven/bun-darwin-x64-baseline": "1.2.17", + "@oven/bun-linux-aarch64": "1.2.17", + "@oven/bun-linux-aarch64-musl": "1.2.17", + "@oven/bun-linux-x64": "1.2.17", + "@oven/bun-linux-x64-baseline": "1.2.17", + "@oven/bun-linux-x64-musl": "1.2.17", + "@oven/bun-linux-x64-musl-baseline": "1.2.17", + "@oven/bun-windows-x64": "1.2.17", + "@oven/bun-windows-x64-baseline": "1.2.17" } }, "node_modules/bun-types": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.8.tgz", - "integrity": "sha512-D5npfxKIGuYe9dTHLK1hi4XFmbMdKYoLrgyd25rrUyCrnyU4ljmQW7vDdonvibKeyU72mZuixIhQ2J+q6uM0Mg==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.17.tgz", + "integrity": "sha512-ElC7ItwT3SCQwYZDYoAH+q6KT4Fxjl8DtZ6qDulUFBmXA8YB4xo+l54J9ZJN+k2pphfn9vk7kfubeSd5QfTVJQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "*", - "@types/ws": "*" + "@types/node": "*" } }, "node_modules/bytes": { @@ -3393,9 +3383,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3684,7 +3674,6 @@ "version": "3.25.63", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.63.tgz", "integrity": "sha512-3ttCkqhtpncYXfP0f6dsyabbYV/nEUW+Xlu89jiXbTBifUfjaSqXOG6JnQPLtqt87n7KAmnMqcjay6c0Wq0Vbw==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index 33336f52..c06133e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@speakeasy-api/speakeasy-client-sdk-typescript", - "version": "5.0.0-rc.4", + "version": "5.0.0-rc.5", "author": "Speakeasy", "bin": { "mcp": "bin/mcp-server.js" @@ -22,8 +22,7 @@ "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "@tanstack/react-query": "^5", "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": ">= 3" + "react-dom": "^18 || ^19" }, "peerDependenciesMeta": { "@modelcontextprotocol/sdk": {"optional":true}, @@ -38,16 +37,15 @@ "@tanstack/react-query": "^5.61.4", "@types/express": "^4.17.21", "@types/react": "^18.3.12", - "bun": "^1.2.2", - "bun-types": "^1.2.2", + "bun": "1.2.17", + "bun-types": "1.2.17", "eslint": "^9.19.0", "express": "^4.21.2", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "dependencies": { - + "zod": "^3.20.0" } } diff --git a/src/lib/config.ts b/src/lib/config.ts index 1254ca2b..20f4356e 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.4.0", - sdkVersion: "5.0.0-rc.4", - genVersion: "2.628.0", + sdkVersion: "5.0.0-rc.5", + genVersion: "2.677.3", userAgent: - "speakeasy-sdk/typescript 5.0.0-rc.4 2.628.0 0.4.0 @speakeasy-api/speakeasy-client-sdk-typescript", + "speakeasy-sdk/typescript 5.0.0-rc.5 2.677.3 0.4.0 @speakeasy-api/speakeasy-client-sdk-typescript", } as const; diff --git a/src/lib/security.ts b/src/lib/security.ts index 8273a7fe..44eeac68 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -6,8 +6,8 @@ import * as shared from "../sdk/models/shared/index.js"; type OAuth2PasswordFlow = { username: string; - password?: string | undefined; - clientID: string; + password: string; + clientID?: string | undefined; clientSecret?: string | undefined; tokenURL: string; }; diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts index 3b887a09..e37d8f80 100644 --- a/src/mcp-server/cli/start/command.ts +++ b/src/mcp-server/cli/start/command.ts @@ -6,7 +6,6 @@ import { buildCommand } from "@stricli/core"; import * as z from "zod"; import { ServerList } from "../../../lib/config.js"; import { consoleLoggerLevels } from "../../console-logger.js"; -import { mcpScopes } from "../../scopes.js"; export const startCommand = buildCommand({ loader: async () => { @@ -37,18 +36,6 @@ export const startCommand = buildCommand({ return z.string().parse(value); }, }, - ...(mcpScopes.length - ? { - scope: { - kind: "enum", - brief: - "Mount tools/resources that match given scope (repeatable flag)", - values: mcpScopes, - variadic: true, - optional: true, - }, - } - : {}), "api-key": { kind: "parsed", brief: "Sets the apiKey auth field for the API", diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts index 722d6807..42cc0b29 100644 --- a/src/mcp-server/cli/start/impl.ts +++ b/src/mcp-server/cli/start/impl.ts @@ -11,14 +11,12 @@ import { ConsoleLoggerLevel, createConsoleLogger, } from "../../console-logger.js"; -import { MCPScope } from "../../scopes.js"; import { createMCPServer } from "../../server.js"; interface StartCommandFlags { readonly transport: "stdio" | "sse"; readonly port: number; readonly tool?: string[]; - readonly scope?: MCPScope[]; readonly "api-key"?: string | undefined; readonly bearer?: string | undefined; readonly "workspace-identifier"?: string | undefined; @@ -52,7 +50,6 @@ async function startStdio(flags: StartCommandFlags) { const server = createMCPServer({ logger, allowedTools: flags.tool, - scopes: flags.scope, security: { apiKey: flags["api-key"] ?? "", bearer: flags.bearer ?? "", @@ -78,7 +75,6 @@ async function startSSE(flags: StartCommandFlags) { const mcpServer = createMCPServer({ logger, allowedTools: flags.tool, - scopes: flags.scope, security: { apiKey: flags["api-key"] ?? "", bearer: flags.bearer ?? "", diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index 68467e81..e045f09a 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "5.0.0-rc.4", + currentVersion: "5.0.0-rc.5", }, }); diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 1fada170..e34351ac 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -101,7 +101,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Speakeasy", - version: "5.0.0-rc.4", + version: "5.0.0-rc.5", }); const client = new SpeakeasyCore({ diff --git a/src/sdk/models/errors/error.ts b/src/sdk/models/errors/error.ts index ef279a4b..2073e23c 100644 --- a/src/sdk/models/errors/error.ts +++ b/src/sdk/models/errors/error.ts @@ -31,9 +31,7 @@ export class ErrorT extends SpeakeasyError { err: ErrorTData, httpMeta: { response: Response; request: Request; body: string }, ) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; + const message = err.message || `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; diff --git a/src/sdk/models/errors/sdkerror.ts b/src/sdk/models/errors/sdkerror.ts index 2e0cd9b5..aee6ed99 100644 --- a/src/sdk/models/errors/sdkerror.ts +++ b/src/sdk/models/errors/sdkerror.ts @@ -25,8 +25,14 @@ export class SDKError extends SpeakeasyError { }`; } const body = httpMeta.body || `""`; - message += body.length > 100 ? "\n" : " "; - message += `Body ${body}`; + message += body.length > 100 ? "\n" : ". "; + let bodyDisplay = body; + if (body.length > 10000) { + const truncated = body.substring(0, 10000); + const remaining = body.length - 10000; + bodyDisplay = `${truncated}...and ${remaining} more chars`; + } + message += `Body: ${bodyDisplay}`; message = message.trim(); super(message, httpMeta); this.name = "SDKError"; diff --git a/src/sdk/models/shared/accounttype.ts b/src/sdk/models/shared/accounttype.ts index f1b03645..685c568e 100644 --- a/src/sdk/models/shared/accounttype.ts +++ b/src/sdk/models/shared/accounttype.ts @@ -13,6 +13,7 @@ export const AccountType = { Free: "free", ScaleUp: "scale-up", Business: "business", + Oss: "oss", Enterprise: "enterprise", } as const; export type AccountType = OpenEnum; diff --git a/src/sdk/models/shared/index.ts b/src/sdk/models/shared/index.ts index 2ddccf17..fb7272d1 100644 --- a/src/sdk/models/shared/index.ts +++ b/src/sdk/models/shared/index.ts @@ -42,6 +42,7 @@ export * from "./organizationusageresponse.js"; export * from "./preflightrequest.js"; export * from "./preflighttoken.js"; export * from "./publishingtoken.js"; +export * from "./relativediff.js"; export * from "./remotedocument.js"; export * from "./remotesource.js"; export * from "./remotesourcesubscriptionsettings.js"; diff --git a/src/sdk/models/shared/relativediff.ts b/src/sdk/models/shared/relativediff.ts new file mode 100644 index 00000000..979591b5 --- /dev/null +++ b/src/sdk/models/shared/relativediff.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { safeParse } from "../../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A relative diff between the current revision and the previous revision. + */ +export type RelativeDiff = { + /** + * The number of lines added against the previous revision + */ + addedLines?: number | undefined; + /** + * The number of lines removed against the previous revision + */ + removedLines?: number | undefined; +}; + +/** @internal */ +export const RelativeDiff$inboundSchema: z.ZodType< + RelativeDiff, + z.ZodTypeDef, + unknown +> = z.object({ + added_lines: z.number().int().optional(), + removed_lines: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "added_lines": "addedLines", + "removed_lines": "removedLines", + }); +}); + +/** @internal */ +export type RelativeDiff$Outbound = { + added_lines?: number | undefined; + removed_lines?: number | undefined; +}; + +/** @internal */ +export const RelativeDiff$outboundSchema: z.ZodType< + RelativeDiff$Outbound, + z.ZodTypeDef, + RelativeDiff +> = z.object({ + addedLines: z.number().int().optional(), + removedLines: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + addedLines: "added_lines", + removedLines: "removed_lines", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RelativeDiff$ { + /** @deprecated use `RelativeDiff$inboundSchema` instead. */ + export const inboundSchema = RelativeDiff$inboundSchema; + /** @deprecated use `RelativeDiff$outboundSchema` instead. */ + export const outboundSchema = RelativeDiff$outboundSchema; + /** @deprecated use `RelativeDiff$Outbound` instead. */ + export type Outbound = RelativeDiff$Outbound; +} + +export function relativeDiffToJSON(relativeDiff: RelativeDiff): string { + return JSON.stringify(RelativeDiff$outboundSchema.parse(relativeDiff)); +} + +export function relativeDiffFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RelativeDiff$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RelativeDiff' from JSON`, + ); +} diff --git a/src/sdk/models/shared/revisioncontentsmetadata.ts b/src/sdk/models/shared/revisioncontentsmetadata.ts index 098d1349..77d00c7a 100644 --- a/src/sdk/models/shared/revisioncontentsmetadata.ts +++ b/src/sdk/models/shared/revisioncontentsmetadata.ts @@ -8,6 +8,12 @@ import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RelativeDiff, + RelativeDiff$inboundSchema, + RelativeDiff$Outbound, + RelativeDiff$outboundSchema, +} from "./relativediff.js"; export const RevisionContentsMetadataType = { OpenapiBundle: "OPENAPI_BUNDLE", @@ -43,6 +49,10 @@ export type RevisionContentsMetadata = { * The operation IDs contained in the OAS. Will be empty if the OAS is an overlay. */ operationIds: Array; + /** + * A relative diff between the current revision and the previous revision. + */ + relativeDiff?: RelativeDiff | undefined; /** * The digest of the parent bundle */ @@ -100,6 +110,7 @@ export const RevisionContentsMetadata$inboundSchema: z.ZodType< namespace: z.string(), num_overlay_actions: z.number().int(), operation_ids: z.array(z.string()), + relative_diff: RelativeDiff$inboundSchema.optional(), revision_digest: z.string(), tags: z.array(z.string()), title: z.string(), @@ -112,6 +123,7 @@ export const RevisionContentsMetadata$inboundSchema: z.ZodType< "created_at": "createdAt", "num_overlay_actions": "numOverlayActions", "operation_ids": "operationIds", + "relative_diff": "relativeDiff", "revision_digest": "revisionDigest", "workspace_id": "workspaceId", }); @@ -126,6 +138,7 @@ export type RevisionContentsMetadata$Outbound = { namespace: string; num_overlay_actions: number; operation_ids: Array; + relative_diff?: RelativeDiff$Outbound | undefined; revision_digest: string; tags: Array; title: string; @@ -147,6 +160,7 @@ export const RevisionContentsMetadata$outboundSchema: z.ZodType< namespace: z.string(), numOverlayActions: z.number().int(), operationIds: z.array(z.string()), + relativeDiff: RelativeDiff$outboundSchema.optional(), revisionDigest: z.string(), tags: z.array(z.string()), title: z.string(), @@ -159,6 +173,7 @@ export const RevisionContentsMetadata$outboundSchema: z.ZodType< createdAt: "created_at", numOverlayActions: "num_overlay_actions", operationIds: "operation_ids", + relativeDiff: "relative_diff", revisionDigest: "revision_digest", workspaceId: "workspace_id", }); diff --git a/src/sdk/types/constdatetime.ts b/src/sdk/types/constdatetime.ts index c0a4409c..eeff4dde 100644 --- a/src/sdk/types/constdatetime.ts +++ b/src/sdk/types/constdatetime.ts @@ -11,5 +11,5 @@ export function constDateTime( return ( typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() ); - }, `Value must be equivelant to ${val}`); + }, `Value must be equivalent to ${val}`); }