@moovio/sdk 25.11.6 → 25.12.0
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 +30 -2
- package/bin/mcp-server.js +63 -15
- package/bin/mcp-server.js.map +12 -11
- package/hooks/access-token-hook.d.ts +25 -0
- package/hooks/access-token-hook.d.ts.map +1 -0
- package/hooks/access-token-hook.js +60 -0
- package/hooks/access-token-hook.js.map +1 -0
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +4 -0
- package/hooks/registration.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/cli/start/command.d.ts.map +1 -1
- package/mcp-server/cli/start/command.js +8 -0
- package/mcp-server/cli/start/command.js.map +1 -1
- package/mcp-server/cli/start/impl.d.ts +1 -0
- package/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/mcp-server/cli/start/impl.js +2 -0
- package/mcp-server/cli/start/impl.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts +1 -0
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +2 -1
- package/mcp-server/server.js.map +1 -1
- package/models/components/webhookdata.d.ts +2 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +2 -2
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdatabankaccountdeleted.d.ts +3 -0
- package/models/components/webhookdatabankaccountdeleted.d.ts.map +1 -1
- package/models/components/webhookdatabankaccountdeleted.js +3 -0
- package/models/components/webhookdatabankaccountdeleted.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/access-token-hook.ts +73 -0
- package/src/hooks/registration.ts +5 -0
- package/src/lib/config.ts +8 -3
- package/src/mcp-server/cli/start/command.ts +9 -0
- package/src/mcp-server/cli/start/impl.ts +3 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/models/components/webhookdata.ts +4 -4
- package/src/models/components/webhookdatabankaccountdeleted.ts +9 -0
- package/test/tests/accessToken.test.ts +86 -0
package/README.md
CHANGED
|
@@ -95,7 +95,8 @@ Add the following server definition to your `claude_desktop_config.json` file:
|
|
|
95
95
|
"--",
|
|
96
96
|
"mcp", "start",
|
|
97
97
|
"--username", "...",
|
|
98
|
-
"--password", "..."
|
|
98
|
+
"--password", "...",
|
|
99
|
+
"--access-token", "..."
|
|
99
100
|
]
|
|
100
101
|
}
|
|
101
102
|
}
|
|
@@ -119,7 +120,8 @@ Create a `.cursor/mcp.json` file in your project root with the following content
|
|
|
119
120
|
"--",
|
|
120
121
|
"mcp", "start",
|
|
121
122
|
"--username", "...",
|
|
122
|
-
"--password", "..."
|
|
123
|
+
"--password", "...",
|
|
124
|
+
"--access-token", "..."
|
|
123
125
|
]
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -238,6 +240,32 @@ run();
|
|
|
238
240
|
```
|
|
239
241
|
<!-- End Authentication [security] -->
|
|
240
242
|
|
|
243
|
+
Client-side authentication is supported through the `accessToken` parameter. For example:
|
|
244
|
+
```typescript
|
|
245
|
+
import { Moov } from "@moovio/sdk";
|
|
246
|
+
|
|
247
|
+
const moov = new Moov({
|
|
248
|
+
accessToken: "",
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
async function run() {
|
|
252
|
+
const result = await moov.accounts.create({
|
|
253
|
+
accountType: "business",
|
|
254
|
+
profile: {
|
|
255
|
+
business: {
|
|
256
|
+
legalBusinessName: "Whole Body Fitness LLC",
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
console.log(result);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
run();
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
See the [Moov authentication docs](https://docs.moov.io/api/authentication/api-authentication/) for more information.
|
|
268
|
+
|
|
241
269
|
<!-- Start Available Resources and Operations [operations] -->
|
|
242
270
|
## Available Resources and Operations
|
|
243
271
|
|
package/bin/mcp-server.js
CHANGED
|
@@ -52835,6 +52835,36 @@ var init_mcp = __esm(() => {
|
|
|
52835
52835
|
};
|
|
52836
52836
|
});
|
|
52837
52837
|
|
|
52838
|
+
// src/hooks/access-token-hook.ts
|
|
52839
|
+
class AccessTokenHook {
|
|
52840
|
+
sdkInit(opts) {
|
|
52841
|
+
const token = opts.accessToken;
|
|
52842
|
+
const hasToken = typeof token === "string" && token.length > 0;
|
|
52843
|
+
if (hasToken && opts.security != null) {
|
|
52844
|
+
throw new Error("Moov SDK: `accessToken` and `security.username`/`password` cannot " + "both be set. Use `accessToken` for OAuth2 bearer auth " + "(typically client-side) or `security.username`/`password` for " + "HTTP Basic auth with API keys (server-side).");
|
|
52845
|
+
}
|
|
52846
|
+
if (isBrowserLike && opts.security != null) {
|
|
52847
|
+
throw new Error("Moov SDK: HTTP Basic credentials were provided in a browser-like " + "environment. API keys must never be embedded in client-side " + "code. Mint a short-lived OAuth2 access token on your server " + "and pass it via the `accessToken` option instead.");
|
|
52848
|
+
}
|
|
52849
|
+
return opts;
|
|
52850
|
+
}
|
|
52851
|
+
beforeRequest(ctx, request) {
|
|
52852
|
+
const token = ctx.options.accessToken;
|
|
52853
|
+
if (!token || request.headers.has("Authorization")) {
|
|
52854
|
+
return request;
|
|
52855
|
+
}
|
|
52856
|
+
const next = new Request(request);
|
|
52857
|
+
next.headers.set("Authorization", `Bearer ${token}`);
|
|
52858
|
+
return next;
|
|
52859
|
+
}
|
|
52860
|
+
}
|
|
52861
|
+
var gt, webWorkerLike, isBrowserLike;
|
|
52862
|
+
var init_access_token_hook = __esm(() => {
|
|
52863
|
+
gt = typeof globalThis === "undefined" ? null : globalThis;
|
|
52864
|
+
webWorkerLike = typeof gt === "object" && gt != null && "importScripts" in gt && typeof gt["importScripts"] === "function";
|
|
52865
|
+
isBrowserLike = webWorkerLike || typeof navigator !== "undefined" && "serviceWorker" in navigator || typeof window === "object" && typeof window.document !== "undefined";
|
|
52866
|
+
});
|
|
52867
|
+
|
|
52838
52868
|
// src/lib/url.ts
|
|
52839
52869
|
function pathToFunc(pathPattern, options) {
|
|
52840
52870
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
@@ -52879,9 +52909,9 @@ var init_config = __esm(() => {
|
|
|
52879
52909
|
SDK_METADATA = {
|
|
52880
52910
|
language: "typescript",
|
|
52881
52911
|
openapiDocVersion: "v2025.10.00",
|
|
52882
|
-
sdkVersion: "25.
|
|
52883
|
-
genVersion: "2.
|
|
52884
|
-
userAgent: "speakeasy-sdk/typescript 25.
|
|
52912
|
+
sdkVersion: "25.12.0",
|
|
52913
|
+
genVersion: "2.884.4",
|
|
52914
|
+
userAgent: "speakeasy-sdk/typescript 25.12.0 2.884.4 v2025.10.00 @moovio/sdk"
|
|
52885
52915
|
};
|
|
52886
52916
|
});
|
|
52887
52917
|
|
|
@@ -52901,8 +52931,12 @@ var init_moov_version_hook = __esm(() => {
|
|
|
52901
52931
|
function initHooks(hooks) {
|
|
52902
52932
|
const versionHook = new MoovVersionHook;
|
|
52903
52933
|
hooks.registerBeforeRequestHook(versionHook);
|
|
52934
|
+
const accessTokenHook = new AccessTokenHook;
|
|
52935
|
+
hooks.registerSDKInitHook(accessTokenHook);
|
|
52936
|
+
hooks.registerBeforeRequestHook(accessTokenHook);
|
|
52904
52937
|
}
|
|
52905
52938
|
var init_registration = __esm(() => {
|
|
52939
|
+
init_access_token_hook();
|
|
52906
52940
|
init_moov_version_hook();
|
|
52907
52941
|
});
|
|
52908
52942
|
|
|
@@ -53685,7 +53719,7 @@ class ClientSDK {
|
|
|
53685
53719
|
for (const [k2, v2] of userHeaders) {
|
|
53686
53720
|
headers.set(k2, v2);
|
|
53687
53721
|
}
|
|
53688
|
-
if (!
|
|
53722
|
+
if (!isBrowserLike2) {
|
|
53689
53723
|
headers.set(conf.uaHeader ?? "user-agent", conf.userAgent ?? SDK_METADATA.userAgent);
|
|
53690
53724
|
}
|
|
53691
53725
|
const fetchOptions = {
|
|
@@ -53830,7 +53864,7 @@ async function logResponse(logger, res, req) {
|
|
|
53830
53864
|
logger.groupEnd();
|
|
53831
53865
|
logger.groupEnd();
|
|
53832
53866
|
}
|
|
53833
|
-
var
|
|
53867
|
+
var gt2, webWorkerLike2, isBrowserLike2, jsonLikeContentTypeRE, jsonlLikeContentTypeRE;
|
|
53834
53868
|
var init_sdks = __esm(() => {
|
|
53835
53869
|
init_hooks();
|
|
53836
53870
|
init_httpclienterrors();
|
|
@@ -53839,9 +53873,9 @@ var init_sdks = __esm(() => {
|
|
|
53839
53873
|
init_encodings();
|
|
53840
53874
|
init_http();
|
|
53841
53875
|
init_retries();
|
|
53842
|
-
|
|
53843
|
-
|
|
53844
|
-
|
|
53876
|
+
gt2 = typeof globalThis === "undefined" ? null : globalThis;
|
|
53877
|
+
webWorkerLike2 = typeof gt2 === "object" && gt2 != null && "importScripts" in gt2 && typeof gt2["importScripts"] === "function";
|
|
53878
|
+
isBrowserLike2 = webWorkerLike2 || typeof navigator !== "undefined" && "serviceWorker" in navigator || typeof window === "object" && typeof window.document !== "undefined";
|
|
53845
53879
|
jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
53846
53880
|
jsonlLikeContentTypeRE = /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
53847
53881
|
});
|
|
@@ -67766,13 +67800,16 @@ var init_webhookdatabankaccountcreated = __esm(() => {
|
|
|
67766
67800
|
var WebhookDataBankAccountDeleted$inboundSchema, WebhookDataBankAccountDeleted$outboundSchema;
|
|
67767
67801
|
var init_webhookdatabankaccountdeleted = __esm(() => {
|
|
67768
67802
|
init_esm();
|
|
67803
|
+
init_bankaccountstatus();
|
|
67769
67804
|
WebhookDataBankAccountDeleted$inboundSchema = objectType({
|
|
67770
67805
|
bankAccountID: stringType(),
|
|
67771
|
-
accountID: stringType()
|
|
67806
|
+
accountID: stringType(),
|
|
67807
|
+
status: BankAccountStatus$inboundSchema
|
|
67772
67808
|
});
|
|
67773
67809
|
WebhookDataBankAccountDeleted$outboundSchema = objectType({
|
|
67774
67810
|
bankAccountID: stringType(),
|
|
67775
|
-
accountID: stringType()
|
|
67811
|
+
accountID: stringType(),
|
|
67812
|
+
status: BankAccountStatus$outboundSchema
|
|
67776
67813
|
});
|
|
67777
67814
|
});
|
|
67778
67815
|
|
|
@@ -68404,6 +68441,7 @@ var init_webhookdata = __esm(() => {
|
|
|
68404
68441
|
WebhookDataRefundUpdated$inboundSchema,
|
|
68405
68442
|
WebhookDataWalletTransactionUpdated$inboundSchema,
|
|
68406
68443
|
WebhookDataBankAccountCreated$inboundSchema,
|
|
68444
|
+
WebhookDataBankAccountDeleted$inboundSchema,
|
|
68407
68445
|
WebhookDataCancellationCreated$inboundSchema,
|
|
68408
68446
|
WebhookDataCancellationUpdated$inboundSchema,
|
|
68409
68447
|
WebhookDataCardAutoUpdated$inboundSchema,
|
|
@@ -68417,7 +68455,6 @@ var init_webhookdata = __esm(() => {
|
|
|
68417
68455
|
WebhookDataTransferCreated$inboundSchema,
|
|
68418
68456
|
WebhookDataWalletUpdated$inboundSchema,
|
|
68419
68457
|
WebhookDataBalanceUpdated$inboundSchema,
|
|
68420
|
-
WebhookDataBankAccountDeleted$inboundSchema,
|
|
68421
68458
|
WebhookDataCapabilityRequested$inboundSchema,
|
|
68422
68459
|
WebhookDataInvoiceCreated$inboundSchema,
|
|
68423
68460
|
WebhookDataRepresentativeCreated$inboundSchema,
|
|
@@ -68443,6 +68480,7 @@ var init_webhookdata = __esm(() => {
|
|
|
68443
68480
|
WebhookDataRefundUpdated$outboundSchema,
|
|
68444
68481
|
WebhookDataWalletTransactionUpdated$outboundSchema,
|
|
68445
68482
|
WebhookDataBankAccountCreated$outboundSchema,
|
|
68483
|
+
WebhookDataBankAccountDeleted$outboundSchema,
|
|
68446
68484
|
WebhookDataCancellationCreated$outboundSchema,
|
|
68447
68485
|
WebhookDataCancellationUpdated$outboundSchema,
|
|
68448
68486
|
WebhookDataCardAutoUpdated$outboundSchema,
|
|
@@ -68456,7 +68494,6 @@ var init_webhookdata = __esm(() => {
|
|
|
68456
68494
|
WebhookDataTransferCreated$outboundSchema,
|
|
68457
68495
|
WebhookDataWalletUpdated$outboundSchema,
|
|
68458
68496
|
WebhookDataBalanceUpdated$outboundSchema,
|
|
68459
|
-
WebhookDataBankAccountDeleted$outboundSchema,
|
|
68460
68497
|
WebhookDataCapabilityRequested$outboundSchema,
|
|
68461
68498
|
WebhookDataInvoiceCreated$outboundSchema,
|
|
68462
68499
|
WebhookDataRepresentativeCreated$outboundSchema,
|
|
@@ -98307,10 +98344,11 @@ var init_webhooksUpdate2 = __esm(() => {
|
|
|
98307
98344
|
function createMCPServer(deps) {
|
|
98308
98345
|
const server = new McpServer({
|
|
98309
98346
|
name: "Moov",
|
|
98310
|
-
version: "25.
|
|
98347
|
+
version: "25.12.0"
|
|
98311
98348
|
});
|
|
98312
98349
|
const client = new MoovCore({
|
|
98313
98350
|
security: deps.security,
|
|
98351
|
+
accessToken: deps.accessToken,
|
|
98314
98352
|
serverURL: deps.serverURL,
|
|
98315
98353
|
serverIdx: deps.serverIdx
|
|
98316
98354
|
});
|
|
@@ -98704,6 +98742,7 @@ async function startStdio(flags) {
|
|
|
98704
98742
|
username: flags.username ?? "",
|
|
98705
98743
|
password: flags.password ?? ""
|
|
98706
98744
|
}),
|
|
98745
|
+
accessToken: flags["access-token"],
|
|
98707
98746
|
serverURL: flags["server-url"],
|
|
98708
98747
|
serverIdx: flags["server-index"]
|
|
98709
98748
|
});
|
|
@@ -98725,6 +98764,7 @@ async function startSSE(flags) {
|
|
|
98725
98764
|
username: flags.username ?? "",
|
|
98726
98765
|
password: flags.password ?? ""
|
|
98727
98766
|
}),
|
|
98767
|
+
accessToken: flags["access-token"],
|
|
98728
98768
|
serverURL: flags["server-url"],
|
|
98729
98769
|
serverIdx: flags["server-index"]
|
|
98730
98770
|
});
|
|
@@ -99805,6 +99845,14 @@ var startCommand = tn({
|
|
|
99805
99845
|
return stringType().parse(value);
|
|
99806
99846
|
}
|
|
99807
99847
|
},
|
|
99848
|
+
"access-token": {
|
|
99849
|
+
kind: "parsed",
|
|
99850
|
+
brief: "Allows setting the accessToken parameter for all supported operations",
|
|
99851
|
+
optional: true,
|
|
99852
|
+
parse: (value) => {
|
|
99853
|
+
return stringType().parse(value);
|
|
99854
|
+
}
|
|
99855
|
+
},
|
|
99808
99856
|
"server-url": {
|
|
99809
99857
|
kind: "parsed",
|
|
99810
99858
|
brief: "Overrides the default server URL used by the SDK",
|
|
@@ -99864,7 +99912,7 @@ var routes = rn({
|
|
|
99864
99912
|
var app = Ve(routes, {
|
|
99865
99913
|
name: "mcp",
|
|
99866
99914
|
versionInfo: {
|
|
99867
|
-
currentVersion: "25.
|
|
99915
|
+
currentVersion: "25.12.0"
|
|
99868
99916
|
}
|
|
99869
99917
|
});
|
|
99870
99918
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -99872,5 +99920,5 @@ export {
|
|
|
99872
99920
|
app
|
|
99873
99921
|
};
|
|
99874
99922
|
|
|
99875
|
-
//# debugId=
|
|
99923
|
+
//# debugId=BB5D46E7058C8D8F64756E2164756E21
|
|
99876
99924
|
//# sourceMappingURL=mcp-server.js.map
|