@moovio/sdk 25.4.2 → 25.4.3

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.04.00",
52882
- sdkVersion: "25.4.2",
52883
- genVersion: "2.816.0",
52884
- userAgent: "speakeasy-sdk/typescript 25.4.2 2.816.0 v2025.04.00 @moovio/sdk"
52882
+ sdkVersion: "25.4.3",
52883
+ genVersion: "2.818.4",
52884
+ userAgent: "speakeasy-sdk/typescript 25.4.3 2.818.4 v2025.04.00 @moovio/sdk"
52885
52885
  };
52886
52886
  });
52887
52887
 
@@ -98464,7 +98464,7 @@ var init_webhooksUpdate2 = __esm(() => {
98464
98464
  function createMCPServer(deps) {
98465
98465
  const server = new McpServer({
98466
98466
  name: "Moov",
98467
- version: "25.4.2"
98467
+ version: "25.4.3"
98468
98468
  });
98469
98469
  const client = new MoovCore({
98470
98470
  security: deps.security,
@@ -100018,7 +100018,7 @@ var routes = rn({
100018
100018
  var app = Ve(routes, {
100019
100019
  name: "mcp",
100020
100020
  versionInfo: {
100021
- currentVersion: "25.4.2"
100021
+ currentVersion: "25.4.3"
100022
100022
  }
100023
100023
  });
100024
100024
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -100026,5 +100026,5 @@ export {
100026
100026
  app
100027
100027
  };
100028
100028
 
100029
- //# debugId=670B43E2721CEE8964756E2164756E21
100029
+ //# debugId=2DD992BB112DB2A464756E2164756E21
100030
100030
  //# sourceMappingURL=mcp-server.js.map