@usethrottle/mcp 0.5.1 → 0.6.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 +1 -0
- package/dist/contract-index.json +1 -1
- package/dist/docs-index.json +1 -1
- package/dist/lib.cjs +38 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +38 -1
- package/dist/lib.js.map +1 -1
- package/dist/mcp.js +38 -1
- package/dist/mcp.js.map +1 -1
- package/package.json +3 -3
package/dist/lib.js
CHANGED
|
@@ -1025,6 +1025,26 @@ var ACTIONS = [
|
|
|
1025
1025
|
"Every sub-read proxies live to the payment provider's routing API and none are guaranteed to succeed together; report any that fail as unavailable rather than failing the whole call."
|
|
1026
1026
|
]
|
|
1027
1027
|
},
|
|
1028
|
+
{
|
|
1029
|
+
id: "get_currency_coverage",
|
|
1030
|
+
title: "Currency coverage",
|
|
1031
|
+
description: "Which currencies this application can actually be paid in: one row per enabled currency (and every currency an active payment service accepts), with the services that take it, whether it is payable, and how it is valued. Open cart and active subscription counts per currency are included only when the key also holds carts:read and subscriptions:read.",
|
|
1032
|
+
kind: "read",
|
|
1033
|
+
scopes: ["connectors:read"],
|
|
1034
|
+
input: [
|
|
1035
|
+
{
|
|
1036
|
+
name: "applicationId",
|
|
1037
|
+
type: "string",
|
|
1038
|
+
required: false,
|
|
1039
|
+
description: "Application to read from. Defaults to the one this connection was authorized for. Call list_applications to see the others."
|
|
1040
|
+
}
|
|
1041
|
+
],
|
|
1042
|
+
requests: [{ method: "GET", path: "/api/v1/connectors/currency-coverage" }],
|
|
1043
|
+
channels: ["mcp"],
|
|
1044
|
+
guardrails: [
|
|
1045
|
+
"Reads the payment provider live on every call. A currency with payable false is enabled but no active service takes it: a buyer cannot pay in it."
|
|
1046
|
+
]
|
|
1047
|
+
},
|
|
1028
1048
|
{
|
|
1029
1049
|
id: "get_integration_status",
|
|
1030
1050
|
title: "Integration readiness",
|
|
@@ -2595,6 +2615,7 @@ var HANDLERS = {
|
|
|
2595
2615
|
otherDecline: otherDecline.ok ? otherDecline.value : otherDecline.unavailable
|
|
2596
2616
|
};
|
|
2597
2617
|
},
|
|
2618
|
+
get_currency_coverage: (ctx, args) => ctx.client.get("/api/v1/connectors/currency-coverage", void 0, { applicationId: args.applicationId }),
|
|
2598
2619
|
get_integration_status: async (ctx, args) => {
|
|
2599
2620
|
const opts = { applicationId: args.applicationId };
|
|
2600
2621
|
const [connectors, endpoints, coverage] = await Promise.all([
|
|
@@ -3808,6 +3829,22 @@ var OAUTH_PROJECTIONS = {
|
|
|
3808
3829
|
otherDecline: section({ rules: [{ errorCode: S, conditions: [{ type: S, op: S, values: [S] }] }] }),
|
|
3809
3830
|
routingConnectors: section([{ id: S, displayName: T, method: S }])
|
|
3810
3831
|
},
|
|
3832
|
+
get_currency_coverage: {
|
|
3833
|
+
mainCurrency: S,
|
|
3834
|
+
connection: S,
|
|
3835
|
+
currencies: [{
|
|
3836
|
+
currency: S,
|
|
3837
|
+
main: S,
|
|
3838
|
+
enabled: S,
|
|
3839
|
+
payable: S,
|
|
3840
|
+
valuation: S,
|
|
3841
|
+
services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3842
|
+
usage: { openCarts: S, activeSubscriptions: S }
|
|
3843
|
+
}],
|
|
3844
|
+
services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3845
|
+
unknownServices: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3846
|
+
readAt: S
|
|
3847
|
+
},
|
|
3811
3848
|
get_integration_status: {
|
|
3812
3849
|
environment: { slug: S, kind: S, providerEnvironment: S },
|
|
3813
3850
|
workspace: { name: T, slug: S },
|
|
@@ -3931,7 +3968,7 @@ var OAUTH_PROJECTIONS = {
|
|
|
3931
3968
|
};
|
|
3932
3969
|
|
|
3933
3970
|
// src/server.ts
|
|
3934
|
-
var VERSION = true ? "0.
|
|
3971
|
+
var VERSION = true ? "0.6.0" : "0.0.0-dev";
|
|
3935
3972
|
function registerableActions(policy) {
|
|
3936
3973
|
const isProduction = policy.identity.environment.providerEnvironment === "production";
|
|
3937
3974
|
return actionsForChannel("mcp").filter((action) => {
|