@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/dist/lib.cjs CHANGED
@@ -1062,6 +1062,26 @@ var ACTIONS = [
1062
1062
  "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."
1063
1063
  ]
1064
1064
  },
1065
+ {
1066
+ id: "get_currency_coverage",
1067
+ title: "Currency coverage",
1068
+ 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.",
1069
+ kind: "read",
1070
+ scopes: ["connectors:read"],
1071
+ input: [
1072
+ {
1073
+ name: "applicationId",
1074
+ type: "string",
1075
+ required: false,
1076
+ description: "Application to read from. Defaults to the one this connection was authorized for. Call list_applications to see the others."
1077
+ }
1078
+ ],
1079
+ requests: [{ method: "GET", path: "/api/v1/connectors/currency-coverage" }],
1080
+ channels: ["mcp"],
1081
+ guardrails: [
1082
+ "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."
1083
+ ]
1084
+ },
1065
1085
  {
1066
1086
  id: "get_integration_status",
1067
1087
  title: "Integration readiness",
@@ -2632,6 +2652,7 @@ var HANDLERS = {
2632
2652
  otherDecline: otherDecline.ok ? otherDecline.value : otherDecline.unavailable
2633
2653
  };
2634
2654
  },
2655
+ get_currency_coverage: (ctx, args) => ctx.client.get("/api/v1/connectors/currency-coverage", void 0, { applicationId: args.applicationId }),
2635
2656
  get_integration_status: async (ctx, args) => {
2636
2657
  const opts = { applicationId: args.applicationId };
2637
2658
  const [connectors, endpoints, coverage] = await Promise.all([
@@ -3845,6 +3866,22 @@ var OAUTH_PROJECTIONS = {
3845
3866
  otherDecline: section({ rules: [{ errorCode: S, conditions: [{ type: S, op: S, values: [S] }] }] }),
3846
3867
  routingConnectors: section([{ id: S, displayName: T, method: S }])
3847
3868
  },
3869
+ get_currency_coverage: {
3870
+ mainCurrency: S,
3871
+ connection: S,
3872
+ currencies: [{
3873
+ currency: S,
3874
+ main: S,
3875
+ enabled: S,
3876
+ payable: S,
3877
+ valuation: S,
3878
+ services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
3879
+ usage: { openCarts: S, activeSubscriptions: S }
3880
+ }],
3881
+ services: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
3882
+ unknownServices: [{ id: S, displayName: T, method: S, active: S, inherited: S }],
3883
+ readAt: S
3884
+ },
3848
3885
  get_integration_status: {
3849
3886
  environment: { slug: S, kind: S, providerEnvironment: S },
3850
3887
  workspace: { name: T, slug: S },
@@ -3968,7 +4005,7 @@ var OAUTH_PROJECTIONS = {
3968
4005
  };
3969
4006
 
3970
4007
  // src/server.ts
3971
- var VERSION = true ? "0.5.1" : "0.0.0-dev";
4008
+ var VERSION = true ? "0.6.0" : "0.0.0-dev";
3972
4009
  function registerableActions(policy) {
3973
4010
  const isProduction = policy.identity.environment.providerEnvironment === "production";
3974
4011
  return actionsForChannel("mcp").filter((action) => {