@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/mcp.js
CHANGED
|
@@ -1151,6 +1151,26 @@ var ACTIONS = [
|
|
|
1151
1151
|
"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."
|
|
1152
1152
|
]
|
|
1153
1153
|
},
|
|
1154
|
+
{
|
|
1155
|
+
id: "get_currency_coverage",
|
|
1156
|
+
title: "Currency coverage",
|
|
1157
|
+
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.",
|
|
1158
|
+
kind: "read",
|
|
1159
|
+
scopes: ["connectors:read"],
|
|
1160
|
+
input: [
|
|
1161
|
+
{
|
|
1162
|
+
name: "applicationId",
|
|
1163
|
+
type: "string",
|
|
1164
|
+
required: false,
|
|
1165
|
+
description: "Application to read from. Defaults to the one this connection was authorized for. Call list_applications to see the others."
|
|
1166
|
+
}
|
|
1167
|
+
],
|
|
1168
|
+
requests: [{ method: "GET", path: "/api/v1/connectors/currency-coverage" }],
|
|
1169
|
+
channels: ["mcp"],
|
|
1170
|
+
guardrails: [
|
|
1171
|
+
"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."
|
|
1172
|
+
]
|
|
1173
|
+
},
|
|
1154
1174
|
{
|
|
1155
1175
|
id: "get_integration_status",
|
|
1156
1176
|
title: "Integration readiness",
|
|
@@ -2594,6 +2614,7 @@ var HANDLERS = {
|
|
|
2594
2614
|
otherDecline: otherDecline.ok ? otherDecline.value : otherDecline.unavailable
|
|
2595
2615
|
};
|
|
2596
2616
|
},
|
|
2617
|
+
get_currency_coverage: (ctx, args) => ctx.client.get("/api/v1/connectors/currency-coverage", void 0, { applicationId: args.applicationId }),
|
|
2597
2618
|
get_integration_status: async (ctx, args) => {
|
|
2598
2619
|
const opts = { applicationId: args.applicationId };
|
|
2599
2620
|
const [connectors, endpoints, coverage] = await Promise.all([
|
|
@@ -3724,6 +3745,22 @@ var OAUTH_PROJECTIONS = {
|
|
|
3724
3745
|
otherDecline: section({ rules: [{ errorCode: S, conditions: [{ type: S, op: S, values: [S] }] }] }),
|
|
3725
3746
|
routingConnectors: section([{ id: S, displayName: T, method: S }])
|
|
3726
3747
|
},
|
|
3748
|
+
get_currency_coverage: {
|
|
3749
|
+
mainCurrency: S,
|
|
3750
|
+
connection: S,
|
|
3751
|
+
currencies: [{
|
|
3752
|
+
currency: S,
|
|
3753
|
+
main: S,
|
|
3754
|
+
enabled: S,
|
|
3755
|
+
payable: S,
|
|
3756
|
+
valuation: S,
|
|
3757
|
+
services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3758
|
+
usage: { openCarts: S, activeSubscriptions: S }
|
|
3759
|
+
}],
|
|
3760
|
+
services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3761
|
+
unknownServices: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
|
|
3762
|
+
readAt: S
|
|
3763
|
+
},
|
|
3727
3764
|
get_integration_status: {
|
|
3728
3765
|
environment: { slug: S, kind: S, providerEnvironment: S },
|
|
3729
3766
|
workspace: { name: T, slug: S },
|
|
@@ -3847,7 +3884,7 @@ var OAUTH_PROJECTIONS = {
|
|
|
3847
3884
|
};
|
|
3848
3885
|
|
|
3849
3886
|
// src/server.ts
|
|
3850
|
-
var VERSION = true ? "0.
|
|
3887
|
+
var VERSION = true ? "0.6.0" : "0.0.0-dev";
|
|
3851
3888
|
function registerableActions(policy) {
|
|
3852
3889
|
const isProduction = policy.identity.environment.providerEnvironment === "production";
|
|
3853
3890
|
return actionsForChannel("mcp").filter((action) => {
|