{"id":22089862,"url":"https://github.com/speakeasy-api/speakeasy-client-sdk-typescript","last_synced_at":"2025-06-26T00:04:05.429Z","repository":{"id":65352953,"uuid":"549146940","full_name":"speakeasy-api/speakeasy-client-sdk-typescript","owner":"speakeasy-api","description":"Developer-friendly \u0026 type-safe TypeScript SDK specifically catered to leverage the Speakeasy API.","archived":false,"fork":false,"pushed_at":"2025-06-20T12:00:26.000Z","size":1990,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-20T12:41:04.906Z","etag":null,"topics":["sdk","speakeasy","typescript"],"latest_commit_sha":null,"homepage":"https://speakeasy.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-10T18:44:44.000Z","updated_at":"2025-06-20T12:00:30.000Z","dependencies_parsed_at":"2024-01-05T01:26:00.321Z","dependency_job_id":"5a261d08-074b-4756-94f1-70b7a4fc63e0","html_url":"https://github.com/speakeasy-api/speakeasy-client-sdk-typescript","commit_stats":null,"previous_names":[],"tags_count":222,"template":false,"template_full_name":null,"purl":"pkg:github/speakeasy-api/speakeasy-client-sdk-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-api","download_url":"https://codeload.github.com/speakeasy-api/speakeasy-client-sdk-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260950091,"owners_count":23087613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sdk","speakeasy","typescript"],"created_at":"2024-12-01T02:14:32.165Z","updated_at":"2025-06-26T00:04:05.409Z","avatar_url":"https://github.com/speakeasy-api.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \u003ca href=\"https://www.speakeasy.com/\" target=\"_blank\"\u003e\n   \u003cpicture\u003e\n       \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/user-attachments/assets/21dd5d3a-aefc-4cd3-abee-5e17ef1d4dad\"\u003e\n       \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/0a747f98-d228-462d-9964-fd87bf93adc5\"\u003e\n       \u003cimg width=\"100px\" src=\"https://github.com/user-attachments/assets/21dd5d3a-aefc-4cd3-abee-5e17ef1d4dad#gh-light-mode-only\" alt=\"Speakeasy\"\u003e\n   \u003c/picture\u003e\n \u003c/a\u003e\n  \u003ch1\u003eSpeakeasy\u003c/h1\u003e\n  \u003cp\u003eBuild APIs your users love ❤️ with Speakeasy\u003c/p\u003e\n  \u003cdiv\u003e\n   \u003ca href=\"https://speakeasy.com/docs/create-client-sdks/\" target=\"_blank\"\u003e\u003cb\u003eDocs Quickstart\u003c/b\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;//\u0026nbsp;\u0026nbsp;\u003ca href=\"https://join.slack.com/t/speakeasy-dev/shared_invite/zt-1cwb3flxz-lS5SyZxAsF_3NOq5xc8Cjw\" target=\"_blank\"\u003e\u003cb\u003eJoin us on Slack\u003c/b\u003e\u003c/a\u003e\n  \u003c/div\u003e\n \u003cbr /\u003e\n\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nSpeakeasy API: The Subscriptions API manages subscriptions for CLI and registry events\n\nFor more information about the API: [The Speakeasy Platform Documentation](/docs)\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\u003c!-- $toc-max-depth=2 --\u003e\n  * [SDK Installation](#sdk-installation)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Error Handling](#error-handling)\n  * [Server Selection](#server-selection)\n  * [Custom HTTP Client](#custom-http-client)\n  * [Authentication](#authentication)\n  * [Retries](#retries)\n  * [Requirements](#requirements)\n  * [Standalone functions](#standalone-functions)\n  * [React hooks with TanStack Query](#react-hooks-with-tanstack-query)\n  * [Global Parameters](#global-parameters)\n  * [File uploads](#file-uploads)\n  * [Debugging](#debugging)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\nThe SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.\n\n### NPM\n\n```bash\nnpm add @speakeasy-api/speakeasy-client-sdk-typescript\n# Install optional peer dependencies if you plan to use React hooks\nnpm add @tanstack/react-query react react-dom\n```\n\n### PNPM\n\n```bash\npnpm add @speakeasy-api/speakeasy-client-sdk-typescript\n# Install optional peer dependencies if you plan to use React hooks\npnpm add @tanstack/react-query react react-dom\n```\n\n### Bun\n\n```bash\nbun add @speakeasy-api/speakeasy-client-sdk-typescript\n# Install optional peer dependencies if you plan to use React hooks\nbun add @tanstack/react-query react react-dom\n```\n\n### Yarn\n\n```bash\nyarn add @speakeasy-api/speakeasy-client-sdk-typescript zod\n# Install optional peer dependencies if you plan to use React hooks\nyarn add @tanstack/react-query react react-dom\n\n# Note that Yarn does not install peer dependencies automatically. You will need\n# to install zod as shown above.\n```\n\n\n\n### Model Context Protocol (MCP) Server\n\nThis SDK is also an installable MCP server where the various SDK methods are\nexposed as tools that can be invoked by AI applications.\n\n\u003e Node.js v20 or greater is required to run the MCP server from npm.\n\n\u003cdetails\u003e\n\u003csummary\u003eClaude installation steps\u003c/summary\u003e\n\nAdd the following server definition to your `claude_desktop_config.json` file:\n\n```json\n{\n  \"mcpServers\": {\n    \"Speakeasy\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\", \"--package\", \"@speakeasy-api/speakeasy-client-sdk-typescript\",\n        \"--\",\n        \"mcp\", \"start\",\n        \"--api-key\", \"...\",\n        \"--bearer\", \"...\",\n        \"--workspace-identifier\", \"...\",\n        \"--workspace-id\", \"...\"\n      ]\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCursor installation steps\u003c/summary\u003e\n\nCreate a `.cursor/mcp.json` file in your project root with the following content:\n\n```json\n{\n  \"mcpServers\": {\n    \"Speakeasy\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\", \"--package\", \"@speakeasy-api/speakeasy-client-sdk-typescript\",\n        \"--\",\n        \"mcp\", \"start\",\n        \"--api-key\", \"...\",\n        \"--bearer\", \"...\",\n        \"--workspace-identifier\", \"...\",\n        \"--workspace-id\", \"...\"\n      ]\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\nYou can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:\n\n```bash\ncurl -L -o mcp-server \\\n    https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 \u0026\u0026 \\\nchmod +x mcp-server\n```\n\nIf the repo is a private repo you must add your Github PAT to download a release `-H \"Authorization: Bearer {GITHUB_PAT}\"`.\n\n\n```json\n{\n  \"mcpServers\": {\n    \"Todos\": {\n      \"command\": \"./DOWNLOAD/PATH/mcp-server\",\n      \"args\": [\n        \"start\"\n      ]\n    }\n  }\n}\n```\n\nFor a full list of server arguments, run:\n\n```sh\nnpx -y --package @speakeasy-api/speakeasy-client-sdk-typescript -- mcp start --help\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource();\n}\n\nrun();\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n### [artifacts](docs/sdks/artifacts/README.md)\n\n* [createRemoteSource](docs/sdks/artifacts/README.md#createremotesource) - Configure a new remote source\n* [getBlob](docs/sdks/artifacts/README.md#getblob) - Get blob for a particular digest\n* [getManifest](docs/sdks/artifacts/README.md#getmanifest) - Get manifest for a particular reference\n* [getNamespaces](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.\n* [getRevisions](docs/sdks/artifacts/README.md#getrevisions)\n* [getTags](docs/sdks/artifacts/README.md#gettags)\n* [listRemoteSources](docs/sdks/artifacts/README.md#listremotesources) - Get remote sources attached to a particular namespace\n* [postTags](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision\n* [preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints\n* [setArchived](docs/sdks/artifacts/README.md#setarchived) - Set whether a namespace is archived\n* [setVisibility](docs/sdks/artifacts/README.md#setvisibility) - Set visibility of a namespace with an existing metadata entry\n\n### [auth](docs/sdks/auth/README.md)\n\n* [getAccess](docs/sdks/auth/README.md#getaccess) - Get access allowances for a particular workspace\n* [getAccessToken](docs/sdks/auth/README.md#getaccesstoken) - Get or refresh an access token for the current workspace.\n* [getUser](docs/sdks/auth/README.md#getuser) - Get information about the current user.\n* [validateApiKey](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.\n\n### [codeSamples](docs/sdks/codesamples/README.md)\n\n* [generateCodeSamplePreview](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters.\n* [generateCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling.\n* [get](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets\n* [getCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation.\n\n### [events](docs/sdks/events/README.md)\n\n* [getEventsByTarget](docs/sdks/events/README.md#geteventsbytarget) - Load recent events for a particular workspace\n* [getTargets](docs/sdks/events/README.md#gettargets) - Load targets for a particular workspace\n* [getTargetsDeprecated](docs/sdks/events/README.md#gettargetsdeprecated) - Load targets for a particular workspace\n* [post](docs/sdks/events/README.md#post) - Post events for a specific workspace\n* [search](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field\n\n### [github](docs/sdks/github/README.md)\n\n* [checkAccess](docs/sdks/github/README.md#checkaccess)\n* [checkPublishingPRs](docs/sdks/github/README.md#checkpublishingprs)\n* [checkPublishingSecrets](docs/sdks/github/README.md#checkpublishingsecrets)\n* [configureCodeSamples](docs/sdks/github/README.md#configurecodesamples)\n* [configureMintlifyRepo](docs/sdks/github/README.md#configuremintlifyrepo)\n* [configureTarget](docs/sdks/github/README.md#configuretarget)\n* [getAction](docs/sdks/github/README.md#getaction)\n* [getSetup](docs/sdks/github/README.md#getsetup)\n* [linkGithub](docs/sdks/github/README.md#linkgithub)\n* [storePublishingSecrets](docs/sdks/github/README.md#storepublishingsecrets)\n* [triggerAction](docs/sdks/github/README.md#triggeraction)\n\n### [organizations](docs/sdks/organizations/README.md)\n\n* [create](docs/sdks/organizations/README.md#create) - Create an organization\n* [createBillingAddOns](docs/sdks/organizations/README.md#createbillingaddons) - Create billing add ons\n* [createFreeTrial](docs/sdks/organizations/README.md#createfreetrial) - Create a free trial for an organization\n* [deleteBillingAddOn](docs/sdks/organizations/README.md#deletebillingaddon) - Delete billing add ons\n* [get](docs/sdks/organizations/README.md#get) - Get organization\n* [getAll](docs/sdks/organizations/README.md#getall) - Get organizations for a user\n* [getBillingAddOns](docs/sdks/organizations/README.md#getbillingaddons) - Get billing add ons\n* [getUsage](docs/sdks/organizations/README.md#getusage) - Get billing usage summary for a particular organization\n\n### [publishingTokens](docs/sdks/publishingtokens/README.md)\n\n* [create](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace\n* [delete](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token\n* [get](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token\n* [list](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace\n* [resolveMetadata](docs/sdks/publishingtokens/README.md#resolvemetadata) - Get metadata about the token\n* [resolveTarget](docs/sdks/publishingtokens/README.md#resolvetarget) - Get a specific publishing token target\n* [update](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token\n\n### [reports](docs/sdks/reports/README.md)\n\n* [getChangesReportSignedUrl](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.\n* [getLintingReportSignedUrl](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.\n* [uploadReport](docs/sdks/reports/README.md#uploadreport) - Upload a report.\n\n### [schemaStore](docs/sdks/schemastore/README.md)\n\n* [createSchemaStoreItem](docs/sdks/schemastore/README.md#createschemastoreitem) - Create a schema in the schema store\n\n### [shortURLs](docs/sdks/shorturls/README.md)\n\n* [create](docs/sdks/shorturls/README.md#create) - Shorten a URL.\n\n\n### [subscriptions](docs/sdks/subscriptions/README.md)\n\n* [activateSubscriptionNamespace](docs/sdks/subscriptions/README.md#activatesubscriptionnamespace) - Activate an ignored namespace for a subscription\n* [ignoreSubscriptionNamespace](docs/sdks/subscriptions/README.md#ignoresubscriptionnamespace) - Ignored a namespace for a subscription\n\n### [suggest](docs/sdks/suggest/README.md)\n\n* [suggest](docs/sdks/suggest/README.md#suggest) - Generate suggestions for improving an OpenAPI document.\n* [suggestItems](docs/sdks/suggest/README.md#suggestitems) - Generate generic suggestions for a list of items.\n* [suggestOpenAPI](docs/sdks/suggest/README.md#suggestopenapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document.\n* [suggestOpenAPIRegistry](docs/sdks/suggest/README.md#suggestopenapiregistry) - Generate suggestions for improving an OpenAPI document stored in the registry.\n\n### [workspaces](docs/sdks/workspaces/README.md)\n\n* [create](docs/sdks/workspaces/README.md#create) - Create a workspace\n* [createToken](docs/sdks/workspaces/README.md#createtoken) - Create a token for a particular workspace\n* [deleteToken](docs/sdks/workspaces/README.md#deletetoken) - Delete a token for a particular workspace\n* [get](docs/sdks/workspaces/README.md#get) - Get workspace by context\n* [getAll](docs/sdks/workspaces/README.md#getall) - Get workspaces for a user\n* [getByID](docs/sdks/workspaces/README.md#getbyid) - Get workspace\n* [getFeatureFlags](docs/sdks/workspaces/README.md#getfeatureflags) - Get workspace feature flags\n* [getSettings](docs/sdks/workspaces/README.md#getsettings) - Get workspace settings\n* [getTeam](docs/sdks/workspaces/README.md#getteam) - Get team members for a particular workspace\n* [getTokens](docs/sdks/workspaces/README.md#gettokens) - Get tokens for a particular workspace\n* [grantAccess](docs/sdks/workspaces/README.md#grantaccess) - Grant a user access to a particular workspace\n* [revokeAccess](docs/sdks/workspaces/README.md#revokeaccess) - Revoke a user's access to a particular workspace\n* [setFeatureFlags](docs/sdks/workspaces/README.md#setfeatureflags) - Set workspace feature flags\n* [update](docs/sdks/workspaces/README.md#update) - Update workspace details\n* [updateSettings](docs/sdks/workspaces/README.md#updatesettings) - Update workspace settings\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\n\n\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\n[`SpeakeasyError`](./src/sdk/models/errors/speakeasyerror.ts) is the base class for all HTTP error responses. It has the following properties:\n\n| Property            | Type       | Description                                                                             |\n| ------------------- | ---------- | --------------------------------------------------------------------------------------- |\n| `error.message`     | `string`   | Error message                                                                           |\n| `error.statusCode`  | `number`   | HTTP response status code eg `404`                                                      |\n| `error.headers`     | `Headers`  | HTTP response headers                                                                   |\n| `error.body`        | `string`   | HTTP body. Can be empty string if no body is returned.                                  |\n| `error.rawResponse` | `Response` | Raw HTTP response                                                                       |\n| `error.data$`       |            | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |\n\n### Example\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\nimport * as errors from \"@speakeasy-api/speakeasy-client-sdk-typescript/sdk/models/errors\";\n\nconst speakeasy = new Speakeasy({\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  try {\n    await speakeasy.artifacts.createRemoteSource();\n  } catch (error) {\n    // The base class for HTTP error responses\n    if (error instanceof errors.SpeakeasyError) {\n      console.log(error.message);\n      console.log(error.statusCode);\n      console.log(error.body);\n      console.log(error.headers);\n\n      // Depending on the method different errors may be thrown\n      if (error instanceof errors.ErrorT) {\n        console.log(error.data$.message); // string\n        console.log(error.data$.statusCode); // number\n      }\n    }\n  }\n}\n\nrun();\n\n```\n\n### Error Classes\n**Primary errors:**\n* [`SpeakeasyError`](./src/sdk/models/errors/speakeasyerror.ts): The base class for HTTP error responses.\n  * [`ErrorT`](docs/sdk/models/errors/errort.md): The `Status` type defines a logical error model. *\n\n\u003cdetails\u003e\u003csummary\u003eLess common errors (6)\u003c/summary\u003e\n\n\u003cbr /\u003e\n\n**Network errors:**\n* [`ConnectionError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server.\n* [`RequestTimeoutError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.\n* [`RequestAbortedError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request was aborted by the client.\n* [`InvalidRequestError`](./src/sdk/models/errors/httpclienterrors.ts): Any input used to create a request is invalid.\n* [`UnexpectedClientError`](./src/sdk/models/errors/httpclienterrors.ts): Unrecognised or unexpected error.\n\n\n**Inherit from [`SpeakeasyError`](./src/sdk/models/errors/speakeasyerror.ts)**:\n* [`ResponseValidationError`](./src/sdk/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.\n\n\u003c/details\u003e\n\n\\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.\n\u003c!-- End Error Handling [errors] --\u003e\n\n\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Select Server by Name\n\nYou can override the default server globally by passing a server name to the `server: keyof typeof ServerList` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:\n\n| Name   | Server                           | Description |\n| ------ | -------------------------------- | ----------- |\n| `prod` | `https://api.prod.speakeasy.com` |             |\n\n#### Example\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  server: \"prod\",\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource();\n}\n\nrun();\n\n```\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  serverURL: \"https://api.prod.speakeasy.com\",\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource();\n}\n\nrun();\n\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\n\n\u003c!-- Start Custom HTTP Client [http-client] --\u003e\n## Custom HTTP Client\n\nThe TypeScript SDK makes API calls using an `HTTPClient` that wraps the native\n[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This\nclient is a thin wrapper around `fetch` and provides the ability to attach hooks\naround the request lifecycle that can be used to modify the request or handle\nerrors and response.\n\nThe `HTTPClient` constructor takes an optional `fetcher` argument that can be\nused to integrate a third-party HTTP client or when writing tests to mock out\nthe HTTP client and feed in fixtures.\n\nThe following example shows how to use the `\"beforeRequest\"` hook to to add a\ncustom header and a timeout to requests and how to use the `\"requestError\"` hook\nto log errors:\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\nimport { HTTPClient } from \"@speakeasy-api/speakeasy-client-sdk-typescript/lib/http\";\n\nconst httpClient = new HTTPClient({\n  // fetcher takes a function that has the same signature as native `fetch`.\n  fetcher: (request) =\u003e {\n    return fetch(request);\n  }\n});\n\nhttpClient.addHook(\"beforeRequest\", (request) =\u003e {\n  const nextRequest = new Request(request, {\n    signal: request.signal || AbortSignal.timeout(5000)\n  });\n\n  nextRequest.headers.set(\"x-custom-header\", \"custom value\");\n\n  return nextRequest;\n});\n\nhttpClient.addHook(\"requestError\", (error, request) =\u003e {\n  console.group(\"Request Error\");\n  console.log(\"Reason:\", `${error}`);\n  console.log(\"Endpoint:\", `${request.method} ${request.url}`);\n  console.groupEnd();\n});\n\nconst sdk = new Speakeasy({ httpClient });\n```\n\u003c!-- End Custom HTTP Client [http-client] --\u003e\n\n\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security schemes globally:\n\n| Name                  | Type   | Scheme      |\n| --------------------- | ------ | ----------- |\n| `apiKey`              | apiKey | API key     |\n| `bearer`              | http   | HTTP Bearer |\n| `workspaceIdentifier` | apiKey | API key     |\n\nYou can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource();\n}\n\nrun();\n\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Start Retries [retries] --\u003e\n## Retries\n\nSome of the endpoints in this SDK support retries.  If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API.  However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.\n\nTo change the default retry strategy for a single API call, simply provide a retryConfig object to the call:\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource({\n    retries: {\n      strategy: \"backoff\",\n      backoff: {\n        initialInterval: 1,\n        maxInterval: 50,\n        exponent: 1.1,\n        maxElapsedTime: 100,\n      },\n      retryConnectionErrors: false,\n    },\n  });\n}\n\nrun();\n\n```\n\nIf you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  retryConfig: {\n    strategy: \"backoff\",\n    backoff: {\n      initialInterval: 1,\n      maxInterval: 50,\n      exponent: 1.1,\n      maxElapsedTime: 100,\n    },\n    retryConnectionErrors: false,\n  },\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  await speakeasy.artifacts.createRemoteSource();\n}\n\nrun();\n\n```\n\u003c!-- End Retries [retries] --\u003e\n\n\u003c!-- Start Requirements [requirements] --\u003e\n## Requirements\n\nFor supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).\n\u003c!-- End Requirements [requirements] --\u003e\n\n\u003c!-- Start Standalone functions [standalone-funcs] --\u003e\n## Standalone functions\n\nAll the methods listed above are available as standalone functions. These\nfunctions are ideal for use in applications running in the browser, serverless\nruntimes or other environments where application bundle size is a primary\nconcern. When using a bundler to build your application, all unused\nfunctionality will be either excluded from the final bundle or tree-shaken away.\n\nTo read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAvailable standalone functions\u003c/summary\u003e\n\n- [`artifactsCreateRemoteSource`](docs/sdks/artifacts/README.md#createremotesource) - Configure a new remote source\n- [`artifactsGetBlob`](docs/sdks/artifacts/README.md#getblob) - Get blob for a particular digest\n- [`artifactsGetManifest`](docs/sdks/artifacts/README.md#getmanifest) - Get manifest for a particular reference\n- [`artifactsGetNamespaces`](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.\n- [`artifactsGetRevisions`](docs/sdks/artifacts/README.md#getrevisions)\n- [`artifactsGetTags`](docs/sdks/artifacts/README.md#gettags)\n- [`artifactsListRemoteSources`](docs/sdks/artifacts/README.md#listremotesources) - Get remote sources attached to a particular namespace\n- [`artifactsPostTags`](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision\n- [`artifactsPreflight`](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints\n- [`artifactsSetArchived`](docs/sdks/artifacts/README.md#setarchived) - Set whether a namespace is archived\n- [`artifactsSetVisibility`](docs/sdks/artifacts/README.md#setvisibility) - Set visibility of a namespace with an existing metadata entry\n- [`authGetAccess`](docs/sdks/auth/README.md#getaccess) - Get access allowances for a particular workspace\n- [`authGetAccessToken`](docs/sdks/auth/README.md#getaccesstoken) - Get or refresh an access token for the current workspace.\n- [`authGetUser`](docs/sdks/auth/README.md#getuser) - Get information about the current user.\n- [`authValidateApiKey`](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.\n- [`codeSamplesGenerateCodeSamplePreview`](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters.\n- [`codeSamplesGenerateCodeSamplePreviewAsync`](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling.\n- [`codeSamplesGet`](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets\n- [`codeSamplesGetCodeSamplePreviewAsync`](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation.\n- [`eventsGetEventsByTarget`](docs/sdks/events/README.md#geteventsbytarget) - Load recent events for a particular workspace\n- [`eventsGetTargets`](docs/sdks/events/README.md#gettargets) - Load targets for a particular workspace\n- [`eventsGetTargetsDeprecated`](docs/sdks/events/README.md#gettargetsdeprecated) - Load targets for a particular workspace\n- [`eventsPost`](docs/sdks/events/README.md#post) - Post events for a specific workspace\n- [`eventsSearch`](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field\n- [`githubCheckAccess`](docs/sdks/github/README.md#checkaccess)\n- [`githubCheckPublishingPRs`](docs/sdks/github/README.md#checkpublishingprs)\n- [`githubCheckPublishingSecrets`](docs/sdks/github/README.md#checkpublishingsecrets)\n- [`githubConfigureCodeSamples`](docs/sdks/github/README.md#configurecodesamples)\n- [`githubConfigureMintlifyRepo`](docs/sdks/github/README.md#configuremintlifyrepo)\n- [`githubConfigureTarget`](docs/sdks/github/README.md#configuretarget)\n- [`githubGetAction`](docs/sdks/github/README.md#getaction)\n- [`githubGetSetup`](docs/sdks/github/README.md#getsetup)\n- [`githubLinkGithub`](docs/sdks/github/README.md#linkgithub)\n- [`githubStorePublishingSecrets`](docs/sdks/github/README.md#storepublishingsecrets)\n- [`githubTriggerAction`](docs/sdks/github/README.md#triggeraction)\n- [`organizationsCreate`](docs/sdks/organizations/README.md#create) - Create an organization\n- [`organizationsCreateBillingAddOns`](docs/sdks/organizations/README.md#createbillingaddons) - Create billing add ons\n- [`organizationsCreateFreeTrial`](docs/sdks/organizations/README.md#createfreetrial) - Create a free trial for an organization\n- [`organizationsDeleteBillingAddOn`](docs/sdks/organizations/README.md#deletebillingaddon) - Delete billing add ons\n- [`organizationsGet`](docs/sdks/organizations/README.md#get) - Get organization\n- [`organizationsGetAll`](docs/sdks/organizations/README.md#getall) - Get organizations for a user\n- [`organizationsGetBillingAddOns`](docs/sdks/organizations/README.md#getbillingaddons) - Get billing add ons\n- [`organizationsGetUsage`](docs/sdks/organizations/README.md#getusage) - Get billing usage summary for a particular organization\n- [`publishingTokensCreate`](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace\n- [`publishingTokensDelete`](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token\n- [`publishingTokensGet`](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token\n- [`publishingTokensList`](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace\n- [`publishingTokensResolveMetadata`](docs/sdks/publishingtokens/README.md#resolvemetadata) - Get metadata about the token\n- [`publishingTokensResolveTarget`](docs/sdks/publishingtokens/README.md#resolvetarget) - Get a specific publishing token target\n- [`publishingTokensUpdate`](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token\n- [`reportsGetChangesReportSignedUrl`](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.\n- [`reportsGetLintingReportSignedUrl`](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.\n- [`reportsUploadReport`](docs/sdks/reports/README.md#uploadreport) - Upload a report.\n- [`schemaStoreCreateSchemaStoreItem`](docs/sdks/schemastore/README.md#createschemastoreitem) - Create a schema in the schema store\n- [`shortURLsCreate`](docs/sdks/shorturls/README.md#create) - Shorten a URL.\n- [`subscriptionsActivateSubscriptionNamespace`](docs/sdks/subscriptions/README.md#activatesubscriptionnamespace) - Activate an ignored namespace for a subscription\n- [`subscriptionsIgnoreSubscriptionNamespace`](docs/sdks/subscriptions/README.md#ignoresubscriptionnamespace) - Ignored a namespace for a subscription\n- [`suggestSuggest`](docs/sdks/suggest/README.md#suggest) - Generate suggestions for improving an OpenAPI document.\n- [`suggestSuggestItems`](docs/sdks/suggest/README.md#suggestitems) - Generate generic suggestions for a list of items.\n- [`suggestSuggestOpenAPI`](docs/sdks/suggest/README.md#suggestopenapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document.\n- [`suggestSuggestOpenAPIRegistry`](docs/sdks/suggest/README.md#suggestopenapiregistry) - Generate suggestions for improving an OpenAPI document stored in the registry.\n- [`workspacesCreate`](docs/sdks/workspaces/README.md#create) - Create a workspace\n- [`workspacesCreateToken`](docs/sdks/workspaces/README.md#createtoken) - Create a token for a particular workspace\n- [`workspacesDeleteToken`](docs/sdks/workspaces/README.md#deletetoken) - Delete a token for a particular workspace\n- [`workspacesGet`](docs/sdks/workspaces/README.md#get) - Get workspace by context\n- [`workspacesGetAll`](docs/sdks/workspaces/README.md#getall) - Get workspaces for a user\n- [`workspacesGetByID`](docs/sdks/workspaces/README.md#getbyid) - Get workspace\n- [`workspacesGetFeatureFlags`](docs/sdks/workspaces/README.md#getfeatureflags) - Get workspace feature flags\n- [`workspacesGetSettings`](docs/sdks/workspaces/README.md#getsettings) - Get workspace settings\n- [`workspacesGetTeam`](docs/sdks/workspaces/README.md#getteam) - Get team members for a particular workspace\n- [`workspacesGetTokens`](docs/sdks/workspaces/README.md#gettokens) - Get tokens for a particular workspace\n- [`workspacesGrantAccess`](docs/sdks/workspaces/README.md#grantaccess) - Grant a user access to a particular workspace\n- [`workspacesRevokeAccess`](docs/sdks/workspaces/README.md#revokeaccess) - Revoke a user's access to a particular workspace\n- [`workspacesSetFeatureFlags`](docs/sdks/workspaces/README.md#setfeatureflags) - Set workspace feature flags\n- [`workspacesUpdate`](docs/sdks/workspaces/README.md#update) - Update workspace details\n- [`workspacesUpdateSettings`](docs/sdks/workspaces/README.md#updatesettings) - Update workspace settings\n\n\u003c/details\u003e\n\u003c!-- End Standalone functions [standalone-funcs] --\u003e\n\n\u003c!-- Start React hooks with TanStack Query [react-query] --\u003e\n## React hooks with TanStack Query\n\nReact hooks built on [TanStack Query][tanstack-query] are included in this SDK.\nThese hooks and the utility functions provided alongside them can be used to\nbuild rich applications that pull data from the API using one of the most\npopular asynchronous state management library.\n\n[tanstack-query]: https://tanstack.com/query/v5/docs/framework/react/overview\n\nTo learn about this feature and how to get started, check\n[REACT_QUERY.md](./REACT_QUERY.md).\n\n\u003e [!WARNING]\n\u003e\n\u003e This feature is currently in **preview** and is subject to breaking changes\n\u003e within the current major version of the SDK as we gather user feedback on it.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAvailable React hooks\u003c/summary\u003e\n\n- [`useArtifactsCreateRemoteSourceMutation`](docs/sdks/artifacts/README.md#createremotesource) - Configure a new remote source\n- [`useArtifactsGetBlob`](docs/sdks/artifacts/README.md#getblob) - Get blob for a particular digest\n- [`useArtifactsGetManifest`](docs/sdks/artifacts/README.md#getmanifest) - Get manifest for a particular reference\n- [`useArtifactsGetNamespaces`](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.\n- [`useArtifactsGetRevisions`](docs/sdks/artifacts/README.md#getrevisions)\n- [`useArtifactsGetTags`](docs/sdks/artifacts/README.md#gettags)\n- [`useArtifactsListRemoteSources`](docs/sdks/artifacts/README.md#listremotesources) - Get remote sources attached to a particular namespace\n- [`useArtifactsPostTagsMutation`](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision\n- [`useArtifactsPreflightMutation`](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints\n- [`useArtifactsSetArchivedMutation`](docs/sdks/artifacts/README.md#setarchived) - Set whether a namespace is archived\n- [`useArtifactsSetVisibilityMutation`](docs/sdks/artifacts/README.md#setvisibility) - Set visibility of a namespace with an existing metadata entry\n- [`useAuthGetAccess`](docs/sdks/auth/README.md#getaccess) - Get access allowances for a particular workspace\n- [`useAuthGetAccessToken`](docs/sdks/auth/README.md#getaccesstoken) - Get or refresh an access token for the current workspace.\n- [`useAuthGetUser`](docs/sdks/auth/README.md#getuser) - Get information about the current user.\n- [`useAuthValidateApiKey`](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.\n- [`useCodeSamplesGenerateCodeSamplePreviewAsyncMutation`](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling.\n- [`useCodeSamplesGenerateCodeSamplePreviewMutation`](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters.\n- [`useCodeSamplesGet`](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets\n- [`useCodeSamplesGetCodeSamplePreviewAsync`](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation.\n- [`useEventsGetEventsByTarget`](docs/sdks/events/README.md#geteventsbytarget) - Load recent events for a particular workspace\n- [`useEventsGetTargets`](docs/sdks/events/README.md#gettargets) - Load targets for a particular workspace\n- [`useEventsGetTargetsDeprecated`](docs/sdks/events/README.md#gettargetsdeprecated) - Load targets for a particular workspace\n- [`useEventsPostMutation`](docs/sdks/events/README.md#post) - Post events for a specific workspace\n- [`useEventsSearch`](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field\n- [`useGithubCheckAccess`](docs/sdks/github/README.md#checkaccess)\n- [`useGithubCheckPublishingPRs`](docs/sdks/github/README.md#checkpublishingprs)\n- [`useGithubCheckPublishingSecrets`](docs/sdks/github/README.md#checkpublishingsecrets)\n- [`useGithubConfigureCodeSamplesMutation`](docs/sdks/github/README.md#configurecodesamples)\n- [`useGithubConfigureMintlifyRepoMutation`](docs/sdks/github/README.md#configuremintlifyrepo)\n- [`useGithubConfigureTargetMutation`](docs/sdks/github/README.md#configuretarget)\n- [`useGithubGetAction`](docs/sdks/github/README.md#getaction)\n- [`useGithubGetSetup`](docs/sdks/github/README.md#getsetup)\n- [`useGithubLinkGithubMutation`](docs/sdks/github/README.md#linkgithub)\n- [`useGithubStorePublishingSecretsMutation`](docs/sdks/github/README.md#storepublishingsecrets)\n- [`useGithubTriggerActionMutation`](docs/sdks/github/README.md#triggeraction)\n- [`useOrganizationsCreateBillingAddOnsMutation`](docs/sdks/organizations/README.md#createbillingaddons) - Create billing add ons\n- [`useOrganizationsCreateFreeTrialMutation`](docs/sdks/organizations/README.md#createfreetrial) - Create a free trial for an organization\n- [`useOrganizationsCreateMutation`](docs/sdks/organizations/README.md#create) - Create an organization\n- [`useOrganizationsDeleteBillingAddOnMutation`](docs/sdks/organizations/README.md#deletebillingaddon) - Delete billing add ons\n- [`useOrganizationsGet`](docs/sdks/organizations/README.md#get) - Get organization\n- [`useOrganizationsGetAll`](docs/sdks/organizations/README.md#getall) - Get organizations for a user\n- [`useOrganizationsGetBillingAddOns`](docs/sdks/organizations/README.md#getbillingaddons) - Get billing add ons\n- [`useOrganizationsGetUsage`](docs/sdks/organizations/README.md#getusage) - Get billing usage summary for a particular organization\n- [`usePublishingTokensCreateMutation`](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace\n- [`usePublishingTokensDeleteMutation`](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token\n- [`usePublishingTokensGet`](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token\n- [`usePublishingTokensList`](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace\n- [`usePublishingTokensResolveMetadata`](docs/sdks/publishingtokens/README.md#resolvemetadata) - Get metadata about the token\n- [`usePublishingTokensResolveTarget`](docs/sdks/publishingtokens/README.md#resolvetarget) - Get a specific publishing token target\n- [`usePublishingTokensUpdateMutation`](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token\n- [`useReportsGetChangesReportSignedUrl`](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.\n- [`useReportsGetLintingReportSignedUrl`](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.\n- [`useReportsUploadReportMutation`](docs/sdks/reports/README.md#uploadreport) - Upload a report.\n- [`useSchemaStoreCreateSchemaStoreItemMutation`](docs/sdks/schemastore/README.md#createschemastoreitem) - Create a schema in the schema store\n- [`useShortURLsCreateMutation`](docs/sdks/shorturls/README.md#create) - Shorten a URL.\n- [`useSubscriptionsActivateSubscriptionNamespaceMutation`](docs/sdks/subscriptions/README.md#activatesubscriptionnamespace) - Activate an ignored namespace for a subscription\n- [`useSubscriptionsIgnoreSubscriptionNamespaceMutation`](docs/sdks/subscriptions/README.md#ignoresubscriptionnamespace) - Ignored a namespace for a subscription\n- [`useSuggestSuggestItemsMutation`](docs/sdks/suggest/README.md#suggestitems) - Generate generic suggestions for a list of items.\n- [`useSuggestSuggestMutation`](docs/sdks/suggest/README.md#suggest) - Generate suggestions for improving an OpenAPI document.\n- [`useSuggestSuggestOpenAPIMutation`](docs/sdks/suggest/README.md#suggestopenapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document.\n- [`useSuggestSuggestOpenAPIRegistryMutation`](docs/sdks/suggest/README.md#suggestopenapiregistry) - Generate suggestions for improving an OpenAPI document stored in the registry.\n- [`useWorkspacesCreateMutation`](docs/sdks/workspaces/README.md#create) - Create a workspace\n- [`useWorkspacesCreateTokenMutation`](docs/sdks/workspaces/README.md#createtoken) - Create a token for a particular workspace\n- [`useWorkspacesDeleteTokenMutation`](docs/sdks/workspaces/README.md#deletetoken) - Delete a token for a particular workspace\n- [`useWorkspacesGet`](docs/sdks/workspaces/README.md#get) - Get workspace by context\n- [`useWorkspacesGetAll`](docs/sdks/workspaces/README.md#getall) - Get workspaces for a user\n- [`useWorkspacesGetByID`](docs/sdks/workspaces/README.md#getbyid) - Get workspace\n- [`useWorkspacesGetFeatureFlags`](docs/sdks/workspaces/README.md#getfeatureflags) - Get workspace feature flags\n- [`useWorkspacesGetSettings`](docs/sdks/workspaces/README.md#getsettings) - Get workspace settings\n- [`useWorkspacesGetTeam`](docs/sdks/workspaces/README.md#getteam) - Get team members for a particular workspace\n- [`useWorkspacesGetTokens`](docs/sdks/workspaces/README.md#gettokens) - Get tokens for a particular workspace\n- [`useWorkspacesGrantAccessMutation`](docs/sdks/workspaces/README.md#grantaccess) - Grant a user access to a particular workspace\n- [`useWorkspacesRevokeAccessMutation`](docs/sdks/workspaces/README.md#revokeaccess) - Revoke a user's access to a particular workspace\n- [`useWorkspacesSetFeatureFlagsMutation`](docs/sdks/workspaces/README.md#setfeatureflags) - Set workspace feature flags\n- [`useWorkspacesUpdateMutation`](docs/sdks/workspaces/README.md#update) - Update workspace details\n- [`useWorkspacesUpdateSettingsMutation`](docs/sdks/workspaces/README.md#updatesettings) - Update workspace settings\n\n\u003c/details\u003e\n\u003c!-- End React hooks with TanStack Query [react-query] --\u003e\n\n\u003c!-- Start Global Parameters [global-parameters] --\u003e\n## Global Parameters\n\nA parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.\n\nFor example, you can set `workspace_id` to `\"\u003cid\u003e\"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getAccessToken`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.\n\n\n### Available Globals\n\nThe following global parameter is available.\n\n| Name        | Type   | Description                |\n| ----------- | ------ | -------------------------- |\n| workspaceId | string | The workspaceId parameter. |\n\n### Example\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst speakeasy = new Speakeasy({\n  workspaceId: \"\u003cid\u003e\",\n});\n\nasync function run() {\n  const result = await speakeasy.auth.getAccessToken({\n    workspaceId: \"\u003cid\u003e\",\n  });\n\n  console.log(result);\n}\n\nrun();\n\n```\n\u003c!-- End Global Parameters [global-parameters] --\u003e\n\n\u003c!-- Start File uploads [file-upload] --\u003e\n## File uploads\n\nCertain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.\n\n\u003e [!TIP]\n\u003e\n\u003e Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:\n\u003e\n\u003e - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).\n\u003e - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.\n\u003e - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `\u003cinput type=\"file\"\u003e` element.\n\u003e - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\nimport { openAsBlob } from \"node:fs\";\n\nconst speakeasy = new Speakeasy({\n  security: {\n    apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n  },\n});\n\nasync function run() {\n  const result = await speakeasy.codeSamples.generateCodeSamplePreview({\n    language: \"\u003cvalue\u003e\",\n    schemaFile: await openAsBlob(\"example.file\"),\n  });\n\n  console.log(result);\n}\n\nrun();\n\n```\n\u003c!-- End File uploads [file-upload] --\u003e\n\n\u003c!-- Start Debugging [debug] --\u003e\n## Debugging\n\nYou can setup your SDK to emit debug logs for SDK requests and responses.\n\nYou can pass a logger that matches `console`'s interface as an SDK option.\n\n\u003e [!WARNING]\n\u003e Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.\n\n```typescript\nimport { Speakeasy } from \"@speakeasy-api/speakeasy-client-sdk-typescript\";\n\nconst sdk = new Speakeasy({ debugLogger: console });\n```\n\u003c!-- End Debugging [debug] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n\n\n### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-typescript/lists"}