@financeable/lenders 0.5.4 → 0.5.5
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 +11 -7
- package/bin/mcp-server.js +19 -14
- package/bin/mcp-server.js.map +11 -11
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts +1 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +27 -5
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -1
- package/dist/commonjs/lib/files.js +19 -0
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +0 -1
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +8 -4
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +1 -2
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.d.ts.map +1 -1
- package/dist/commonjs/lib/url.js +4 -2
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/shared.js +1 -1
- package/dist/commonjs/mcp-server/shared.js.map +1 -1
- package/dist/commonjs/models/components/customerprofile.d.ts +2 -0
- package/dist/commonjs/models/components/customerprofile.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerprofile.js +2 -0
- package/dist/commonjs/models/components/customerprofile.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts +1 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +26 -5
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -1
- package/dist/esm/lib/files.js +18 -0
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +0 -1
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +8 -4
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +1 -2
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.d.ts.map +1 -1
- package/dist/esm/lib/url.js +4 -2
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/shared.js +1 -1
- package/dist/esm/mcp-server/shared.js.map +1 -1
- package/dist/esm/models/components/customerprofile.d.ts +2 -0
- package/dist/esm/models/components/customerprofile.d.ts.map +1 -1
- package/dist/esm/models/components/customerprofile.js +2 -0
- package/dist/esm/models/components/customerprofile.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +32 -4
- package/src/lib/files.ts +22 -0
- package/src/lib/matchers.ts +3 -2
- package/src/lib/sdks.ts +7 -5
- package/src/lib/security.ts +1 -2
- package/src/lib/url.ts +16 -14
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/shared.ts +2 -2
- package/src/models/components/customerprofile.ts +4 -0
- package/.devcontainer/devcontainer.json +0 -45
- package/examples/package-lock.json +0 -620
- package/examples/package.json +0 -18
- package/tsconfig.json +0 -40
package/README.md
CHANGED
|
@@ -439,19 +439,23 @@ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
|
|
|
439
439
|
used to integrate a third-party HTTP client or when writing tests to mock out
|
|
440
440
|
the HTTP client and feed in fixtures.
|
|
441
441
|
|
|
442
|
-
The following example shows how to
|
|
443
|
-
|
|
444
|
-
to
|
|
442
|
+
The following example shows how to:
|
|
443
|
+
- route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
|
|
444
|
+
- use the `"beforeRequest"` hook to add a custom header and a timeout to requests
|
|
445
|
+
- use the `"requestError"` hook to log errors
|
|
445
446
|
|
|
446
447
|
```typescript
|
|
447
448
|
import { FinanceableLenders } from "@financeable/lenders";
|
|
449
|
+
import { ProxyAgent } from "undici";
|
|
448
450
|
import { HTTPClient } from "@financeable/lenders/lib/http";
|
|
449
451
|
|
|
452
|
+
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
|
|
453
|
+
|
|
450
454
|
const httpClient = new HTTPClient({
|
|
451
|
-
// fetcher takes a function that has the same signature as native
|
|
452
|
-
fetcher: (
|
|
453
|
-
|
|
454
|
-
|
|
455
|
+
// 'fetcher' takes a function that has the same signature as native 'fetch'.
|
|
456
|
+
fetcher: (input, init) =>
|
|
457
|
+
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
|
|
458
|
+
fetch(input, { ...init, dispatcher } as RequestInit),
|
|
455
459
|
});
|
|
456
460
|
|
|
457
461
|
httpClient.addHook("beforeRequest", (request) => {
|
package/bin/mcp-server.js
CHANGED
|
@@ -47521,7 +47521,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
47521
47521
|
throw new Error(`Parameter '${placeholder}' must be a string or number`);
|
|
47522
47522
|
}
|
|
47523
47523
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
47524
|
-
});
|
|
47524
|
+
}).replace(/^\/+/, "");
|
|
47525
47525
|
};
|
|
47526
47526
|
}
|
|
47527
47527
|
var hasOwn;
|
|
@@ -47552,9 +47552,9 @@ var init_config = __esm(() => {
|
|
|
47552
47552
|
SDK_METADATA = {
|
|
47553
47553
|
language: "typescript",
|
|
47554
47554
|
openapiDocVersion: "0.1.0",
|
|
47555
|
-
sdkVersion: "0.5.
|
|
47556
|
-
genVersion: "2.
|
|
47557
|
-
userAgent: "speakeasy-sdk/typescript 0.5.
|
|
47555
|
+
sdkVersion: "0.5.5",
|
|
47556
|
+
genVersion: "2.879.11",
|
|
47557
|
+
userAgent: "speakeasy-sdk/typescript 0.5.5 2.879.11 0.1.0 @financeable/lenders"
|
|
47558
47558
|
};
|
|
47559
47559
|
});
|
|
47560
47560
|
|
|
@@ -48129,12 +48129,15 @@ class ClientSDK {
|
|
|
48129
48129
|
if (!base) {
|
|
48130
48130
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
48131
48131
|
}
|
|
48132
|
-
const
|
|
48133
|
-
|
|
48132
|
+
const baseURL = new URL(base);
|
|
48133
|
+
let reqURL;
|
|
48134
48134
|
if (path) {
|
|
48135
|
-
|
|
48136
|
-
reqURL
|
|
48135
|
+
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
48136
|
+
reqURL = new URL(path, baseURL);
|
|
48137
|
+
} else {
|
|
48138
|
+
reqURL = baseURL;
|
|
48137
48139
|
}
|
|
48140
|
+
reqURL.hash = "";
|
|
48138
48141
|
let finalQuery = query || "";
|
|
48139
48142
|
const secQuery = [];
|
|
48140
48143
|
for (const [k2, v2] of Object.entries(security?.queryParams || {})) {
|
|
@@ -48377,7 +48380,7 @@ async function consumeStream(stream) {
|
|
|
48377
48380
|
while (true) {
|
|
48378
48381
|
const { done, value } = await reader.read();
|
|
48379
48382
|
if (value != null)
|
|
48380
|
-
chunks.push(value);
|
|
48383
|
+
chunks.push(new Uint8Array(value).buffer);
|
|
48381
48384
|
if (done)
|
|
48382
48385
|
break;
|
|
48383
48386
|
}
|
|
@@ -49759,7 +49762,8 @@ var init_customerprofile = __esm(() => {
|
|
|
49759
49762
|
contactNumber: stringType().optional(),
|
|
49760
49763
|
shareOfExpenses: numberType().optional(),
|
|
49761
49764
|
rentAmount: stringType().optional(),
|
|
49762
|
-
landlordName: stringType().optional()
|
|
49765
|
+
landlordName: stringType().optional(),
|
|
49766
|
+
serviceabilitySurplus: numberType().optional()
|
|
49763
49767
|
}).transform((v2) => {
|
|
49764
49768
|
return remap(v2, {
|
|
49765
49769
|
_id: "id"
|
|
@@ -49774,7 +49778,8 @@ var init_customerprofile = __esm(() => {
|
|
|
49774
49778
|
contactNumber: stringType().optional(),
|
|
49775
49779
|
shareOfExpenses: numberType().optional(),
|
|
49776
49780
|
rentAmount: stringType().optional(),
|
|
49777
|
-
landlordName: stringType().optional()
|
|
49781
|
+
landlordName: stringType().optional(),
|
|
49782
|
+
serviceabilitySurplus: numberType().optional()
|
|
49778
49783
|
}).transform((v2) => {
|
|
49779
49784
|
return remap(v2, {
|
|
49780
49785
|
id: "_id"
|
|
@@ -52858,7 +52863,7 @@ var init_createPersonalSubmission2 = __esm(() => {
|
|
|
52858
52863
|
function createMCPServer(deps) {
|
|
52859
52864
|
const server = new McpServer({
|
|
52860
52865
|
name: "FinanceableLenders",
|
|
52861
|
-
version: "0.5.
|
|
52866
|
+
version: "0.5.5"
|
|
52862
52867
|
});
|
|
52863
52868
|
const client = new FinanceableLendersCore({
|
|
52864
52869
|
serverURL: deps.serverURL,
|
|
@@ -54053,7 +54058,7 @@ var routes = rn({
|
|
|
54053
54058
|
var app = Ve(routes, {
|
|
54054
54059
|
name: "mcp",
|
|
54055
54060
|
versionInfo: {
|
|
54056
|
-
currentVersion: "0.5.
|
|
54061
|
+
currentVersion: "0.5.5"
|
|
54057
54062
|
}
|
|
54058
54063
|
});
|
|
54059
54064
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -54061,5 +54066,5 @@ export {
|
|
|
54061
54066
|
app
|
|
54062
54067
|
};
|
|
54063
54068
|
|
|
54064
|
-
//# debugId=
|
|
54069
|
+
//# debugId=4318FDDCE3D6112D64756E2164756E21
|
|
54065
54070
|
//# sourceMappingURL=mcp-server.js.map
|