@moovio/sdk 0.23.3 → 0.23.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
@@ -2485,19 +2485,23 @@ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
2485
2485
  used to integrate a third-party HTTP client or when writing tests to mock out
2486
2486
  the HTTP client and feed in fixtures.
2487
2487
 
2488
- The following example shows how to use the `"beforeRequest"` hook to to add a
2489
- custom header and a timeout to requests and how to use the `"requestError"` hook
2490
- to log errors:
2488
+ The following example shows how to:
2489
+ - route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
2490
+ - use the `"beforeRequest"` hook to add a custom header and a timeout to requests
2491
+ - use the `"requestError"` hook to log errors
2491
2492
 
2492
2493
  ```typescript
2493
2494
  import { Moov } from "@moovio/sdk";
2495
+ import { ProxyAgent } from "undici";
2494
2496
  import { HTTPClient } from "@moovio/sdk/lib/http";
2495
2497
 
2498
+ const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
2499
+
2496
2500
  const httpClient = new HTTPClient({
2497
- // fetcher takes a function that has the same signature as native `fetch`.
2498
- fetcher: (request) => {
2499
- return fetch(request);
2500
- }
2501
+ // 'fetcher' takes a function that has the same signature as native 'fetch'.
2502
+ fetcher: (input, init) =>
2503
+ // 'dispatcher' is specific to undici and not part of the standard Fetch API.
2504
+ fetch(input, { ...init, dispatcher } as RequestInit),
2501
2505
  });
2502
2506
 
2503
2507
  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: "latest",
52882
- sdkVersion: "0.23.3",
52883
- genVersion: "2.816.0",
52884
- userAgent: "speakeasy-sdk/typescript 0.23.3 2.816.0 latest @moovio/sdk"
52882
+ sdkVersion: "0.23.4",
52883
+ genVersion: "2.818.4",
52884
+ userAgent: "speakeasy-sdk/typescript 0.23.4 2.818.4 latest @moovio/sdk"
52885
52885
  };
52886
52886
  });
52887
52887
 
@@ -102573,7 +102573,7 @@ var init_webhooksUpdate2 = __esm(() => {
102573
102573
  function createMCPServer(deps) {
102574
102574
  const server = new McpServer({
102575
102575
  name: "Moov",
102576
- version: "0.23.3"
102576
+ version: "0.23.4"
102577
102577
  });
102578
102578
  const client = new MoovCore({
102579
102579
  security: deps.security,
@@ -104151,7 +104151,7 @@ var routes = rn({
104151
104151
  var app = Ve(routes, {
104152
104152
  name: "mcp",
104153
104153
  versionInfo: {
104154
- currentVersion: "0.23.3"
104154
+ currentVersion: "0.23.4"
104155
104155
  }
104156
104156
  });
104157
104157
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -104159,5 +104159,5 @@ export {
104159
104159
  app
104160
104160
  };
104161
104161
 
104162
- //# debugId=3B20C0F965477AE364756E2164756E21
104162
+ //# debugId=0A76BB322C05111564756E2164756E21
104163
104163
  //# sourceMappingURL=mcp-server.js.map