@moovio/sdk 25.1.2 → 25.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2340,19 +2340,23 @@ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
2340
2340
  used to integrate a third-party HTTP client or when writing tests to mock out
2341
2341
  the HTTP client and feed in fixtures.
2342
2342
 
2343
- The following example shows how to use the `"beforeRequest"` hook to to add a
2344
- custom header and a timeout to requests and how to use the `"requestError"` hook
2345
- to log errors:
2343
+ The following example shows how to:
2344
+ - route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
2345
+ - use the `"beforeRequest"` hook to add a custom header and a timeout to requests
2346
+ - use the `"requestError"` hook to log errors
2346
2347
 
2347
2348
  ```typescript
2348
2349
  import { Moov } from "@moovio/sdk";
2350
+ import { ProxyAgent } from "undici";
2349
2351
  import { HTTPClient } from "@moovio/sdk/lib/http";
2350
2352
 
2353
+ const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
2354
+
2351
2355
  const httpClient = new HTTPClient({
2352
- // fetcher takes a function that has the same signature as native `fetch`.
2353
- fetcher: (request) => {
2354
- return fetch(request);
2355
- }
2356
+ // 'fetcher' takes a function that has the same signature as native 'fetch'.
2357
+ fetcher: (input, init) =>
2358
+ // 'dispatcher' is specific to undici and not part of the standard Fetch API.
2359
+ fetch(input, { ...init, dispatcher } as RequestInit),
2356
2360
  });
2357
2361
 
2358
2362
  httpClient.addHook("beforeRequest", (request) => {
package/bin/mcp-server.js CHANGED
@@ -52879,9 +52879,9 @@ var init_config = __esm(() => {
52879
52879
  SDK_METADATA = {
52880
52880
  language: "typescript",
52881
52881
  openapiDocVersion: "v2025.01.00",
52882
- sdkVersion: "25.1.2",
52883
- genVersion: "2.811.2",
52884
- userAgent: "speakeasy-sdk/typescript 25.1.2 2.811.2 v2025.01.00 @moovio/sdk"
52882
+ sdkVersion: "25.1.4",
52883
+ genVersion: "2.818.4",
52884
+ userAgent: "speakeasy-sdk/typescript 25.1.4 2.818.4 v2025.01.00 @moovio/sdk"
52885
52885
  };
52886
52886
  });
52887
52887
 
@@ -98388,7 +98388,7 @@ var init_webhooksUpdate2 = __esm(() => {
98388
98388
  function createMCPServer(deps) {
98389
98389
  const server = new McpServer({
98390
98390
  name: "Moov",
98391
- version: "25.1.2"
98391
+ version: "25.1.4"
98392
98392
  });
98393
98393
  const client = new MoovCore({
98394
98394
  security: deps.security,
@@ -99942,7 +99942,7 @@ var routes = rn({
99942
99942
  var app = Ve(routes, {
99943
99943
  name: "mcp",
99944
99944
  versionInfo: {
99945
- currentVersion: "25.1.2"
99945
+ currentVersion: "25.1.4"
99946
99946
  }
99947
99947
  });
99948
99948
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -99950,5 +99950,5 @@ export {
99950
99950
  app
99951
99951
  };
99952
99952
 
99953
- //# debugId=537A03C52B64549D64756E2164756E21
99953
+ //# debugId=074400325989964064756E2164756E21
99954
99954
  //# sourceMappingURL=mcp-server.js.map