Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: 51cb4b7f-adbc-475c-a495-d8672b13ce8e
management:
docChecksum: 06cbb888ff515821dfe1944e144b913a
docChecksum: 5e12d053f42685ced593019245274662
docVersion: 1.0.0
speakeasyVersion: 1.709.4
generationVersion: 2.816.0
releaseVersion: 1.10.3
configChecksum: ab40df4710e5ee9814130ec857f96c4f
speakeasyVersion: 1.710.0
generationVersion: 2.818.4
releaseVersion: 1.10.4
configChecksum: 33a4efe81fad356fead509ff08ead66b
repoURL: https://github.com/gr4vy/gr4vy-typescript.git
installationURL: https://github.com/gr4vy/gr4vy-typescript
published: true
persistentEdits:
generation_id: 1c4a8d39-4ae4-496a-a4a7-ba5d112efe16
pristine_commit_hash: ac634d4aec7a254a400e2585b38c6aa6e094bd7e
pristine_tree_hash: c9946408a08153abcd19bf9d3bb9f7c323d892b3
generation_id: 5f597dc1-e881-4f5b-8a5f-79e846f53478
pristine_commit_hash: 31f7a5cdb802905e0c8fe94e771cd4759c713dc1
pristine_tree_hash: 182b11175d7fc8b7aec084de102bfdb02380f4f2
features:
typescript:
additionalDependencies: 0.1.0
Expand Down Expand Up @@ -2363,12 +2363,12 @@ trackedFiles:
pristine_git_object: 6e10529a93fb4185b404d0e45a9ce98b7b0ae408
jsr.json:
id: 7f6ab7767282
last_write_checksum: sha1:3ecbb8e427f68166834b71d064542a7839e07fa4
pristine_git_object: ec7474a225f49f90110a926c5837e697212c0442
last_write_checksum: sha1:6d114c2b495d28bd2133e1bc5d08f09061dcca4c
pristine_git_object: dea5c0ff27022a1000a1eaad7cf3dfc9eaf5b404
package.json:
id: 7030d0b2f71b
last_write_checksum: sha1:ecffab4648a57c62e14e65409eb737b0211f05ef
pristine_git_object: de10364815f8d9a8ac95eebdf8dcec47517fe9e8
last_write_checksum: sha1:4b0ce27c5832c7e0deaef491b7d28657d722eb56
pristine_git_object: a78746b5a6cb5f847287b08e0f959625b1af5565
src/core.ts:
id: f431fdbcd144
last_write_checksum: sha1:45271ffd8867c65f66117c59ce98a8b3d8045841
Expand Down Expand Up @@ -2799,8 +2799,8 @@ trackedFiles:
pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7
src/lib/config.ts:
id: 320761608fb3
last_write_checksum: sha1:80f3592aee958f071ae4f5dce143d693c27a7b00
pristine_git_object: d2edfff23b953a798107b237ba4f2d768d3b6266
last_write_checksum: sha1:68f7d98726fa5c5e930e44a7af010863abc06d55
pristine_git_object: e4bba027a17969ad0f661934e4e18841b7952db8
src/lib/dlv.ts:
id: b1988214835a
last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 1.10.3
version: 1.10.4
acceptHeaderEnum: true
additionalDependencies:
dependencies:
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.709.4
speakeasyVersion: 1.710.0
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:273c525522734c81a710e18248f17ff3894232d895fa49ad040f2a1b2d7a0cb8
sourceBlobDigest: sha256:c4f8958d82853b6796766924f89236975398a5c35f6888cbe58ce3cafb1b3308
sourceRevisionDigest: sha256:50222e0a190281d49710f49ef8dd7eb13b1c0af9a544893f5a82578946650ef5
sourceBlobDigest: sha256:f69dc0068e655411f5eee1e9801f9655343274e8e20133d6a0ba2a48ea078c11
tags:
- latest
- speakeasy-sdk-regen-1770770514
- speakeasy-sdk-regen-1770810182
- 1.0.0
targets:
first-target:
Expand All @@ -17,10 +17,10 @@ targets:
typescript:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:273c525522734c81a710e18248f17ff3894232d895fa49ad040f2a1b2d7a0cb8
sourceBlobDigest: sha256:c4f8958d82853b6796766924f89236975398a5c35f6888cbe58ce3cafb1b3308
sourceRevisionDigest: sha256:50222e0a190281d49710f49ef8dd7eb13b1c0af9a544893f5a82578946650ef5
sourceBlobDigest: sha256:f69dc0068e655411f5eee1e9801f9655343274e8e20133d6a0ba2a48ea078c11
codeSamplesNamespace: openapi-typescript-code-samples
codeSamplesRevisionDigest: sha256:5b8b9ee41e5d4752f0e6c7ae557bc5313c5e1ff1fcdea318134c6e00274fe472
codeSamplesRevisionDigest: sha256:8899d6a00b0979f8f8bd2b866ea618eb96ce5951e9a3649e62e35beac15705ae
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,19 +638,23 @@ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.

The following example shows how to use the `"beforeRequest"` hook to to add a
custom header and a timeout to requests and how to use the `"requestError"` hook
to log errors:
The following example shows how to:
- route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
- use the `"beforeRequest"` hook to add a custom header and a timeout to requests
- use the `"requestError"` hook to log errors

```typescript
import { Gr4vy } from "@gr4vy/sdk";
import { ProxyAgent } from "undici";
import { HTTPClient } from "@gr4vy/sdk/lib/http";

const dispatcher = new ProxyAgent("http://proxy.example.com:8080");

const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native `fetch`.
fetcher: (request) => {
return fetch(request);
}
// 'fetcher' takes a function that has the same signature as native 'fetch'.
fetcher: (input, init) =>
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
fetch(input, { ...init, dispatcher } as RequestInit),
});

httpClient.addHook("beforeRequest", (request) => {
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1534,4 +1534,14 @@ Based on:
### Generated
- [typescript v1.10.3] .
### Releases
- [NPM v1.10.3] https://www.npmjs.com/package/@gr4vy/sdk/v/1.10.3 - .
- [NPM v1.10.3] https://www.npmjs.com/package/@gr4vy/sdk/v/1.10.3 - .

## 2026-02-11 11:42:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.710.0 (2.818.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.10.4] .
### Releases
- [NPM v1.10.4] https://www.npmjs.com/package/@gr4vy/sdk/v/1.10.4 - .
2 changes: 1 addition & 1 deletion examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@gr4vy/sdk",
"version": "1.10.3",
"version": "1.10.4",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gr4vy/sdk",
"version": "1.10.3",
"version": "1.10.4",
"author": "Gr4vy",
"main": "./index.js",
"sideEffects": false,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "1.10.3",
genVersion: "2.816.0",
userAgent: "speakeasy-sdk/typescript 1.10.3 2.816.0 1.0.0 @gr4vy/sdk",
sdkVersion: "1.10.4",
genVersion: "2.818.4",
userAgent: "speakeasy-sdk/typescript 1.10.4 2.818.4 1.0.0 @gr4vy/sdk",
} as const;